When you are stuck
Are you also a person who gets stuck in coding for a lot of time?
You have this good idea you want to work out and it seems fairly simple. You guestimate to finish it within a week, but when you start working on your little idea you find yourself getting stuck on a technical issue before you know. This has happened to me many times and still happens quite often. It can happen to anyone, not just when starting a new project, but also when you're working in a team and doing some bug fixing.
That feeling of "why can't i just finish this like any other programmer?"... or "Why is it taking me so long?". I get this uncomfortable feeling and it makes me quite stressed out. Since this happened to me again last week I started thinking to myself:
- How can I avoid getting stressed out every time I run into trouble?
- What options do I have to solve my problems?
So here are some thoughts I came up with in the brainstorm session with myself.
Naturally, the easiest way to handle this type of situation when you get stuck in a code problem is to ask the community for help. And very often you get good answers and feedback. But I figured that there's a stage before that: you don't want to go always straight away asking for help before you have tried to solve the issue yourself.
When you are stuck in a piece of code or you're troubleshooting ask yourself the following questions:
- Go back to the basics: do I understand the problem? What issue am I trying to solve? Is the description of the problem clear to me? Very often I find myself deep in the code and then I figure that I really don't understand the problem and I have to take a step back asking myself: "what is actually the problem?". If you don't know the problem, you obviously can't figure out a solution.
- Which information am I missing? Do I understand what the desired situation should be? How should the software behave?
- What do I need to get to the solution? Which information am I missing? And more important: how can I find out what I am missing and who could possibly help me with it.
And last, on a more technical note: when dealing with error messages, ask yourself Do I really understand this error message? Very often I found out later that I did not really understand the error message. Reading properly and going back to the code to try and understand the error message will help a lot.
If you really can't figure out yourself how to solve the issue
If you really can't figure out how to solve the issue there are great resources on the net of people or platforms who are willing to and could help you. I will not mention an endless list but rather a few that have really helped me in the past few years:
- Various chat rooms on IRC such as #zftalk and ##php
- A very interesting (non free option would be) Codementor. This is a brilliant platform where you can find your mentor who could help you with your challenges.
- A rather new option is to see if there are slack usergroups which specialize in your field.
Let me end with a great lesson I learned. Very often when you look at a problem you get stuck because you look at the whole picture. Aww i don't know how to get this feature working. The lesson is, break it down into very little steps because frequently you miss one little detail. There was just one small issue which you didn't get and therefore was not able to finish the task. So try and break down your problem into smaller issues. That will help you isolate the error and solve it.
comments powered by Disqus