It's time to ditch Medium for good! 🌈⚡️

Introducing Devblog by Hashnode. Blog on your domain for FREE. Highly customizable and optimized for developers.

Learn more

What are the three common mistakes made by beginner programmers?


1) Missing semicolons

2) Copy/paste from Stackoverflow without understanding the code and expecting everything to work.

3) Writing code with no indentation


Show all replies

Because that person would be mistaking precision with effort. ;) They may not even realize that it's indentation, which is properly managed by tabs. You either indent or space.

All I need to do is force them all to work within a Python environment so they can find where code was broken by using spaces instead of tabs. Most of the time, they will call this a "whitespace issue", however, I feel the issue is more about wanting to do things "our way"... even if it's not the correct way. It's one of the reasons I love Golang; either your syntax will be consistent and useable, or it ain't building squat.

Then, once you get past the debate of Spaces vs Tabs; it becomes about two (2) tabs, "...nesting statements too close to each other", and four (4) tabs ,"...wasting too much space."

I use tabs, and I even go a step further. Two tabs for HTML/CSS/SCSS. Four tabs for JavaScript. The reason is that I feel less of a need to have my static code spaced as much, but like to have blocks of functionality to be a bit more "aired out" - also, doing the same with PHP, Python, Go, etc.

Reply to this…

(6 answers) Take me to the question