Friday, February 13, 2009

InfoQ: Craftsmanship and Ethics

This is a fabulous video on good practices as a software developer and as a software development organization.  It  highlights a number of Do’s and Don’ts that all developers should follow.

If you are a developer, you need to watch this.

The video discusses concepts such as Discipline in software development such as:

  • Short Iterations; design-build-refactor-repeat
  • Don’t Wait for Definition; be part of the requirements definition by releasing executable code
  • Abstract away Volatility; separate things that are likely to change from things that are not likely to change
  • Decouple; build interfaces and build to the interfaces
  • Find ways around Blocks; continuously remove impediments
  • Keep architectures simple; I had to look up what ‘turgid viscous’ meant, but make architectures solve problems that are within the scope of the present project.
  • Improve Incrementally; fix problems a little at a time.
  • Avoid Grand Re-designs; don’t confuse this with incremental improvement, this just means that you leverage old product to make new product.
  • Progressive Widening & Progressive Deepening; I love these two terms.  Widening is creating fully functioning features one at a time and deepening is a form of refactoring to add the layers required to limit dependencies. “First make it work, then make it right, then make it fast.”
  • Don’t write bad code; take the time to get the code right, don’t speed through to make a release.
  • Clean your code; messy code exists over a long term and causes problems with people working on it later and causes productivity to drop. “Every line of Code is what you expect it to be.”  Keep functions small and simple, name things well, use proper formatting, etc.
  • Test Driven Development; three rules (1) Don’t write any production code until you’ve written a test for it, (2) don’t write any more test than is likely to fail, (3) then don’t write any more code than what would pass the test.  This cycle ensures that you’ve always got testable code.
  • QA Should not find anything; don’t use QA to find our defects.
  • 100% code coverage; make sure all code is considered tested.
  • Avoid debugging; using test driven development helps this, debugging is a way of helping you understand how your own code works.  Using a test to do this is a better and more persistent method of doing this.
  • Manual Test Scripts are Immoral; Automate test scripts and make them part of the deliverable.
  • Define Done; Make sure software id done at the end of an iteration.  Use “all tests pass” as a default definition.
  • Test Through the right Interface; Make sure that you don’t need the GUI to test your application.
  • Apprenticeship; make sure new programmers are not left to develop their own bad habits.
  • Use Good Tools; this goes without saying.  If you’ve ever done any woodworking you know that good tools make all the difference in the final product.

InfoQ: Craftsmanship and Ethics

No comments: