JavaRush /Java Blog /Random EN /Coffee break #51. 4 simple ways for a programmer to avoid...

Coffee break #51. 4 simple ways for a programmer to avoid mental fatigue. 7 steps to help you overcome your fear of coding

Published in the Random EN group

4 simple ways for a programmer to avoid mental fatigue

Source: Programming can be a very difficult endeavor. You need to remember what you are doing. Remember the context and inner workings of an application or system. Take into account the syntax and features of the language in which the code is written. Remember the location of a particular piece of code so you can return to it later if necessary. Remember which stages of work have already been completed and which have not. With all this, you still have to learn new technologies, tools and languages. All these things that need to be remembered are fighting for space in your head. As a result, you may feel depressed and feel like your brain has turned to mush. It becomes difficult to make decisions because you overthink, overanalyze, and overcomplicate everything. You forget what you were going to do now and what you plan to do later. Eventually, you become mentally fatigued. Coffee break #51.  4 simple ways for a programmer to avoid mental fatigue.  7 steps to help you overcome your fear of coding - 1Our head is not designed to constantly store and process such a huge amount of information. Luckily, there are at least four effective ways to reduce mental workload.

1. Write everything down

The first thing I want to talk about is David Allen’s “Getting Things in Order” technique . In his book, David addresses a common problem: people have to track, remember, and organize too many things in life. They can be related to work, friends, hobbies, family. Usually all this information is stored in our heads and, as a result, it is quite difficult to manage it. Allen's idea is that our brains are not the best place to store information. It is much more productive to use it as a source of ideas. As a place for creative thinking. And the best thing you can do for this is to try to rid your brain of the need to remember unnecessary things. The solution is as simple as genius: write down everything you need to remember. We can record how the application works. We can write down the basic syntax rules of a programming language. We can make a list of tasks, including everything we need not to forget. The more you have written down, the less information your brain will have to store in memory. This way we reduce mental workload.

2. Bookmark things you want to come back to.

If you find an error in your code and don’t note its location, you risk forgetting about it, being distracted by another task. As a result, you will waste time searching for this bug. A simple solution will help to avoid such a situation: every time we feel the urge to be distracted from other tasks, make a note. Believe me: you won’t be able to remember everything. In addition, it increases the load on the brain. It is also not always possible to process a found problem immediately. I imagine the accumulation of tasks as a stack of plates of different shapes that we must keep in balance. Holding one plate in your hands is not difficult. But every time we get distracted by something, another plate is added to our pile. Gradually, the stack becomes heavy and unstable, and it becomes increasingly difficult to keep it balanced. So: if we, taking each new plate, put the old one on the table (writing it down), we would have to hold only one plate. The load is reduced. And our brains could focus on the task at hand rather than keeping the plates balanced.

3. Take a break from work

One widely held theory is that sleep helps the brain de-congest. During sleep, the brain erases unimportant memories and retains important ones. In addition, during sleep, the brain deals with thoughts and feelings. Our brain is a complex device. We still don't fully know how it works and what it does. But this idea about getting rid of stagnation in sleep leads us to another - that our brain can work “in the background.” We don't need to specifically think about a problem for our brain to process it. This explains why many random ideas are born while jogging or taking a shower. We must use the background work of the brain. Why bang your head against the wall trying to solve a problem when you can take a break and just let your brain deal with it in peace?

4. Talk to people

Have you ever heard of “debugging a plastic duckling”? The idea behind this approach is that, when faced with a problem, the programmer explains his code, sometimes line by line, to a child's plastic duck. So he puts himself in the position of a teacher and explains that he needs to write code this way and what he is doing now. Oddly enough, using this method it is often possible to determine what the problem is. The duckling, being an inanimate object, acts as a grateful listener. However, you lose many of the benefits that come from talking to a live person. After all, this person can:
  • ask questions that will force you to rethink your approach,
  • advise on how best to proceed with the task,
  • suggest an alternative solution,
  • show a different perspective on the problem,
  • share your experience,
  • talk about existing solutions.
The ability to share knowledge with colleagues is a valuable skill. When two people think about a problem, the mental effort put into solving it doubles. As a result, you can get a better solution (this is what pair programming is based on).


Programming is a complex activity. Developers often have to keep a lot of unnecessary things in their memory. But at the same time, they are expected to instantly come up with creative solutions to complex problems. All this leads to mental overload. To solve this problem, we need to take the load off the brain as much as possible, allowing it to concentrate only on the task at hand. To do this we can:
  • write down everything important
  • make bookmarks so you can return to something important later,
  • spend some time not programming so that the brain can recover,
  • change perspective and exchange thoughts with other people.

7 steps to help you overcome your fear of coding

Source: Nickbulljs Most people who are afraid of programming are actually afraid of failing. Even before we start learning a language, we are sure in advance that we will fail. Why is this happening? There may be several reasons:
  • we may think that programming is too difficult;
  • we are sure that this is not “given” to us;
  • we are influenced by the stereotype that we are too old to start.
The list can be continued if desired. Coffee break #51.  4 simple ways for a programmer to avoid mental fatigue.  7 steps to help you overcome your fear of coding - 2But let's face it: these are all just excuses. And behind every excuse we hide our fear of failure. It is he who stops us. If we are confident in our inevitable failure, then most likely we will not start anything. After all, we think that since nothing will work out anyway, so why start. That is, we simply have no reason to take on a task because we are convinced in advance that trying will lead to failure. This is roughly how the fear of programming arises. We just think we can't succeed. To overcome fear, you need to rewire your brain for success. Let's see how to do this.

1. No talent for programming

Most people confuse talent with years of practice. We often say “This person is talented” when we see good results. But in reality, this person just started practicing early. It's always easy to attribute your failures to a lack of “talent.” But instead, it's better to start practicing. Start writing code for 30 minutes at least every other day. It doesn't matter how good you are at programming at first, you just have to start doing it.

2. Choose the task, not the language

Most people start their programming journey in the wrong place. The first thing they do is choose a programming language. But you need to start with the problem you want to solve. We don't write code just for fun. With the help of code we solve some problems. Therefore, first you should decide what problems you want to solve in the future, what projects to work on. When you decide, then you can choose the language most suitable for solving these problems.

3. Pareto's law in coding

To start writing code and creating something with it, you don't need 100% knowledge of programming. Apply Pareto's law . According to this law, “20% of effort produces 80% of the result, and the remaining 80% of effort produces only 20% of the result.” In other words, to create 80% of the product you need to know only 20% of the programming language (I'm simplifying, but the general idea is clear). Start by learning the basics of the language, and then go into more detail as needed. There's no need to jump straight into the abyss of programming language specifications. This will stretch your learning journey over months. Start with the basics and then dig deeper.

4. Focus on one thing at a time

Studying more than one or two languages ​​at the same time leads to undesirable consequences:
  1. You are distracted.
  2. You put off the moment when you can start real work.
  3. You don’t see progress and start constantly putting things off “for the future.”
To prevent this, choose one language and stick with it. Stop switching between different languages. Multitasking doesn't work. Focus on one thing at a time.

5. Start working on something

You learn best by doing. Acquiring knowledge without putting it into practice is a waste of energy. After all, you will simply forget a lot. To prevent this from happening, you need to consolidate the acquired knowledge in practice. Do you watch video tutorials on YouTube? Open the editor and write the code you just saw. Studying web development? Pick a simple project and start working on it.

6. Trick your brain

When we open our task list and see something like “Create a website,” we often simply put off this task indefinitely. We know that this will require a lot of effort and time, which we are not yet ready to spend. But remember that by putting everything off “for tomorrow”, you risk never starting to solve the problem. Break a large task into small parts. The stages of work should be such that each individual small task can be solved in 2-4 hours. Full list of tasks:
  1. Create a website
Detailed list of tasks:
  1. Buy a domain name.
  2. Create a website design.
  3. Create a home page user interface using CSS and HTML.
  4. ...
When you now open your task list, it will take less effort to get yourself started. And this is important because if you don’t start practicing, you will study forever .

7. Structure your fear

And finally, my favorite piece of advice from Tim Ferriss. He is the author of the bestselling book The 4-Hour Workweek and host of one of the most popular podcasts in the world, The Tim Ferriss Show. Structuring can help you overcome your fear of coding and other fears. Here's how it's done (here is the full version ):
  1. Make three columns and label them “Definition”, “Prevention”, “Counteracting”.
  2. In the first column, write down what exactly you are afraid of, what prevents you from taking active action.
  3. In the second column, list ways you can prevent worst-case scenarios.
  4. In the third column, list the ways in which you can repair the damage caused (if things do go to the worst case scenario).
  5. Rate the harmful impact of worst-case scenarios on a scale of 1 to 10.
  6. Rate the potential benefit of success on a scale of 1 to 10.
  7. Draw three more columns and label them “6 months”, “1 year”, “3 years”.
  8. Write down the potential cost of your passivity.


I hope these seven tips help you get started with programming and achieve your goals. Remember that if you set yourself up for failure, then the matter will definitely end in failure. Don't do that!