JoC #25: Dealing with errors

      We learn wisdom from failure much more than from success. We often discover
      what will do, by finding out what will not do; and probably he who never made a
      mistake never made a discovery.
            — Samuel Smiles

We’re talking about errors today. I’m sure you all have – like me – got your fair share of errors when you were programming. I’ll talk a bit about how to go about investigating what went wrong when you get an error.

In doing this, we’re discussing the important distinction of synax errors and semantic errors, and we’re learning to deal with both. This includes reading stack traces.

Download video

Concepts discussed: syntax errors, runtime errors, stack trace, exception

JoC #17: Bouncy coloured balls

      Debugging is twice as hard as writing the code in the first place.
      Therefore, if you write the code as cleverly as possible, you are,
      by definition, not smart enough to debug it.
            — Brian W. Kernighan.

We’re leaving the ‘Trick, the turtle’ scenario this week to make something new completely from scratch.

The main purpose here is to piece together everything we have seen to far about the structure of a class, and create a complete new class (with fields, constructors and methods).

Yes, I know, this doesn’t sound too exciting. I can see from the video view numbers that videos dealing with review of concepts aren’t quite as popular as the ones showing new stuff.

So: Don’t worry. I’ve thrown a few interesting new things in as well: dynamically changing images, string concatenation and multiple constructors are some of them. Oh yes, and a first run-in with a runtime exception!

Download video

Concepts discussedclass structure, field, constructor, method, default constructor, changing images