Follow me on Twitter | Subscribe by: Email / RSS
When it comes to reading code (mine or someone else’s, it doesn’t matter; reading is reading), I have a really short attention span. I don’t want to spend a lot of time analyzing the code to figure out what it’s doing. I want to treat the code just like the sun: glance to get a sense of it, and then look away. This is especially true when debugging. Most of the time you spend debugging is trying to find the cause of the problem. Once you have found the cause and collected your data/evidence, the actual task of fixing the problem is pretty trivial. When I debug, I’d like to instantly know what the code is doing. Any extra time I spend figuring out what the code is doing is really annoying, even if it’s just a few seconds. Here are some things I’ve learned over the years that could help you save time. Some might see this as another “coding style” article, but it really isn’t. It’s merely a list of things you can do when writing code to help you in your debugging efforts.
Continue reading...
Tuesday, July 6, 2010
8 Comments