| Wow. It feels like I wrote that article I agree with it so much. There are a few things I disagree with: 1. I'm not a TDD purist but I do think a red/green TDD cycle does strongly encourage all of the following things to happen in a more natural, flowing way: "Tell yourself what you’re going to do, and then implement that sentence. When you’re finished, take that sentence and write a test, then just move on."
Coding before testing isn't the issue as much as the potential for needing to change code just to be more testable (an efficiency issue). 2. No sale on the idea of documenting every piece of code; I truly feel like doc comments muddy the contents of the file, plus resulting documentation is less likely to be read than code and more likely to fall out of sync with the contents of the code. Completely separate documentation is hard to keep updated. It's often something to maintain with often no tangible benefits unless you are churning developers like crazy. Certainly it might be reasonable to document high-level interactions for complete view of the system but documentation at lower levels seems an increasingly bad value proposition to me. In a perfect world, sure... but in real life there are deadlines and tests+code almost always serve as enough of a developer guide to understand clearly. If not, I'd rather spend time refactoring instead of writing docs. For the few new developers brought on, reviewing the system in a paired programming manner is a good way to get to know them and ramp them up at the same time. Parts of the system that are difficult for them to comprehend might warrant refactoring attention. 3. "If something is performed more than three times in a 4 hour span"
It's difficult to make a wholesale suggestion on things like that. If said task is 1 second clicking the "get mail" button and automation is auto-checking every n minutes, automation can be a net loss in terms of productivity. I think the XKCD[1] chart is probably a better measure ;)
Anyhow it's definitely better to not waste loads of time doing things you do often, and the more often you do something the more likely it is that automating the task would pay off; just don't do it with an utter lack of discretion. Some typos in the post:
- Stray period before "I just call it by what it was: A big ball of mud."
- "Simple isn't sexy." should maybe be "Complex isn't sexy" or "Simple is sexy"
- "internet" (proper noun)
- "explaining just how the interact with" s/the/they
- "english" (proper noun) Very thought-provoking and fun read (lots of laughs)- I really look forward to future posts! 1. http://xkcd.com/1205/ |