Thursday, 31 March 2011

Summer/Spring?

Who would have known that the chilly night yesterday would be the last night of winter?

Today the sun is out the fog has cleared and the clouds are puffy once again!

We await the first sound of thunder!

Sunday, 13 March 2011

Bugs

Systematic bugs: Due to some misunderstanding of the syntax or grammar of the programming language.

Random Bugs: Your bugs that you didn't know about.
Defined as either problems WITH your thinking or problems that materialized from the process of turning thinking into code.

Problems with thinking just have to do with unclear thinking, or even misunderstanding your own thinking.
Problems from thinking to code have to be sorted out by making the process as transparent and traceable as possible without ambiguity, so that little issues all become apparent.

Debugging aids are not optional. They are actually necessary, yet in the coding frenzy we have to put everything down on the source files, we forget that we must be able to repeat all the thinking in its entirety. Now, some people are less prone to human errors, but given a long enough program, everyone will make errors.
Testing is useful only if you know what you're doing. While it closes the gap between actual results and desired results, it cannot be a substitute for transparency in the coding process.

Combining testing and the coding/documentation process gives you the ability to detect all types of bugs. If done perfectly.

Now, even documentation may fail, because even documentation may be wrong. In this case, we try to catch these errors early by debugging certain blocks of code completed. The time taken to find and fix the bug tends to be smaller in a smaller piece of code.

Printing everything out is a classical approach to detect run-time errors and if the program crashes, we get to know where it crashed.

I am trying to implement all this, starting with small coding projects.

These lessons were learned in a painstaking debugging effort, in which I know that these things are the minimum that must be done to make a program generally correct.