Earlier quoted context omitted.
If you do that, you'll run a very considerable risk of wonder why version 2.0 of your product is taking so damn long to ship. The answer: all of the things you punted, ignored, assumed, patched over, and otherwise haphazardly threw together in version 1.0. Now all these have set your code in concrete, and you have to remove half the foundation to get them back out.
But all that refactoring will be easy because of the comprehensive unit test suit you wrote. Oh wait...
The Duct Tape Programmer
101–110 of 123 posts
Re: The Duct Tape Programmer
#102Joel does not mention that Netscape code was so bad that it cost them serious credibility and customers. As a Netscape user back in the day, I did not care whether Netscape used unittests or duct tape, but I switched from Netscape to Internet Explorer because Netscape was so buggy it was painful. Over a few years Netscape code became so unmaintainable they had to start from scratch, which cost them years. Joel wrote…
The biggest reason (by far) that Netscape faded into obscurity, though, is that Microsoft bundled IE with Windows.
More importantly, these strategic decisions about the product were not made by guys like jwz. jwz is a hacker. Like many hackers, his opinion was often at odds with the strategies of the Business People in charge.
I don't think it's fair to use these strategic missteps to discredit jwz or Joel's point about the balance between purity and pragmatism in writing code.
Re: The Duct Tape Programmer
#103Joel does not mention that Netscape code was so bad that it cost them serious credibility and customers. As a Netscape user back in the day, I did not care whether Netscape used unittests or duct tape, but I switched from Netscape to Internet Explorer because Netscape was so buggy it was painful. Over a few years Netscape code became so unmaintainable they had to start from scratch, which cost them years. Joel wrote…
Re: The Duct Tape Programmer
#104Earlier quoted context omitted.
No it isn't. The Second System effect is about wanting to put in all those features into version 2 that you left out of version 1.
Yes, which is what the parent said: "all of the things you punted, ignored, assumed, patched over, and otherwise haphazardly threw together in version 1.0"
The Second System Effect is specifically about new features.
Re: The Duct Tape Programmer
#105It's nice to see Spolsky get this enthusiastic about something other than his marketing, and I'm sure Peter Seibel agrees. But he negates his entire point at the end. After going on about how great duct tape programmers are, he says, don't think that means you can be one, because they're magic. (He says "pretty", but in this case pretty means magic.) To wit: Duct tape programmers have to have a lot of talent to pull…
Absolutely agree. I work with a "duct tape" programmer and you couldn't pay me enough to touch his code. I'm so sick of someone asking me what's going on with RelayHandler's mda function and what do the variables "a", "sb", and "c" stand for? I kid you not... I don't always agree with Joel and this is one of those times where I absolutely do not agree. Duct tape programmers can stay the hell away from me.
I think "duct tape programmer" should be derogatory, while "practical programmer" or "pragmatic programmer" would be more apt for Joel's idols.
Re: The Duct Tape Programmer
#106I call bullshit. I've worked with some "just get it done programmers'. Have you tried to go into code that someone threw in to just make it work. Abstraction, interfaces and unit tests are not a leisurely activity for academic developers. We use them to make the code less complex and maintain. The cost of development isn't the initial code base, its the fixes and additional features people want AFTER the initial rele…
"Just get it done programmers" are a scourge. Most of them have no business deciding which corners to cut, let alone how much to cut them by. There is definitely a balance to achieve. Are you going to ship a "3.0?" Are you building a company to last 5 or 10 years? Or one to last as long as it takes to make the money back and sell? Is this a product you're prepared to get dirty fighting competition with or do you just not care? You never want to over-engineer but cutting too many corners is far worse. If you're a low investment startup with a decent idea, do you honestly think you can put out something that works 50% of the time and even have a shot at a 2.0? Maybe if you've got a proven wizard that spins money out of thin air you duct tape the whole thing like he thinks you should.
If you have investors and you slam out a mediocre 1.0 in like 3 months, will they really sit back for 12 months while you "engineer" 2.0? Or do they want 2.0 in another 3 months?
Re: The Duct Tape Programmer
#107"He is the guy you want on your team building go-carts, because he has two favorite tools: duct tape and WD-40." This phrase comes from watching too much Eastwood (Gran Torino ~ http://www.imdb.com/title/tt1205489/ ) The idea behind it is you can jury-rig/fix almost anything with WD40 & duct tape alone without the need for fancy expensive tools.
Except that both of those tools are the absolute worst at their respective jobs! Standard duct tape uses an awful adhesive that depending on the humidity turn into a gummy mess or desiccates into flakes -- either way leaving a difficult residue and not actually holding. The loose right-angle weave of the coarse fibers means that it has zero shear strength on the most common axes, and is prone to splitting when under…
Re: The Duct Tape Programmer
#108Earlier quoted context omitted.
Still, in 3 years the company might already be bankrupt, and nobody would care about tests anymore. Bankrupt is maybe too extreme, but the particular code module you spent 3 months writing tests for might be replaced by some open source solution or just not being needed anymore. I kind of see your point, but I find it difficult to deduce a binding rule from all of this. Sometimes it is important to have tests, someti…
I agree that there's no overarching rule that makes the tradeoffs easy to analyze. I will, however, say that after working on the same code base for over 7 years now, and watching the company grow from 15 employees to 400, I can't imagine ever working at a place that didn't have a large investment in unit tests, tech debt elimination, automation, etc. Without that stuff, our products almost certainly would have colla…
A lot of unit tests make sense, but I suspect they also offer plenty of opportunities for idling time away.
Re: The Duct Tape Programmer
#109Earlier quoted context omitted.
I agree that there's no overarching rule that makes the tradeoffs easy to analyze. I will, however, say that after working on the same code base for over 7 years now, and watching the company grow from 15 employees to 400, I can't imagine ever working at a place that didn't have a large investment in unit tests, tech debt elimination, automation, etc. Without that stuff, our products almost certainly would have colla…
I am not actually against unit tests, but I have seen it being taken to unhealthy extremes. For example at some companies there are automated tools that check that every method has a unit test. In the end people write unit tests for Java getter and setters and so on. Mind numbing as that task is, people also end up writing bad unit tests just to silence the tool. A lot of unit tests make sense, but I suspect they als…
If the test is testing something (like a getter or setter) with basically no chance of breaking, then it's a waste of time. If the test is likely to be fragile or non-deterministic, it's a waste of time. If the test is just too hard to write, and it's not too hard to just test by hand, then automating it is probably a waste of time and you should just QA it by hand every so often.
Finding the right balance tends to come back to the old experience and skill thing: you need to have some intuition about which tests will give you the most value (because that part needs to be rock-solid, or because it's hard to get right, or because it's high-change) and which tests need to be thrown away or never written because they aren't worth it.
Taking any development process too far tends to work out poorly, and taking any metric (like test coverage) too seriously is always a bad idea. That said, I've rarely seen unit testing taken way too far; not testing enough and ending up with buggy, regression-riddled software is a far more common failure mode.
Re: The Duct Tape Programmer
#110Earlier quoted context omitted.
I disagree with your statement that a codebase without tests cannot safely be refactored. I've been refactoring code for 20+ years, the overwhelming majority of time without any automated tests, and I'd say offhand 99% of the time it causes no bugs, and in the occasional case where it does cause a bug (because I am imperfect and sometimes make mistakes), I almost always soon find it during the same coding session and…
Amen, It's nice to hear someone with experience from before the "Unit Test is compulsory" explosion. Programmers should always test their work, but testing comes in much more of a diverse range than mere Unit Tests. There are plenty of cases where Unit Testing is 'embarrasingly'[1] appropriate. These pin-up applications blinds Testing advocates to the fact that Unit Tests are often inferior to other methods or simply…
and agreed, there are situations where like you said it's embarrassingly appropriate to have tests. To me the classic case is where you are publishing a code library with thousands of real users across the internet, with real apps built against it already, themselves already in production, etc. It's probably downright stupid of the maintainer to not have a suite of automated tests they can execute, and must pass, before every release, to ensure no regressions. So the maintainers can catch them, and resolve them, before it makes apps break downstream.
But the whole 'you must write tests always, before any application code' thing strikes me as insane and masochistic. :)