It is easier to write an incorrect program than understand a correct one.
Sentiment: NEGATIVE
No matter what, the way to learn to program is to write code and rewrite it and see it used and rewrite again. Reading other people's code is invaluable as well.
Programming is usually taught by examples.
I think it goes back to my high school days. In computer class, the first assignment was to write a program to print the first 100 Fibonacci numbers. Instead, I wrote a program that would steal passwords of students. My teacher gave me an A.
But for me, it was a code I myself had invented! Yet I could not read it.
Every program has two purposes: The one for which it was written and another for which it wasn't.
The first programming assignment I had in high school was to find the first 100 Fibonacci numbers. Instead, I thought it would be cooler to write a program to get the teacher's password and all the other students' passwords. And the teacher gave me an A and told the class how smart I was.
Well, you might as well imitate your own program because if you don't, someone else will.
We are built to make mistakes, coded for error.
An error doesn't become a mistake until you refuse to correct it.
There are two ways to write error-free programs; only the third one works.