Fixing another coder’s bugs If you work for a company, more often than not you will have to fix someone else’s code. If you’re among the lucky ones who have never been asked to do this, bless your stars. For those who have, it can be a horrible experience. Its rarely easy to understand a code someone else has written, even more so when there isn’t proper documentation or comments in that code. This is why documentation is of utmost importance. Bugs appearing at the wrong time After weeks of hard work , development and testing, you finally feel the project is over and just when you present the final version to the client, a bug appears. Or even worse, the bug slips through and appears after the project has been delivered or released to the public with customer bombarding you with negative reviews. It might be a small bug, but users will harass you as if you’ve killed an infant. Fixed one bug – created more bugs The oldest frustration in the coding world – fixing one bug ends up creating a few more. When considered logically, this translates to a section of code that was not being executed due to the earlier bug and has thrown up these bugs. These are never new bugs – just bugs that were hidden until now. Nonetheless, it’s still frustrating. Bug existing in the library you depend on What happens when you find a bug in your code and after much debugging, you find out that the bug is not in your code, but in the library you were using to code ? This is an unfortunate scenario since you can feel helpless to do anything about the situation. If you do however find yourself in this scenario, there are a few ways to tackle it
Make a request to the developer to fix the bug. This can take a long time however, since they are’t the ones facing a roadblock due to the bug, you are. If you feel proficient enough, fix the library bug yourself. This might not as easy though, since there may be a lot of projects using the same library. You do not want to cause multiple failures across all these projects. As a final resort, look for an alternative. There might be another library that you could use or maybe, you can skip the library entirely and build your own code.
Data gets lost and you don’t have a backup Not a scenario you would want to find yourself in. This is a nightmare even those without coding knowledge will understand. This can be caused through a simple power failure to someone spilling coffee on your machine. The only way around this, always take backups of your work or you will end up having to do all the work again. Bug cause – unknown A unique case when no matter how much you try, you cannot locate the source of the error. It happens to everyone eventually. You feel you’re not working hard enough, not dedicating enough time. No Google search helps and you feel that the answer is just outside your grasp. Best way to tackle this, is to do the exact opposite. Step away from the code, try and refresh your mind. It’s most probably fatigue that is hindering you. Semicolon Missing one semicolon can throw more errors than the number of words in this article. Depending on the development environment you use, you could end up with that one missing semicolon throwing up errors all across your product. Yet, there can be a much worse scenario – your semicolon key stops working. Just imagine if your writing your code with a level of zen and the missing semicolons slips from your mind. Just imagine the horror. The Internet The number of memes on the important position that the internet has in our education are numerous. The importance of the internet and its most popular site Google, is even higher for developers. Having your internet connection go down while your coding will send all the coders back into software stone age . Source: HONGKIAT