Riding the roller coaster
Developers’ mood can change in a matter of minutes.
When everything looks shiny
If you have ever wrote code in the editor and saw the result in the browser or the terminal, you will probably agree that creating something feels just awesome.
You write a few (or quite a few) lines in a programming language and menus appear on clicking a button, shapes can be dragged and dropped, tooltips pop up on hover and data suddenly come from the database. Pure magic!
When someone looks at your monitor over your shoulder, they can only see some mysterious sets of characters that don’t seem to make sense at all while you know that these characters mean something.
When you solve a problem, being as simple as a fizz buzz or more difficult as a new feature for an app, you will see the fruit of your work. It’s there, it’s visible and it’s working.
You might not agree with me but I find problem solving exciting. I love when the “secret code” is finally broken and the puzzle gets solved. (This is probably one reason why I love mathematics.)
It’s also great when you learn new things. It can be a new trick, an easier way to do something, a new framework or library. You feel more confident and might think of yourself becoming more valuable, both in web and personal development (and you’re right).
You love the excitement of not being able to fall asleep at night because your brain is busy with ideas and to-dos for the following day.
You simply love what you do!
When it just sucks
But then suddenly comes a day when you sit down to work on a new feature and after sitting hours in front of the computer, the results don’t come.
It’s not working.
It’s not what you want to see.
It should work, you do everything correctly.
You don’t understand why. You (just think that you) know the documentation by heart. You then go back and read it over and over again, just to become more and more angry each time.
“I can’t believe it! This can’t be happening!”
Because Google is your best friend after Peter and Charlie, you type your issue in the search box, hoping that someone has already come across that problem and couldn’t solve it either. You start reading the answers from StackOverflow and GitHub but they are either not properly explained, or just don’t work for you or both.
You want to quit. You feel deep inside though that you shouldn’t. You should persevere because this is the way you can achieve your goals. You read everywhere that there is no such thing as failure just quitting early. What does early mean, by the way? One week or ten years?
Mark Zuckerberg or Elon Musk didn’t quit, and they are quite famous and wealthy, so you shouldn’t leave the ground either.
So you don’t know what to do.
You might start working on something else, but the unsolved problem/feature remains and haunts you.
Either way, you’re low.
“I would be here if I had watched TV the whole time. At least I would have enjoyed it.”, you might think.
I regularly feel these emotional extremes.
But because I hate quitting, I’ll share some tricks that usually work for me when I feel that I want to throw my laptop out of the window.
Some tricks which work for me
The first and most obvious trick is that I turn off the computer and start doing something else. Of course, this only works at the end of the day, otherwise I could easily get in trouble.
It’s not worth forcing what isn’t working. It really gets worse if I spend more time speculating on what the hell is happening.
Solutions sometimes automatically come when I turn off the computer and more often than not, they already arrive the following day.
Because I don’t try to focus on finding the answer. I can step out of the situation and let my hectic mind settle down.
My brain is just full of information, it’s a real mess and I’m unable to find the needle in the haystack. When I walk away and start doing something else, pieces of information in my brain magically find their way to their imaginary pigeonhole and the solution often comes very soon.
No, I don’t turn the computer back on. I write the idea on a piece of paper and leave it there until the following day.
If the problem doesn’t want to solve itself, it might be a good idea to go through the code I wrote step by step. I comment out everything except the first line. If it’s working well, I’ll uncomment the second line and have a look. If it’s still OK, I move on to the third line, uncomment it and so on.
Sometimes I log something silly in each step to see where the error message comes from. This method can be very useful when I need to find an error related to API requests. I also use the debugger of my editor, but debugging is beyond the scope of this article, so I’m not going crazy with the details.
Once I have found the line that causes the bug, I can narrow my focus on one definite issue.
When I approach a new problem, I try to plan my work and break the problem into small ingredients. Although doing this doesn’t guarantee that everything will go smoothly (and it won’t sometimes), but it helps me focus on fewer possible issues.
It’s an emotional roller coaster
I often feel these emotional highs and lows. Frustration results from missing pieces of information and knowledge. I felt the same way when I started out and feel now when I’m more experienced.
Problems change but feelings remain.
As I get more experienced and learn new things, the issues I had earlier are no issues anymore. New challenges arise almost every week and replace the old ones.
One might feel the emotional roller coaster at every level. Beginners and seniors are both frustrated at times. They have the same feelings but the reason of the frustration differs. Beginners have different problems than seniors.
Although I myself hate being in the crap state, I know that it’s necessary and useful for my personal development.
I know that I simply can’t improve when I feel bored.
When everything is easy and goes smoothly or you finish off a task early, it’s not hard to lay back and get bored. It might be tempting to believe that solving everything as quickly as possible is the ultimate goal of any developers because it means that one knows everything, but I disagree with that. This is not something I want to feel.
Of course, when I work on a commercial project, I don’t mind if things go smoothly, especially if the project is of top priority or the deadline is close. It’s important to acquire the knowledge and skills necessary to become a good developer who can deliver quality code even under pressure.
What I mean is that I try to continually learn and improve my skills. It doesn’t feel good to be bored on the long run. It’s self-contradictory but I actually make more mistakes when I’m in the bored state and it takes more time to complete the same task.
Learning something new is good. Being bored and not being challenged is not.
If you have anything to add, please feel free to share your thoughts with me.