Strangely enough, back in school when I was forced to take Cobol, it was virtually impossible to make mistakes in that language. Every single program I wrote in that language compiled and ran properly the first time.

Of course, I never used the language since. Not that I did not like programs that compile and run the first time. Just that I could never write anything useful in that language (that is not to say useful programs cannot be written in Cobol, rather the type of programs I write cannot).

It is actually an experience of enlightenment that programs tend not to compile the first time (and the second, third,...). The computer does not care about hurting your ego, it reminds you you have one and keeps you humble. And that is enlightenment.

Incidentally, I have been programming since 1965, and I still get compile errors. So don't feel too bad when you do. ;)

At least I have developed a method to minimize it, and to make it easy to find the problem. The trick I use is coding in tiny increments. Write a line or two of code (or maybe 10 when programming in assembly language, compile. Write another line or two, compile. And so on. When a problem occurs, I know exactly which line or two to look at.

This technique would have been impossible ten years ago when compilation easily took half an hour. But nowadays it takes seconds. Any time "wasted" on extra compilation is well worth the tearing out of hair trying to figure out which of the ten thousand lines of code is (are) wrong.