4 ms·
On Ken Thompson: Regarding his programming style ... hardly ever uses unit tests, starts his projects by designing the data structures and then works bott
by kaffeinecoma 14y ago
On Ken Thompson:
Regarding his programming style ... hardly ever uses unit tests,
starts his projects by designing the data structures and then works bottom up,
with throwaway test stubs.
Sounds to me like he does use unit tests, but then throws them away after he's content that the code is working. I think this is what most people did for non-trivial code before unit testing became a culture.
- chubot 14y agoYup, I remember when I was learning Python, before I ever wrote any real tests, all my modules would be littered with: if arg[1] == 'test1': print func1(a) elif arg[1] == 'test2': print func1(b) elif arg[1] == 'test3': print func2(a) ... Eventually I found it was way easier to stick this in a _test.py file :)