Read error messages, understand them and write your own

By | June 16

Over the past years I have seen that many developers don’t really read error messages nor do they try to understand them. That’s not a good thing! Error messages are here to help us find the problem. Each error tells us exactly what’s wrong.

Instead of trying to think what the interpreter/compiler tries to tell us people start copy&pasting errors and posting them on forums. The forum “experts” do nothing else than reading the actual error message (as that’s the only information they have) and answer the question. Why can’t a developer do that in first place?

I recommend following these steps on each error you encounter:

  1. Read the error
  2. Read the error again!! Character by character. (I know you have seen the error 1000 of times but probably you never fully read it)
  3. Try to understand what the error wants to tell you. Think of the developer who wrote the framework, lib, programming language, etc. and ask yourself what was on his mind. They try to help you (us)
  4. If you did not understand the error you probably don’t have enough knowledge about the tool you are working with:
    1. Improve your knowledge on that field where the error happend and get to understand why it happend and what it exactly means (then go to step 1)
      That’s the point of time where you start to improve dramatically as a developer!
    2. If you are too lazy and just want to get thing done. Google it
      That’s the point of time where you should ask yourself if programming is really the right job for you!

You will notice how happy you will be about error message in the future. You’ll start hoping for error messages popping up and get the feeling how to write your own meaningful errors.