Hacker News new | ask | show | jobs
by swombat 6205 days ago
Reading such a long article with such a moot point is a waste of time...

More seriously, the point of the article, from a skim, appears to be that "writing too many unit tests is a waste of time". Well, duh. Save 15 minutes of your life and pass on this one, methinks.

6 comments

Hi, I'm the original author. That wasn't the point I was trying to make at all - despite the attention grabbing headline it's really talking about the value of functional and integration tests.

In retrospect I wish I'd used a different title and skipped the first few paragraphs - I'd intended it to be a bit of humorous indirection making it sound like the post was going to be against automated testing whereas it is really very much in favour of it, but unfortunately people have taken it the wrong way.

The internet is filled with authors who do that trick. It's a bait-and-switch, and I know I don't like reading it.

People didn't "take it the wrong way." You did not clearly express yourself. If you want to talk about the value of functional and integration tests, then talk about that.

Hi Scott - I admit it was a cheap trick. This is the first time I've had something like this posted to an audience so I've had one or two things to learn!

I'd appreciate it if anyone interested in the post would skip the first few paragraphs and start at "Benefits of automated functional tests" since that was what I was intending to convey.

I think a better idea is to just edit your essay directly. Maybe even re-submit the edited version to HN - you may find people are more receptive to discuss the content you wanted to convey.
I wouldn't necessarily discard the trick altogether. However, I'd say that based on my experiences/intuitions, it only works for short posts, and you have to clarify the point of the post by the time you get to the second paragraph. The trick was simply not the right thing for such a long article.

Packaging really matters where blog posts are concerned... the hook needs to be crafted well for each article, or people won't bite.

I'd take scott's advice and just repost... many people will probably read it then, since the subject is relevant.

I've changed the title on the post and added an Update to the top of it. I'd rather not resubmit to hacker news since I think it's taken up enough attention already. Thanks to you both for the suggestions.
Too bad you didn't have the stones to stand by your original claim. Most unit testing is a waste of time. A crazy orthodoxy has arisen around it: never question the value of massive unit testing, just do it! Test-driven development is cumbersome and frequently useless. If you're really doing trapeze acrobatics you need to work with a net, but most of us are just walking down the street, in which case rigging up a bunch of elaborate safety netting is just overkill.

Commence downmodding in 3, 2, 1...

I would appreciate it if you would resubmit, as all the top comments here are complaints about a different (version of the) essay.

Generally, people like having their attention taken up, provided you follow their advice. :-)

Indirection? Misdirection.
I thought it was an interesting article. If you want to skip the long read, a better summary would be "you can save a lot of code and hassle by writing a few smart functional tests instead of a ton of unit tests."

I continue to assert that most unit tests are the same type of drudge work that good programmers try to avoid in other scenarios (data entry, text editing, email templates, deploy scripts, etc).

This is a pretty good quote though:

"I think sometimes we take for granted how fortunate we are as developers to be able to make such a direct impact on problems instead of being wholly dependent on others."

Thank you very much!
No, unit tests are the new API documentation.

If you're too lazy to write good docs, please, at least leave me some tests.

long article... moot point... unit & functional testing is important. My friend made an awesome analogy to the real world application here: http://app.arat.us/blog/?p=159