in reply to Perl Software Design Process

Warning: I am very much a proponent of the "bottom-up" method of designing.

Obviously it depends very much on what you're writing, methodologies will tend to vary between a 5-line script to rename your mp3s and a framework to take over and run the worlds stock exchange markets ;-). Nevertheless, here's a rough guide I tend to follow:

  1. Create a version control repository or a subdirectory of an existing repository. All through the following steps, commit to that repository whenever you have written more code than you can recite without looking it up.
  2. Start out with an essential feature your code is supposed to have which can be easily implemented.
  3. Write a test to see whether your code performs correctly. Yep, this test will fail. You haven't written any code yet. Any test that passes immediately after it is written was written too late (sometimes unavoidably so) IMO.
  4. Write code which passes the test.
  5. Look at the code. Does it not conform to your expectations? Can it be written more cleanly? Can you remove anything? Refactor and make sure the test still passes. Refactor mercilessly.
  6. Return to 2 and repeat.

This is more or less completely ripped off from the Test driven deveolpment and Extreme programming methodologies. Books on the subject abound and I very much recommend reading some of them.


All dogma is stupid.