You are only so smart. Once the complexity of the programming model reaches a certain point a debugger is necessary to validate and discover the true nature of a system. Often that point is quite low.
Rob Pike: The Best Programming Advice I Ever Got.
11–20 of 142 posts
Re: Rob Pike: The Best Programming Advice I Ever Got.
#12Re: Rob Pike: The Best Programming Advice I Ever Got.
#13You are only so smart. Once the complexity of the programming model reaches a certain point a debugger is necessary to validate and discover the true nature of a system. Often that point is quite low.
Re: Rob Pike: The Best Programming Advice I Ever Got.
#14I think if you are just pushing through (brute force) to fix a bug "without thinking" then you will never figure it out. Also, "thinking before" as the article claims, without actually looking at the code or stack traces, that's just mental brute force. Pretty much it's a combination of both: you look at the code, you think about what's happening and what could go wrong, you look at the code again, you think some mor…
Re: Rob Pike: The Best Programming Advice I Ever Got.
#15You are only so smart. Once the complexity of the programming model reaches a certain point a debugger is necessary to validate and discover the true nature of a system. Often that point is quite low.
Re: Rob Pike: The Best Programming Advice I Ever Got.
#16The time to find a bug with a debugger has a much tighter distribution than the time to find one by thinking about the code. There are some problems that you just can't get to the bottom of by thinking.
By having one person take each path, you get the advantages of both. It might seem that a single programmer should be able to achieve the same by switching between the two approaches, but the cost of context switching is so great that it will be more like starting again each time. So it's really hard to know when to stop thinking about it and to get the debugger out.
The advice that once you find the bug you should work out what the problem really is definitely holds solid, though.
Re: Rob Pike: The Best Programming Advice I Ever Got.
#17Ken Thompson said that never happpend; they didn't need to look at each others code, because they were all "pretty god coders": http://www.informationweek.com/software/operating-systems/qa...
Your link is discussing the development of Unix, which was before Rob Pike came on the scene. Rob Pike is discussing an incident that happened a number of years later when Rob would have been significantly junior to Ken. There is no reason that both versions of history can't be true.
Re: Rob Pike: The Best Programming Advice I Ever Got.
#18I think if you are just pushing through (brute force) to fix a bug "without thinking" then you will never figure it out. Also, "thinking before" as the article claims, without actually looking at the code or stack traces, that's just mental brute force. Pretty much it's a combination of both: you look at the code, you think about what's happening and what could go wrong, you look at the code again, you think some mor…
Actually, I think it's a bit more subtle than that. By using stack traces and debuggers etc, I can come up with a working and correct solution. But, by thinking through the problem at a deeper level I can come up with an improved design which may simplify future programming and avoid similar bugs.
Re: Rob Pike: The Best Programming Advice I Ever Got.
#19Re: Rob Pike: The Best Programming Advice I Ever Got.
#20You are only so smart. Once the complexity of the programming model reaches a certain point a debugger is necessary to validate and discover the true nature of a system. Often that point is quite low.