I’ve got 9 bugs and yours ain’t one

I am sure this title reminds you of Jay Z’s song 99 problems and my bitch ain’t one. I initially thought about writing on 99 errors.

However I chose not to waste both our time, ( since we both have work to do ) and to keep the list short. That is why we are sticking to 9.

Imagine if I have to talk about 99 errors. That would be a lot of errors to talk about. Anyways back to the topic on hand. And yes, you guessed it. What inspired me to write this post must have been the solution of an error. I’m awfully glad its solved now ( a sigh of relief )

There are several errors programmers face for which I categorized into the following;

1. The “I don’t know better” errors

There are a lot of these. These come when you are just starting out, when you are a novice in a particular programming language. So you don’t know how that implementation is supposed to be done.

Advice:

  • Get a mentor.

  • When you have an error, don’t suppress it with further unknowledgeable ( or ignorant ) code. More code just increases the percentage of bugs in your code base. Less is more.

More code just increases the percentage of bugs in your code base

2. The “it was inherited code” error

Alot of software have to be maintained. There are those situations where you inherited someone’s code and have to continue with that project. However guess what? People think differently and it shows in their code too. You might face an error, only because of a minor useful utility function ( that’s no more a utility to you) or an abstraction or maybe even in the most basic of code writing styles by the prior developer.

Advice:

  • Ask the prior developer for a “developer manual”. If he doesn’t have one, ask him to create one.

  • Keep in touch with prior creators of the project. You never know when they have to parachute in to give a helping hand.

Ask the prior developer for a “developer manual”

3. The “obvious” errors

Sometimes you are thinking so high level that you barely see the errors right in front of you. It can be as simple as a misspelling, or a basic configuration you need to setup. When you finally see it I am sure you also kick yourself as if to say how could you have been so stupid.

Advice:

  • Never panic when the error comes

  • Take it step by step in troubleshooting the error

  • Use the stack trace and loggers in putting a quick resolutions to the problem.

Sometimes you don’t see the error that’s right in front of you.

4. The “Hard to spot complex” error

I don’t blame you. Your code must be have high level for this to happen. Still I’m scratching my head. Why don’t you first get your code base to work before you start abstracting your code. Stop doing it the other way round. There is no competition for the most complex code. Or is there ?

Advice:

  • Lose the complexity and modularize your code. Hopefully that should make it easier to spot.

There is no competition for the most complex code. Or is there ?

5. The “copy paste” errors.

You saw it online. You liked someone else’s code. However you don’t know s**t about it. Still you went ahead to make it your own. So what did you do. You pressed “Ctrl + C” and “Ctrl +V”. After that you expected it would work. Well surprise m***erf**** it didn’t work.

You saw it online. You liked someone else’s code. However you don’t know s**t about it

Advice:

  • Understand the source code you want to replicate and adjust it to suit your own needs

  • Give credit to the creators of code you pick up online

  • If you can contribute to the projects of these code base. Especially the open source ones

6. The “Incomplete documentation” error.

If you are like me. You might need one functionality or another. Yet the resources to assist you are scantly. The maintainers of the project you want to use didn’t even project a ReadMe. Shocking! So don’t blame you.

It also happens with languages or frameworks that are very young. Since the languages or frameworks are young nothing much as been written on it yet.

Advice:

  • Submit a bug report or contact that developer along the lines of

Hi Mr. Nerdy Coder,

I really love your work but could you please add a bit more documentation to your package / gem / app/ module.

Thank you.

You see that was not so bad. (of course you have to take out Mr Nerdy Coder)

  • The next time you want to upload an app, start with documentation yourself. Remove the log in your eyes before removing the log in someone else. Matthew 7:5.

Mr Nerdy Coder, please add more documentation to your work

7. The “You feel asleep” error

These are errors you caused because you were “sleep coding”. That is sleeping and coding at the same time. Usually it happens when you want to code but you are dozing off. A typical scenario of the “soul is willing but the body is weak”.

Advice:

  • It’s simple. STOP AND SLEEP.

Sleep when you have to

8. The “Deprecated code” error.

Its one of the surest security loopholes in any application. Please don’t use deprecated code. Adjust to the changing requirements. There is a reason that framework, library, package or api was updated.

Advice :

  • Be modern and adjust. Leave the past to the past and drop that old code.

Alot of software can be broken because of old code still in use

9. The “Logical” errors

It seems like the application has a mind of its own. You told the code to do this but it keeps behaving this other way. Code that should not work is working, and code that should work is not working.

Don’t worry witches have not just decided to enter app error. There is no need to exorcise your code. LOL.

Advice:

  • Thankfully the computer is follows steps and logic alone. Check carefully ( step wise ) your code base. You will see the little logic that has been causing it to go all haywire.

Sometimes the code seems to have a mind of its own

Conclusion

Errors alone should not make you give up on your work or the chosen language or framework you chose to use. Remember Edison had a 1000 failed experiments before getting the light bulb to work.

Maybe you are a beginner programmer. Maybe you are on a tight deadline. Whatever the scenario, errors are part of the life you have chosen for yourself as a programmer. It an opportunity to learn and be better.

And if the error still persist after all this, and maybe its time to pray your way out of it. LOL.

Feel free to share bug filled experiences from your programming lifespan. Until then, have an error free coding.

Cheers.

Leave a comment