3 ms·
The idea that we need to get the code correct in one-go is questionable. Any coder only has limited slots for short-term memory. Spending some of those slots ke
by hzhou321 9y ago
The idea that we need to get the code correct in one-go is questionable. Any coder only has limited slots for short-term memory. Spending some of those slots keeping track of syntax balancing is a questionable advice.
Instead of getting students comfortable with the syntax, I try to get students comfortable with syntax errors. Syntax errors are often trivial to fix after accumulating some experience; and as one gets experienced, they (syntax errors) tend to diminish anyway. However, the fear of syntax error -- just like the fear of water when learning to swim -- is very difficult to overcome and can be detrimental.
There is no logical reason to fear syntax errors, and there is no logical reason to worry about syntax when we are working with semantics.
Of course, we shouldn't accumulate syntax debt after hundreds of lines. We should organize our code into isolatable and testable units that fit into quick try/test and feedback cycles -- but that is common sense.