3 coding nightmares that every newbie will know about
Starting out as a programmer is really exciting, but inevitably after a few weeks the struggles of becoming a developer can get to you.
Don’t panic, the good news is that everyone makes mistakes and all of the mistakes that you’re making have been made before. Other new programmers took those problems in stride, looked for solutions, and came out better in the end – and so can you.
Let’s look at three of the most common problems that new programmers face, to learn how you can gain perspective and fix your issues.
You’ve spent days perfecting a program and you’re finally satisfied that it’ll work like it’s supposed to, but when you attempt to go live, you find a whole load of bugs that need addressing. Debugging sounds overwhelming – and sometimes it is. Some bugs are easy to debug, but a lot aren’t, which can lead to lost development, time and endless frustration for new programmers.
The best defense against bugs is a good debugging strategy. As a new programmer, incorporating debugging strategies can help you, too.
Here’s what you can do:
- Reproduce the error or seek help
Spending countless hours trying to fix a problem that you don’t understand can be a strain. To fix your bugs and understand why they happened, you should start by reproducing them. What you find will give you a good idea on how to fix them. Another tip is to really read the error message. Most error messages you’ll see are fairly accurate and descriptive. The error message does it’s best to tell you what went wrong, and at the very least it will tell you what line number it got to in your program before crashing, which gives you a great clue for places to start hunting for bugs – if all else fails, Google the error message. There will be someone, somewhere who has run into the same problem you have.
2. Time estimation
As a professional working in an industry that is controlled by deadlines, you might be asked to provide an estimate on the time it would take to complete a task such as debugging code or completing certain features in a sprint.
Estimates are important in software development. They can be a basis for price quotes and project schedules, so delays cause problems and may compromise trust.
As a new programmer, you might be tempted to put in more time than you need for a task, with the assumption that doing so might impress your boss and be good for the project. But doing this can come back to bite you. It can put you way behind schedule and behind your team, which makes you look bad.
To solve this problem:
- Break down tasks and time yourself appropriately
The best way to make tasks more manageable is to break them down into a series of smaller tasks. Did you just identify a dozen bugs in your work? Look at each fix as a mini task and estimate the time it might take you to complete each of these tasks. Breaking down your workload this way will keep things from becoming overwhelming.
Give each task a time frame for completion, but give yourself a buffer, too. For example, if a task would normally take 20 minutes, set yourself a buffer by keeping the time frame at 30 minutes. You never know what disturbance may occur.
3. Working with another person’s code
Even new employees have to work on projects created by someone else at some point. In programming, for instance, you might have to work on code written by another developer. This situation can cause problems.
The programmer who originally wrote the code might not be working there anymore and didn’t brief anyone about their work before leaving. Or if they are still at your workplace, they might be too busy to answer any questions you have.
Or in a worst-case scenario, there might be office politics. For example, maybe your colleagues had trouble getting along with the previous programmer and might be reluctant to help you figure out their code.
Working on another programmer’s code can be a problem, but it’s a solvable problem. And the best way to approach it is to take it as a challenge. Here is a start:
- Spend more time reading code
Spend some time understanding how the other developer worked, in both their approach and style. You will have an easier time adapting to the code once you’ve done that.
It’s okay to be the new person
When you are just starting off as a programmer, everything can seem overwhelming. But stop, take a breath and take comfort in the fact that you aren’t the only one; your colleagues have faced these problems at some point, too. If you’re still in doubt and want to ensure you’ve got all the essential skills you need to become a pro coder, our Code Institue course is perfect for you. It’s qualifications like this that can give you a solid grounding and ensure that you make less mistakes in your early days.