📜 ⬆️ ⬇️

What to do if you are stuck with a large and complex programmer task?

image

Sometimes, solving a difficult task, I get stuck with it. I understand this when I start to engage in fiddling things, give advice to other people, drink a lot of coffee, constantly look for something to eat and work on low-priority things. Time passes, and little is done.

When I paid attention to this, I seriously became thoughtful, appealing to my own conscience, a sense of duty and pride of a man who never fails himself and his team.
')
Over time, I developed a way to return my productivity in such a situation and be able to complete a difficult task. This experience I want to share.

Prerequisites


In the article I assume that you have a clear understanding of the task before you. If there is no such understanding, you need to go back to your notes, drawing board or communicate with the customer. You certainly can not be productive if you do not have a clear understanding of the task. Most likely you will just waste your time and money of the customer.

So, we are repelled by what you know what to do, but intellectually overwhelmed by the task, you do not know how to approach it and where to start.

My strategy consists of 3 consecutive steps to deal with the difficult task:
  1. Start moving - start moving, believe in your strength;
  2. Get control - finally overcome indecision, make a map of the path;
  3. Speed ​​up - gaining confidence, increase speed to maximum

Get under way


“Writing a novel is like driving a car at night. You see the road only at a distance of the included headlights, but even so you can master the whole way ” - E.L.Doctor

25 minute spurt

The first thing to do is physically sit down in front of a computer with readiness to write code. If you are not in this position yet, you need to apply all your skills as a negotiator and move your resisting body to a working position. It's not easy to argue with yourself, but you can always promise yourself some small reward in return for these 25 decisive minutes. And then, after a short break, another 25 minutes. And further. Try the " Tomato " technique

Pluck the fruit hanging below all

The Big Challenge will try to throw you out of the saddle (chair) and immobilize. But in order to make progress, it is necessary to move forward firmly and confidently. Immerse yourself in programming as much as you can. Take a small subtask that you know how to perform. Let not entirely, but at least a few steps forward. The following steps will become more apparent as you work on the current ones. “Tear” one “fruit” after another, move from one small task to the next, thus gaining momentum. Holding the chain of these tasks, move stubbornly through the wind and procrastination waves.

Copy & Paste

Copy-paste is a bad practice . However, if you face a big demoralizing task, copy-paste can be a good starting point. Find similar code in your previous projects, look for examples on Google or on Stackoverflow . Use this code, having previously edited it for the current task. And of course, do not forget to clean it later and get rid of the negative effects .

Reconnaissance

Evaluate the area of ​​your task for possible solutions and potential barriers. Do not engage in an open battle with the task until you are firmly on your feet. Proceed to work on the subtask only if it is simple, otherwise just evaluate its degree of complexity and plan for later. To better think, try:


Important question: are you ready to attack?

You should be able to honestly admit if you are not ready to solve the problem at the moment. Ask for help or take a break and spend it on self-study. Otherwise, you can get into a difficult situation by continuing the struggle and eventually ending up with the task. This is not fair to your team, company or customer.

Phase Results: You are on the road and ready to go.

Get control


"Chance favors the prepared mind" - Louis Pasteur

The project manager for a couple with the customer are standing over your soul and nervously asking: “When are you already going to finish this fucking task?”. Too long a trip in the dark is unsafe - you may be late or you may not go there at all. As soon as your consciousness ceases to resist and begins to cooperate, you must take control in your own hands and form a clearer idea of ​​exactly how to solve the problem and exactly what efforts are needed for this.

Then the question may arise: “Why not take control in your hands from the very beginning - plan all the steps in advance and be disciplined to follow the plan?”. I believe that for good planning, you must first explore the territory and prepare your mind for this planning. In addition, it takes some time to “twist the task in hand,” align thoughts with colleagues, establish themselves with functional requirements, technologies, tools.

That is why “Move from the spot” is a necessary stage for the programmer's mind, which frightened the Big and Dreadful Task.

Split the task

First of all, break the big task into smaller ones, thereby marking out your way to victory.

Shoot tracer bullets

Write a small but working prototype that affects all major components. When you put them together and make them work, it will be a great achievement on the way to a solution. The prototype will become the framework for the subsequent code.

Avoid premature battles: big redesign, refactoring or optimization

You will be tempted to apply your outstanding skills as an architect and expert gurus to improve system design, total code refactoring and optimization of potentially slow layers. Be careful - this activity often leads to the bottom of a deep hole just before the finish. Practice your composure and pragmatism. Focus on a practical solution to a customer’s problem, rather than the image of the Perfect Perfect System.

Signs that you have gained control:


Results of the phase: you have an action plan, necessary assessments, as well as a framework for which the functionality will be increased.

Speed ​​up


“A good plan realized today is better than a great plan realized at some uncertain point in the future” - General George Patton

When you have gained clarity of mind and control, you can start moving at maximum speed. It is necessary to maintain high motivation, not to lose control and monitor the quality.

Small net wins

Move from one small victory to another, leaving behind things that you like, refactored and work well. Do not leave anything half-wise and ready to fall apart as soon as you let it go.

Immersion

Enter the state of flow - “a mental state in which a person is completely immersed in what he does, fully focused and focused on success”
Conditions for flow status:


Anti-perfectionism

Do not go into an endless rethinking of the problem and do not spend too much time polishing what is already working well enough . Instead, aim for a simple design, open to future extensions, when you have the information gained through feedback. Know when to stop and be determined to say that the work is really done .

The results of the phase: your train rushes to the destination at full speed right on schedule and nothing can stop you :)


Thank you for your interest in the article, I’m happy to hear your strategies for overcoming indecision before a challenging task.

Source: https://habr.com/ru/post/127400/


All Articles