Archive : debugging

If doctors were more like programmers…

… they would learn to debug the human body the way good programmers debug computer systems – by using an array of tools to gain an insight into the problem. And when the problem would prove too opaque, they would bring in their peers and brainstorm ideas. They would listen to their patients, embrace their [...]

Code Review and Static Analyzers

Consider the snippet below: unsigned int i; for (i = NUM; i >= 0; i–) {     … complicated logic    if (some condition) break;    … complicated logic } The loop would never terminate because ‘i’ can never be less than zero by virtue of being an unsigned integer. It took several days worth [...]