On 16th April we held the first DWP Hack Day in Preston. The day was attended by 10 enthusiastic people within DWP IT, including the DWP Developer team.
Attendee's were;
Paul Anderson
Paul Bowman
Wayne Hopkins
Nathalie Harrold
Donna Kirk
Mike Morris
Suzanne Russell
Daniel Sherman
Adrian Stone
Ian Tidmarsh
The day was delivered by a Raspberry Pi trainer, Les Pounder, who specialises in delivering Hack Days to inexperienced people.
The day started in a unusual style. We had to programme a robot, without using a computer. Or a robot........
We split in to 3 teams, each nominating a team member to adopt the role of “robot” and set about inventing our own language to direct our human around a maze. This was a very useful exercise in teaching the structure of programming and also understanding that you can achieve a lot by using clear and accurate commands.
Following a short break, we fired up the Raspberry Pi's and began our computer learning of the day. We were using a programme called “Scratch”.
This is an excellent tool to teach the structure and concepts of code without the horror of seeing pages of symbols and letters. This allows you to place blocks and snap together groups of commands. We worked in pairs, using a technique called “Pair Programming” where one person “Navigates” and the other person “Drives”. This means, one person types the code, drives, and the other person watches and directs where needed, navigates.
We broke for lunch and returned for the main event. Building and coding a real robot. It was more Wall-E than Robocop, but exciting nonetheless!
After working out which pins power which motor (and getting them to spin the wheels the same way!) we set about building a series of blocks in Scratch to make the robot move around a maze with keyboard input. This worked very well and allowed us to see how our code was working with Left, Right and Forward keyboard inputs.
Following this, we then transferred our blocks of Scratch into real blocks of Python code. This allowed us to automate the robot to move around the maze with no user input. We achieved this by fine tuning the length of time each motor spins.
We also decided to blu-tac a whiteboard marker to the robot and make it into an elaborate Spiro-graph! This was an excellent way to visually demonstrate how loops work.
As the day drawn to a close we learnt by splitting code up into pieces, it is not as daunting as it first appears and by applying logic, you will produce very impressive results.