How I stopped writing awesome code

added by jhovgaard
6/9/2012 3:57:01 PM

13 Kicks, 1041 Views

I don't write unit tests, interfaces, use IOC or heavy ORMs. Yet I'm not a brogrammer.


2 comments

dpeterson
6/11/2012 8:47:34 AM
I think a good part of this can be contributed to YAGNI. As you said, you spent a lot of time writing tests for code that didn't need to be tested, and code for flexibility you never take advantage of. That's one reason I prefer BDD/acceptance testing vs unit testing (covering a large subset of functionality with one simple test, as you described in your post), and iterative development. In an iterative development situation, especially taking advantage of BDD, you can concentrate on just writing the code needed to meet specifications. If you want to add IoC or other such features, you do so in a refactoring rather than from the start. It has saved me a lot of time following this approach. Glad you've also found something that works better for you!

timbolt8
6/12/2012 9:35:17 AM
I personally like simple as well. But you don't want to cross that line from simple to lazy or cutting corners. This leads to mistakes and unmanageble code and as the project expands, like it always does, you may get to a point where you can't go back. I've come across this a couple times.