The novice programmer and his mistakes

The novice programmer and his mistakes

Seneca the elder, a famous Roman rhetorician who would probably be employed by many modern politicians, used to say errare humanum est, which means more or less that it is a human thing to err. Yes, “St. Augustine echoed him, and quickly added,” but to persist in error voluntarily is a diabolical thing. A few centuries later, his “three pennies” was added, As always, by the astute Leonardo da Vinci: who thinks little, errs a lot. As you can see, the issue of error and error has stirred emotions for many centuries, and sometimes provoked very serious armed and religious conflicts.

But what does that have to do with programming? More than meets the eye. Bugs or, as anyone prefers, bugs, this is something that very annoys programmers, especially when they are difficult to identify. But, unfortunately, mistakes do happen, and they probably will. Why? I refer once again to Seneca the elder’s sentence. Half the misery if bugs don’t affect people’s safety or lives. However, this does not always happen, as we already wrote in the article ghostly bugs, that is, small errors, and big disasters.

This time we deal with the mistakes of novice programmers, which often result from ignorance, too much self-confidence, and sometimes simply from laziness. Here’s a short list of rookie mistakes and omissions. This does not concern me-you think-after all, I read the manual for C++, Java, Python or something else five times. Really? Congratulations! So in between devouring your next book on programming, read our list-a cautionary tale.


Endless planning or lack thereof

Quick quiz. What do you associate with a novice programmer?

  1. Someone who starts laying out a list of requirements for the employer.

  2. With a person at the beginning of the road with obstacles.

  3. A guy who’s looking for someone else’s job.

  4. With a sympathetic person who often goes to extremes.

We’re betting on the last answer. Extreme is really the key word for a beginner programmer. An example of this extreme is the endless planning of the project, because on the internet they constantly hammer into the head that planning is important. So the young coder sits and thinks, combines, prepares different variants of the project, changes, deletes and restores back. Until one day it turns out that it has already been 20 years on this planning. What about the project? It wasn’t, it isn’t, and it probably won’t be.

The second extreme is the lack of any stage of preparation. Somehow it will be! The programmer immediately sits down to code, and lines of code fly out from under his fingers like a sleeve, as if they wrote themselves. At least in the imagination, because sooner or later such an inexperienced coder will stumble over his “somehow it will be”.


Copying code snippets

The best friend of an aspiring programmer? Mr. Copy / Paste. Nothing solves a code problem as quickly as copying it. Just fire up Stack Overflow or search on other portals, and you will definitely find the right piece of code. Then all you have to do is stick it in the middle of the program, and that’s it. How does that work? How should I know? It’s working! And so you paste one fragment after another, not understanding that the work of a programmer is a creative activity, and not a reproductively pasting fragments found on the internet. It’s worse if something goes wrong later. How do I fix this? I don’t know, I’m just pasting!


Unsubscribing comments

Why the bloody comment, when you can immediately see how it works and what is in my code! It is a pity that this opinion is not shared by colleagues who then have to work on this project and spend all their energy on figuring out this “crystal clear code”. It’s old school! Dilettantes! – waving the hand of a rookie programmer. And he’s puffing with pride. Until a year or two years later, he gets his perfect code to rework. You know how it usually ends? What the hell was that line?


No code formatting

What’s the big deal? That there’s no notch? No formatting? Big blocks of code scare you! Yes, they are! If a newcomer does not immediately learn the formatting standard in a particular language, it will be very difficult for him to get rid of bad habits. He will not remember that, for example, in Python, 4 spaces are needed for indentation, and let’s put 2 spaces on it in ruby (they are not necessary in ruby, but it was accepted).

As a result, such a coder will “produce” illegible code, in which every modification will cause a headache, and finding the error will become an operation as difficult and risky as the landing of the allies on the beach “Omaha” in 1944 under the fire of Nazi rifles.


Limiting yourself to the Polish-language internet

People, the internet is only one! It seems so, and yet … many novice programmers start with Polish-language sites and forums. There’s nothing wrong with that. The problem arises when coders stay in this Polish-language internet and do not use global resources. English-language sites, if only because of the huge number on a global scale, provide more information and often faster than our native sites. Sometimes the problem also concerns documentation. Here, too, one cannot confine oneself only to its Polish version, especially since it does not always exist. Yes, yes, we understand-poles are not geese, etc. However, first-hand information is worth having!


Premature optimization

All right, I’m optimizing! Are you done writing? No, but I’m still optimizing. For what purpose? That’s right, premature optimization of the code before its completion is a real scourge among novice coders. Many of them can’t understand that it’s just a waste of time. If there are no compelling reasons for this, the rule is that optimization is the last stage of code creation. Donald Knuth, author of the art of programming, which we already wrote about on our portal, said that premature optimization is the source of all evil. It’s hard to disagree with him.

What mistakes have you made that you can warn others against at the beginning of your journey? Or maybe some of these mistakes you do not consider as such? 😁 Share your opinion in the comments 👇 🏻

Go to our cases Get a free quote