I have a similar feeling towards TDD. I use test driven developments for those parts of my code that needs it. I recently had to create a function that did some complex calculation. TDD was great for that, because I had a set of known inputs and a set of known outputs. It made sense to write the test before the code. But I will not write trivial tests just to make the unit test coverage increase. I've seen tests writ…
A good reason to write tests for seemingly trivial code like that is if you're implementing an API that others will use. I've re-factored a class that implemented a public API and been saved by trivial tests that pretty much just tested getters/setters. But there's a time and place for everything. I rarely pass 95% test coverage, the remaining 5% are usually not worth pursuing.
The Duct Tape Programmer
11–20 of 43 posts
Re: The Duct Tape Programmer
#12I work on enterprise software in a financial company, and IMO, this quote from Zawinski would lead to a dangerous short-term view in that context: "unit tests are not critical. If there’s no unit test the customer isn’t going to complain about that." When you work in enterprise software, this approach might work on the first project, maybe the second, but eventually a point will arrive where a requirement will take l…
If you need unit tests, write unit tests. If you don't, don't. So in your case you would notice that for iteration 3 you need some unit tests. Then you can write them in iteration 3. You didn't need them in iteration 1, hence no need to write them in iteration 1. The concept of technical debt will probably inserted into the discussion here. I think it is irrelevant. Yes, there is always technical debt. For example, I…
Let's admit it, most devs don't test. There. I said it. Most devs just want to write more features, more new code, more design patterns, more cool algorithm.
Dev 1: "Testing? Testing is not my job. Go ask the QA to do it".
Dev 2: "Yeah... we're just not born to do testing, it's just not how our brain is wired".
Dev 3: ... more excuses why dev shouldn't test ...
I get it that devs aren't good at usability testing. But the majority devs I met don't even want to test their own code. Some don't want to write unit-test, some don't even want to test the functionality of the code they just wrote.
sigh
Re: The Duct Tape Programmer
#13Okay, first off, this article is interesting but very ancient. And I remember the shit storm it caused quite fondly :-) A couple of obvious points have been made at the time. Yes, it's a gross generalization. Yes, somewhere in there is an uncomfortable truth that is liable to make a couple of Java and COM artists very angry. At the end the whole point boils down to the overused saying: real programmers ship. It's as…
It boggles my mind that an article from barely over a year ago counts as "very ancient", that people clamor to add "(2006)" to article titles, etc. If more programmers actually read stuff that was published longer than (gasp!) five years ago, perhaps there would be less naive noise about how New Methodology X is going to finally fix all these nagging issues in software development once and for all.
Re: The Duct Tape Programmer
#14Okay, first off, this article is interesting but very ancient. And I remember the shit storm it caused quite fondly :-) A couple of obvious points have been made at the time. Yes, it's a gross generalization. Yes, somewhere in there is an uncomfortable truth that is liable to make a couple of Java and COM artists very angry. At the end the whole point boils down to the overused saying: real programmers ship. It's as…
It boggles my mind that an article from barely over a year ago counts as "very ancient", that people clamor to add "(2006)" to article titles, etc. If more programmers actually read stuff that was published longer than (gasp!) five years ago, perhaps there would be less naive noise about how New Methodology X is going to finally fix all these nagging issues in software development once and for all.
Peter Seibel tried to "unpack some of the context," it's probably a good place to start for anyone who's interested:
http://gigamonkeys.wordpress.com/2009/09/28/a-tale-of-two-re...
Re: The Duct Tape Programmer
#15I have a similar feeling towards TDD. I use test driven developments for those parts of my code that needs it. I recently had to create a function that did some complex calculation. TDD was great for that, because I had a set of known inputs and a set of known outputs. It made sense to write the test before the code. But I will not write trivial tests just to make the unit test coverage increase. I've seen tests writ…
You set the code coverage bar high enough.
While I disagree with the said VP or Lead or Senior people, but sometime we have to admit that not many developers in our industry care about quality and have the attitude of test is important.
I get that shipping is more important than anything else. But I found people often use that excuse for not writing test. Besides... the definition of "Done" pre-TDD/Agile is "I wrote my code albeit not thoroughly tested, now let me throw this pile of crap over the wall to the QA".
It's just how our industry used to work until recently.
Re: The Duct Tape Programmer
#16> Remember, before you freak out, that Zawinski was at Netscape when they were changing the world. They thought that they only had a few months before someone else came along and ate their lunch. A lot of important code is like that.
It makes sense that, under these circumstances, their #1 priority was to ship, to bring a product to market before others did. Even if the first version sucked, it would still be better than no product.
Unfortunately this is exactly the kind of situation that gave us IE, and we still have to deal with the after-effects today. I wonder if this would count as an argument against the often-touted claim that "competition makes products better". It sure didn't cause browsers to be better in the late 90s. In fact, we didn't start to see decent browsers until after the browser wars, after IE's dominance had been established.
Re: The Duct Tape Programmer
#17Earlier quoted context omitted.
If you need unit tests, write unit tests. If you don't, don't. So in your case you would notice that for iteration 3 you need some unit tests. Then you can write them in iteration 3. You didn't need them in iteration 1, hence no need to write them in iteration 1. The concept of technical debt will probably inserted into the discussion here. I think it is irrelevant. Yes, there is always technical debt. For example, I…
Guess what most developers do? Let's admit it, most devs don't test. There. I said it. Most devs just want to write more features, more new code, more design patterns, more cool algorithm. Dev 1: "Testing? Testing is not my job. Go ask the QA to do it". Dev 2: "Yeah... we're just not born to do testing, it's just not how our brain is wired". Dev 3: ... more excuses why dev shouldn't test ... I get it that devs aren't…
Proper unit tests with broad coverage are foundational to both of these ideas.
Re: The Duct Tape Programmer
#18Earlier quoted context omitted.
It boggles my mind that an article from barely over a year ago counts as "very ancient", that people clamor to add "(2006)" to article titles, etc. If more programmers actually read stuff that was published longer than (gasp!) five years ago, perhaps there would be less naive noise about how New Methodology X is going to finally fix all these nagging issues in software development once and for all.
Thanks for the demote, but I wasn't bashing the article on grounds of its age. If you had actually bothered to read the rest of my comment it would have become obvious that I was referring to the fact that people dig old stuff up and present it as news when the discussion itself has already moved on towards more insightful conclusions a few months ago.
It makes sense when dealing with surface details in rapidly changing web APIs, but otherwise that approach condemns programmers to starting from zero and wasting time re-discovering fundamentals.
"Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes." — Richard Hamming
Re: The Duct Tape Programmer
#19Earlier quoted context omitted.
It boggles my mind that an article from barely over a year ago counts as "very ancient", that people clamor to add "(2006)" to article titles, etc. If more programmers actually read stuff that was published longer than (gasp!) five years ago, perhaps there would be less naive noise about how New Methodology X is going to finally fix all these nagging issues in software development once and for all.
In Udo's defense, this article did cause a stir. That does make it seem like "ancient" history... Peter Seibel tried to "unpack some of the context," it's probably a good place to start for anyone who's interested: http://gigamonkeys.wordpress.com/2009/09/28/a-tale-of-two-re...
Re: The Duct Tape Programmer
#20I ask you, in what other industry would doing shoddy workmanship be considered an insightful viewpoint? Would you be happy if you discovered you'd hired "The Duct Tape Plumber" to fix a leak in your house?
Furthermore, I've actually known real people like the ones Joel Spolsky idealizes: "He is the guy you want on your team building go-carts, because he has two favorite tools: duct tape and WD-40." Spolsky is wrong wrong wrong: you do NOT want this guy on your team. He's the guy who ruins bearings because he uses WD-40 instead of a real lubricant, the guy who spends 40 minutes crafting a duct tape solution rather than take a 20 minute drive to O'Reilly's to get the right part. I had a guy like this work on a truck I used to own; we accidently bought the wrong heater core but rather than get the right one, he figured out it could fit backwards if we cut the panels around it and routed the hoses around it in a loop, and then he covered it in duct tape. The problem is that it wasn't really air tight, so it was no good as a heater because it didn't force the air through. I had to redo it myself with the right part, and had to reattach all the panels he cut.