10 mistakes of a novice programmer

10 mistakes of a novice programmer

The mistakes of a novice programmer are not limited to Error and Exception. There are a number of bad habits that seriously hinder the career growth of a developer. Let’s look at each of them and try to find ways of eradication.

1. Why do I need this English?

To begin with, the vast majority of programming languages are based on English (well, unless it’s 1C). For example, knowledge of English will allow you to quickly understand what is happening in this piece of code:

try:
    1 / 0
except:
    print("You cannot divide by zero!")

Let’s end with the fact that most of the community of these languages communicate in English. Let’s add to the above documentation, which is often crookedly translated or is not available in Russian at all, like Salesforce. Let’s also not forget that many companies work on the principle of outsourcing, where communication with foreign clients is a matter of course.

So if you really want to write under the next post “Why aren’t these books in Russian?”, think about whether you want to grow as a programmer further? The senor will not ask such questions.

Have you decided to improve your English? Keep our selection of free materials and books on English:

2. Conservation of problems

When we are just starting our journey, regardless of the field of activity, we are willing to ask and learn something new. But some time passes, and it already becomes awkward to ask questions, because there is a feeling that the answers have long been obvious to everyone.

Meet the impostor syndrome. It seems that everyone around already knows everything, and you have significantly stalled, so it becomes more and more difficult to ask about something every day. This is a typical mistake of a novice programmer.

There is another option: you are confident in your knowledge and think that you can easily figure out the problem yourself. A day, two, a week passes, and the problem is not solved in any way.

In both cases, the following approach will help:

  1. Before performing a task, always make a solution plan: so, by addressing the question, you will demonstrate to the person in absentia that you were preparing, and not just sitting idly by.
  2. Go through the documentation, poke search and Stack Overflow.
  3. Didn’t help? Then ask a more experienced colleague for help as soon as possible. The longer you wait, the more questions there are to your time management.

3. Googling is a long time: it’s faster to pull the team lead

And this is the other extreme. Let’s respect the time of colleagues and search for information on our own beforehand. It is only important that this does not stretch over days and weeks: in the documentation, everything often lies on the surface.

4. Tests? No, I haven’t heard

Even if you don’t write tests in principle, considering it a waste of time, you test the code one way or another by running it. Make it a habit to write a similar test every time you check something manually. The program code will grow, and at some point you may forget what this or that function performs, as well as what errors you encountered when implementing it.

Master the methodology of TDD (test-driven development) development, which is based on the repetition of short cycles: writing a test that covers the changes, and then writing the code itself that implements it. Although TDD is not suitable for any project, understanding and practice will not be superfluous.

5. And let’s comment on everything!

This cannot be attributed to serious mistakes of a novice programmer. Rather, to the rules of good form: do not litter the code with unnecessary comments. If you learn to name variables and functions clearly, the number of comments will be greatly reduced.

An example of so – so names:

// Эта функция суммирует только нечётные числа в массиве
const sum = (val) => {
  return val.reduce((a, b) => {
    if (b % 2 === 1) { // Если текущее число нечётное,
      a+=b;            // добавляем это число
    }
    return a;          // Возвращаем результат
  }, 0);
};

And that’s what will happen if the variables are called normally:

const sumOddValues = (array) => {
  return array.reduce((accumulator, currentNumber) => {
    if (isOdd(currentNumber)) {
      return accumulator + currentNumber;
    }
    return accumulator;
  }, 0);
};

6. Score on review and refactoring

Don’t touch anything if something works. Alas, this is a very bad habit: even working code can and should be improved. Tasks tend to scale: today the customer asks to write a calculator, and tomorrow he wants it to be a professional accounting calculation.

The code must be cleaned from:

  • duplicates;
  • temporary variables;
  • unnecessary conditions;
  • redundant comments.

Make full use of the principles of OOP. Remember that a class is not a vinaigrette of disparate actions: each element of the code is described in one place. At the same time, each object provides other objects with exactly as much data as needed: this allows you to reduce the degree of dependence of individual parts of the code on each other, and edit them separately, without breaking all the logic.

10 principles of OOP that every programmer should know about

7. Minimum time to communicate with the customer

How annoying it is when the project manager asks you to describe in detail the action plan for the task, right? After all, the client is wasting your precious time: it is enough to answer “Yes, of course”, and off the bat. Right?

And here it is not: this is another mistake of a novice developer. Unnecessary, at first glance, details will save you time in the near future. A misinterpreted task will force you to write code that will have to be redone later. To paint questions and an action plan to the customer is a prerequisite, even if they are very lazy, even if the customer himself is annoyed by such meticulousness. It is important to get to the truth and understand that you are both on the same page, and not each by himself.

8. Git is just a strange word

Notepad is quite a suitable version control system (VCS) while you are studying. But reaching the professional level, even if it is Trainee, will require you to be able to work in a team. And that’s where the fun begins.

Version control systems allow you to ensure code clarity, not only for others, but also for yourself. The history of the changes made will answer most of the questions. Even small commits with clear names will help you understand how the program came to its current state.

VCS allows you to quickly find a bug, the time of its appearance and the main culprit. Git provides a binary search for bisect, which finds the commit that introduced the bug.

Introduction to Git: from Installation to basic commands

9. Ignore new tools

The mistake of a novice developer is also limited by a set of favorite tools. All of them are designed to solve specific tasks: a hammer is good at hammering nails and bad at tightening screws. So using a hammer just because you are familiar with it or it is the most popular on Amazon is a dubious practice.

If you are striving for a career takeoff, broaden your horizons by studying and using new tools. In the end, at some point you will find that you have become a much more in-demand specialist than your colleagues in the department.

10. Get enough sleep? Where to get enough sleep?

The most banal advice, which is already pretty boring, but it really works. Stop scoring on yourself:

  1. Don’t leave everything for Friday and the weekend.
  2. Do not ignore illnesses and take sick leave, even if “just a cold”.
  3. Do not postpone your vacation if you feel that you are noticeably tired.
  4. GET ENOUGH SLEEP!

We hope that these tips will help you build the right trajectory of professional development. Also, be sure to look at what requirements are imposed on juniors in the labor market today.

Software Outsourcing | Unreal Engine Development

Ready to see us in action:

More To Explore

IWanta.tech
Logo
Enable registration in settings - general
Have any project in mind?

Contact us:

small_c_popup.png