Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are really great programmers known to use unit testing?

Tags:

unit-testing

I was wondering if really great programmers (Knuth, Kernighan, Torvalds, etc) are advocates of extensive unit testing. I can imagine large projects they've worked on adding them to deal with collaboration scaling issues, but did, say, Knuth use unit tests in TeX? And this doesn't weigh on my decision to use them, it's just a matter of curiosity.

like image 376
Vince Avatar asked Aug 12 '09 15:08

Vince


2 Answers

In this interview Knuth explains he's not a fanatic unit-tester:

"unit tests" appeals to me only rarely, when I’m feeling my way in a totally unknown environment and need feedback about what works and what doesn’t

That's in the same response where he explains how he won a Stanford programming competition (race) while being the only contestant to use punched cards on a batch mainframe -- all others were using these new-fangled interactive terminals on a timesharing system, so of course the second place finisher took over an hour longer than Knuth did.

If (perhaps with the exception of exploratory programming in a totally unknown environment) you're more comfortable with punched cards and batch mainframes than interactive terminals and time sharing, I think it will indeed follow that unit tests won't fit your style;-).

like image 81
Alex Martelli Avatar answered Oct 04 '22 20:10

Alex Martelli


Joshua Bloch does:

InfoQ: Do you believe that other tools and processes such as unit testing, Test-driven development or pair programming also aid in programming effectively in Java?

Joshua Bloch: Absolutely. Unit testing is key. And writing your tests first is a great thing.

like image 31
Jon Skeet Avatar answered Oct 04 '22 19:10

Jon Skeet