Archives for : debugging

Video: Makey Makey slide mover

20180722_130151Ever been frustrated when your slide clicker runs out of batteries? Me too! My Code Club kids, and Pi-Wire pal Chris, have a ‘practical’ solution: use a piano pedal!

There were two versions: the first was ok, but had some flaws. As later figured out, it was a bit unreliable. I was so impressed that the kids developed ideas for version 2, improving it a lot! With a bit of tweaking, the second version was perfect – and all it took was some play doh and a bit of rewiring. Click below to see how we did it…

Continue Reading >>

Debugging: Class, interface, or enum expected.

Java’s error messages aren’t always very meaningful – to novices at least. Take this, what we might imagine to be a fairly common error:

Class, interface, or enum expected.

Now, I know what it means, but would a new programmer? To understand this message, you surely need to know what an interface or an enum is – neither of which are likely to be taught in the first few lessons.

Therefore, JAKE aims to make debugging a bit easier. When a JAKE program is compiled, the IDE reads the feedback from javac and tries to translate it into simpler language. Obviously, it’s important to maintain parity with the Java error itself, so the actual error message is always shown. It’s just that JAKE also gives a short, plain-English explanation too.

Since JAKE’s being developed to research teaching programming, it’s not going to include an explanation for every possible javac error. However, the system is designed in such a way that it’s modular; the explanations are taken from text files, and JAKE just looks for a file that matches the javac error description. See below, where there’s no matching explanation for the error:

The explanations, where they do exist, are also quite short, so it’s feasible that the novice programmer might want more help. To get around either of these problems, there’s a link to Google. Yes, this might sound overly simple, but it seems like a good, quick (since this is only a demonstrator) way of providing extra help. Why duplicate help content that can be found on the web? When the user clicks on the link (either link, if there’s no explanation and a link appears instead), their default browser opens and they’re taken to a Google search page about their error: