I bought some controllable LED strips about a year ago for a Hackable Classroom project that never really got going. My son and I found them last week and I decided to use one of them to upgrade the lighting in his room, giving him the chance to create his own sequences and effects in code.
The problem: create a lighting system that allows the user to change the colour of the LEDs or cycle pre-programmed sequences.
This seems quite daunting. My son has definitely never created a lighting system before. However we chatted about it and, after a little research, decided that it was really made up of three separate problems:
Sub-problem 1: wire the LED strip to a microcontroller
Sub-problem 2: create a program to somehow set the colour of the LEDs
Sub-problem 3: create a program to display a pre-programmed sequence on the LEDs
By splitting the problem down into smaller steps it now appears much more achievable.
Turns out when you define more specific goals it can be much easier and quicker to solve the overall problem. We built the lighting system in an hour and my son coded the light show online before transferring it onto a Microbit.
This is an example of problem decomposition and how it can be used by computer scientists to overcome issues which may, at first, appear too difficult. Like building a robot that can do a backflip:
Try this:
Problem: create a computer quiz
Creating a computer-based quiz may seem daunting at first. Break down the problem into smaller sub-problems though and you’ll definitely be able to do it!
Sub-problem 1: create five suitable questions and multiple choice answers
Sub-problem 2: research and select an appropriate quiz creation service (e.g. Kahoot, Quizlet, Socrative) or create your own in Python
Sub-problem 3: find people to test your quiz and let you know if they enjoyed it