Attention to detail and debugging: Spot the Difference

Puzzles by Kok Ho Huen and Paul Curzon

Attention to detail matters a lot in programming. Practice in a fun way with these spot the difference puzzles.

Learn about:

  • debugging
  • the importance of attention to detail
Two cards with fish on, one with differences

Spot the difference puzzles are usually done on pictures. Here we do some with pictures, some with letters/ words, some with code. With programs we have scattered typical mistakes and slips through programs. Do you have the attention to detail to find all the differences, all the mistales.

These simple spot the difference puzzles are suitable for primary school upwards.

What do you have to do?

Find all the differences between the pairs of images.

Why does it matter?

Attention to detail is an important skill for computer scientists to develop. It matters in the sense of in writing a program you must make sure it works in all situations, so be able to see all possible situations.

In a simpler sense the first stage of debugging involves attention to detail to spot what you got wrong. Can you quickly spot where the bracket is in the wrong place, or where an extra space is needed? A difference is that in debugging you are looking for a difference to a mental model (that may be hazy if you are a novice) of what the right things should be. However, when learning to debug, a good way to find mistakes can be to compare your new code with similar code that works. Check your own code as you write it and when you get compiler errors for similar mistakes to the ones in the code puzzles here.

Hints

  • For some kinds of differences, as with debugging, it helps if you focus on the “meaning” not just the form. If you understand how things are supposed to be then it is easier to see where things do not match that, than just looking for visual differences. This is a reason that , when learning to program it is important to focus most on learning the meaning (semantics) and structure of program constructs, not their syntax.

More Computer Science linked puzzles …


EPSRC supports Teaching London Computing and cs4fn through research grant EP/W033615/1.