Refactoring, unit testing, all that…

I’ve always been more of a procedural kind of a programmer. After Spectrum BASIC and the inevitable QBASIC, it was on to C. This was all hobby and/or academic stuff. Professionally I used Perl far more than anything else, and always in an “if it works, f**k it!” type of methodology (thanks, Mr Hume, for the turn of phrase…) This was because more of what we were doing involved either single-shot web pages, text processing, system admin, and other short-lived “make it work now” tasks. By the time you’d be coming to make changes to the code and need to be able to understand it, it would be time to rip it out completely and build a completely new website. So it made perfect sense.

Working with object-orientated PHP4 isn’t exactly the most fun you can have with your clothes on, but it has got me into some eXtreme Programming methods. I can’t follow through on all the methods – it’s hard to do pair-programming when you live in Tarragona, and I never even *see* most clients, as few are in the same country as me – but starting with unit testing and leaning heavily on refactoring are techniques that can work when pulled apart from the whole XP ride [see this for an alternative view].

The idea of “proving it with code” – starting to code before you know fully what direction you’re going to go in – suits me down to the ground. That’s how I’ve *always* worked anyway. There come very quick realisations about the requirements as soon as you start hacking. *Then* you can make some notes about them.

I’m definitely in two minds about pair-programming (regardless of the geographical practicalities). Some people are just *meant* to work alone. Many good programmers are like that – are they supposed to be either forced into a different methodology or discarded under XP? Sometimes it just clicks between two programmers and they can work together, but I doubt just *any* two minds could be dragged together like that. Personally, my best MO is to get together regularly with others on the project then disappear while I code. It’s like driving – if you look down at the gear-stick, it’s harder to change gears than if you just change them. (Uh-oh, in danger of sounding like Obi-Wan now: “use the force – reach out with your feelings”!) But sometimes coding in a natural, almost unthinking way can be the way to really great, elegant ideas. As Matt Stephens says: “Programming done properly is meditation – your mind transcends to some other place, of pure thought, with a thousand variables being juggled effortlessly.” It might be possible to do that alongside someone else, but it would have to be an inter-personal synergy like Lennon/McCartney! Personally, I think I’d rather scrum then go off and use the force, Luke.

313 Replies to “Refactoring, unit testing, all that…”

  1. Hi there, I must say that you have done a wonderful job on your site and I thoroughly enjoyed my stay here, I thank you for sharing it with me…

  2. Hello! I figured it would be nice if I signed your guestbook. I just thought that I would visit your homepage and see what all you have been up to, well – it’s awesome!

  3. Hi, just surfed in. I enjoyed looking around your web site. This site has been very useful to me so far and I have barely scrathed the surface of it.

  4. Exstremely lovely site. Very impressed about all the lesson there are to learn and to know how much help is there also. Keep up the great work

  5. I dont even remember how i reached your site but it doesnt matter, cause i’m so happy i found it, it really made me think, keep up the good work

  6. Exstremely lovely site. Very impressed about all the lesson there are to learn and to know how much help is there also. Keep up the great work

  7. Exstremely lovely site. Very impressed about all the lesson there are to learn and to know how much help is there also. Keep up the great work

  8. Your website is beautifully decorated and easily navigated. I have enjoyed visiting this site today and hope to visit many more times in the future.

  9. Pingback: lily
  10. Pingback: forex trading
  11. Pingback: msn backgammon
  12. Pingback: strip blackjack
  13. Pingback: hotel reservation
  14. Pingback: hotel california
  15. Pingback: paris hotel
  16. Pingback: life insurance
  17. Pingback: world cup 2006
  18. Pingback: online betting
  19. Pingback: sports book
  20. Pingback: allstate insurance
  21. Pingback: credit cards
  22. Pingback: insurance agent
  23. Pingback: mortgage lenders
  24. Pingback: didrex 270
  25. Pingback: fico
  26. Pingback: free credit
  27. Pingback: stanley bookmakers
  28. Pingback: insurance leads
  29. Pingback: hydrocodone order
  30. Pingback: medication
  31. Pingback: master card
  32. Pingback: my credit report
  33. Pingback: national insurance
  34. Pingback: apply credit card
  35. Pingback: sheraton
  36. Esli Vy chitaete eto soobshenie znachit vasha gostevaya, forum ili blog popali v spamerskii spisok rassylok. Chtoby udalit’ svoi resurs iz etogo spiska prishlite ego url na email: antyspam@bk.ru Eto v vashih zhe interesah. Vse eshe mozhno popravit’. Nam nuzhny tol’ko zabroshennye resursy. Esli vash eshe razvivaetsya – my ostavim ego v pokoe.

  37. Pingback: mortgage refinance
  38. Pingback: world cup 2006
  39. At Crimeshare.net HELP IS AT HAND!

    Have you been trying to sell your timeshare week, points, holiday Club membership?
    Are you FEED UP with spiralling maintenance fee costs?!
    Are you sick of phone calls “out of the blue” with ridiculous offers?
    Do you simply want to GET OUT?!
    At Crimeshare.net we show you the fraudsters so you know you can trust US !!

    For a one time registration fee of $295 the value of your week can be redeemed within a six month period or YOUR MONEY BACK!

    8578dd352f839b24aa6748f8129f5947

%d bloggers like this: