Art of reading error messages

As programmers we want to build things that work. When we do exercises we want to figure out the solution to the given problem. Seeing error messages therefore has a negative connotation to it: we haven’t managed to get it right! Right?

Well, yes. But also, no. Errors can also indicate progress. Often error messages indicate that we’ve done the right first step, and now have to figure out the right next step.

Whenever you find an error message printed on your terminal, don’t fret. Instead, appreciate it. Read it carefully. Language is trying to give you a hand and help. Normally an error message tells you exactly what went wrong in your code, and where. Once you’ve understood what has happened look at your code and try to understand why it happened, and how you might fix it.

Often, when you fix one thing, you’ll get a different error message. That’s progress. Rinse and repeat until your code does what you want.

Source:

http://ruby-for-beginners.rubymonstas.org/learning_to_program/error_messages.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s