randallsquared comments on Coding Rationally - Test Driven Development - Less Wrong

25 Post author: DSimon 01 October 2010 03:20PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (82)

You are viewing a single comment's thread. Show more comments above.

Comment author: randallsquared 06 October 2010 04:09:00AM 1 point [-]

The main difference I see between those is that Norvig knew how to solve Sudoku problems before he started writing a program, while Jeffries didn't

When you already know exactly how to do something, you've already written the program. After that, you're transliterating the program. The real difficulty in any coding is figuring out how to solve the problem. In some cases, it's appropriate to start writing code as a part of the process of learning how to solve the problem, and in those cases, writing tests first is not going to be especially useful, since you're not sure exactly what the output should be, but it certainly is going to slow down the programming quite a lot.

So, I'll agree that Jeffries should have understood the problem space before writing many tests, but not that understanding the problem space is entirely a pre-coding activity.