Posted on 22.05.2010 02:44 pm
While learning to program or a new programming language, the most important thing you can have, is knowing what the code you have in your hand would output.
With this knowledge, you should be able to see the next step, but there is a caveat to this power. As soon you modify the code you know the output of, to do whatever you wanted it to do, you loose the knowledge and step deeper into the land of the unknown.
The longer you stay there, the risk of writing code that does not work increases and you also increase the likelihood of creating a bug.
Experience with said language and programming in general increases the time you can spend in the land of the unknown and given enough experience, you can even write entire sections of code without compiling and make them work in the first try.
Though such cowboy antics can be fun, a responsible programmer should compile early and compile often.
My tip to you?
Write code you can incrementally test the values of. Even if you're writing feature X and you have written something similar before. Build it from the ground up, you will often be surprised that the value of some variable will not be as expected.
Bill the Lizard
- » Archive
Process time: 0.002084 seconds