4 ms·
An Interview with Brian Kernighan (2000)
- krat0sprakhar 11y ago> K: I don't use fancy debuggers, I use print statements and I don't use a debugger for anything more than getting a stack trace when the program dies unexpectedly. Ha! Who would've thought that the author of so many books on software engineering prefers using print statements for debugging. Great interview!
- cremno 11y agoFrom “UNIX For Beginners” (2nd ed., 1979) written by him: >The most effective debugging tool is still careful thought, coupled with judiciously placed print statements. However the previous sentence is: >The debugger adb is useful for digging through the dead bodies of C programs, but is rather hard to learn to use effectively.
- weland 11y agoIt has an added, important advantage: it allows you to examine program flow without interrupting it. Sometimes that's outright essential (e.g. you're debugging ISRs and breakpoints screw up everything; you can't printf from an ISR, obviously, but you can at least toggle some signal to examine on a logic analyser or flip a flag that you print back in the main loop); other times it's just easier to see where the difference between "what you wrote" and "what you think you wrote" is when you can follow the program's output as it's running, rather than through a sequence of breakpoints.
- vorg 11y agoHis view on advances in Computer Science in the future... > we make a lot of progress, we are able to undertake bigger projects, we can build things which are much more interesting and sophisticated than what we could do 10 years ago. [...] But the amount of messy, intricate, awful code that doesn't work very well and that's underneath all of that has also increased enormously. In some sense I guess we'll continue to make progress, but it'll always be kind-of grimy and not-really-done yet. Because people always take on more than they can reasonably handle, they're always overreaching, and they seem never to go back and clean up the stuff that they did before.
- lordnacho 11y agoI wonder what he thinks of the fact that one of his bit twiddling algorithms is standard fare at job interviews.
- coldtea 11y agoWell, it's not like he hasn't created stuff that's standard fare at UNIX, Linux, businesses, modern OSes, education, etc. An algorithm being a standard fare at job interviews looks to be on the bottom of such an accomplishment pile.
- versteegen 11y agoA month ago this (recent) video interview with Kernighan was posted here: https://news.ycombinator.com/item?id=10080956 https://news.ycombinator.com/item?id=10080956 Notice that since then, the rest of that video interview has been posted: https://www.youtube.com/watch?v=QFK6RG47bww https://www.youtube.com/watch?v=QFK6RG47bww