Being a programmer can sometime be ruthless. You think you have everything under control. You have done everything right and everything you can to write a flawless code. But it is not that easy. When you compile and run the code nothing works. You go back check the code again, were did it go wrong and were did I mess up?
You can spend half the time debugging you code for errors you should not have made. But it is so easy to make a error. To use a variable were you should not have or to miss a bracket or use one bracket more than you need. To use ”<” were ”>” should be appropriate is a classic mistake and can be hard to trace because you sometimes don not get a error. The code just do not work as intended.
A simple mind slip can ruin everything and could cause you to spend more time than writing the code to fins were everything went wrong. And stuff like that is bound to happen. Especially when you have been sitting long hours because you have a deadline. You are stress out and your brain gets more and more tired for every hour. Then the errors are unavoidable.
But errors and bug fixes are a part of every programmers daily life. You just need to cope with it and deal with it in the best way possible.
The last time I did a stupid mistake was when I had this assignment from a betting company. They needed a simple script for their online slot machine. As usual I was confident that I would complete the task with ease. So wrong I was.
The task was to make the wheel in a slot to act in a way when the player got a free spins. In the end I spent so many hours checking for errors I thought I would go insane. And I could not deliver a half made script either. Well I got there at least. It was one of my first assignment as a new developer and in the end I learned a very good lesson.