What are the three common mistakes made by beginner programmers?

View other answers to this thread

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

Ivan Bacher's photo

1) Missing semicolons

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

3) Writing code with no indentation

😁

Show +1 replies
Kamen Minkov's photo

Front-end & web game developer

Steven Ventimiglia That's borderline cringy. Even if for some reason you're using spaces and even if the editor/IDE doesn't indent blocks automatically as you type, why the hell would you mash Space n times instead of just pressing Tab?

Steven Ventimiglia's photo

Creative Technologist & Sr. Front-End Developer

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.

Want to read more?

Browse featured discussions

© 2020 · Hashnode