Monday, June 8, 2009

DEVELOPMENT: good software development practices

Here's a list of 5 Good Programming Habits we picked up from Amy Bennett in her article at IT World:
  • The best trick I have is to type the sequences/use cases like a story before I write any code. The outline I create is read over and over, tweaking as I go." (Dan Douglas)
  • Solve small, individual problems (The rule of 'encapsulation'). If I try to make one part of my code do too much, then I've invited trouble. (Sean Devlin)
  • I like to write a routine first as pseudocode in comments, then translate the comments into source code. I find that this is a much faster method for me than writing the source code first. Any mistakes I make in the pseudocode are more easily fixed there than if I wrote the code first. As a bonus, I have accurate and useful comments when the routine is completed. (Jeffrey Henning)
  • Make improvements often -- even if they are small -- so you are always making some progress. (James Stauffer)
  • I make sure that I get a reasonable amount of sleep and that I come back to each piece of code/design/etc. after 'sleeping on it' so that I see/think about it from different angles and states of mind. This helps with everything. (John Mitchell)

Our "top tip" is to code defensively - always be thinking "what if?". We find this particularly useful and helpful because the code module or class we're writing for application "A" may well be used in application "B" at some point in the future. If the module or class hasn't been coded defensively to produce solid bug-free code, then this could mean a lot of re-writes for the developer on application "B".

Please share your thoughts and tips on how to produce great software development products.

No comments: