Reading Code Is Hard, Part Two- June 15, 2004 I was thinking about this a bit more and talking with Larry Osterman yesterday, and I came up with some perhaps slightly more germane tips on how to read and debug code that you didn't write. First, it is highly likely that the machine code you're debugging will not match the source code -- either because you've simply got outdated sources, or because the optimizations have been so severe as to swiss-cheese the relationship between the source and the binary, or because you've got bad...http://blogs.msdn.com/ericlippert/archive/2004/06/15/reading-code-is-hard-part-two.aspx Reading Code Is Hard- June 14, 2004 Escalation Engineer JeremyK asks in his blog this morning: how do you teach people this &8220;art&8221; of digging deep very quickly into unfamilar code that you had no hand in writing I myself, I come from a very traditional process of learning how to code, by sitting down and writing it. I am struggling with how to tailor a delivery to focus on reading vs. writing source code. To me the only way you can be truly efficient in this process is by having written code yourself. No kidding..http://blogs.msdn.com/ericlippert/archive/2004/06/14/reading-code-is-hard.aspx Aargh! Part Seven- June 4, 2004 Q: How do pirates keep their socks from falling down A: Thumbtacks. I am insanely busy with bug fixing and performance testing today, so once more I'll dip into my endless archive of rants about irksome coding practices I've seen one time too many. Gripe 8: Assert the truth, the whole truth, and nothing but the truth Debug assertions should always describe invariants -- conditions that should always happen no matter what. They both help document your program, by making your invariants clear,...http://blogs.msdn.com/ericlippert/archive/2004/06/04/148620.aspx |