Constructing my hackable classroom – Part 1 #ThisIsMyClassroom


In late 2015 I had the opportunity to sit down and design a classroom environment suited to Computer Science students. After surveying my students and getting lots of ideas (including one which resembled a living-room with C shaped sofa – tempting, I’ll admit) for what they consider would be their optimal learning environment I let the ideas stew while over in London in January for the Apple Leadership event and BETT 2016.

My interest in flexible learning environments roll way back to my time at Inverurie Academy when I worked in an open plan floor of six classrooms. I posted my first #ThisIsMyClassroom blog in May 2011 as a way of recording the changes to my classroom environment. Even at this time I was asking students about how they would like their learning environments to be arranged and remember the 3D walkthrough videos created by a great S3 class. It was truly excellent work that culminated in a video conference with Anna Rossvoll, who was at that time creating her own flexible learning environment at Hill of Banchory school in Aberdeenshire. I’ll try and find these videos and upload some of them.

Since the launch of the Raspberry Pi Computer Science teachers have had the ever-increasing opportunity to embed low-cost working models in their classrooms. While at Robert Gordon’s College I set up a separate Raspberry Pi lab (imaginatively titled PiLab) but when we moved to new classrooms in 2015 integrated the Raspberry Pis into my Computing classroom and made them part of the curriculum rather than an extra-curricular club.

I also used my experience from attending the PiCademy in Cambridge to investigate how Raspberry Pi might be used to allow students to access previously static areas of the classroom environment and bring them to life.

Perhaps the final piece of the inspiration puzzle came when I visited OnHouse Milano during last session. While primarily a showcase design home I had a great discussion with their programmers on how they use themes and scenarios to integrate a number of systems. This gave me the idea of creating Python API wrappers that allow the students to move easily access a number of hackable devices in the same program. These libraries could then easily be imported into a student’s programming environment and let them, for example, take the colour sensed by a Raspberry Pi camera and mimic it in the Phillips Hue lighting system.

I still want to keep the same classroom environment ethos as I introduce more (relatively low cost) interactive technology to the classroom – the students connect more by displaying their work. So areas of the room are set aside ready for student posters which can then be augmented using Aurasma, CodeBug projects can be displayed in a gallery area around the LAUNCH posters, the robotics created by students in extra curricular clubs are always on display. It does sound like I’m looking forward to the room becoming a slightly updated version of Eduardo Paolozzi’s studio

At this point the desks are in, the screen is in a more suitable position so that all students can view, the double whiteboards are up and the power provision in the classroom has been enhanced. There are also elements of the hackable classroom in place and the students will begin to use these as part of their lessons in the coming weeks and months

Cryptography #iGCSE #ComputerScience

One of the nice and not-so-nice things about vague arrangements documents is that you have to work out how to best fill the gap.

Encryption methods are part of the Computer Security section of the course – symmetric and asymmetric encryption to be exact – and, while I could simply put two slides up on the screen and move on, I saw this as an opportunity to break away from exam style questions and have a little bit of practical fun with the students.

I introduced my Year 10 students to the Caesar cipher this week, surprised that very few of them had even heard of it. They caught on quickly though and were soon manually translating coded messages back into plaintext.

But as the lesson progressed the messages got longer and the students began to find translation very time consuming. So, after a bit of discussion, we decided it might be best to ask a computer to do the translation for us. We would still provide the ciper-text and shift key, and it would do the rest.

This allowed us (imagine that) to then recap on relevant pre-defined functions to translate characters into ASCII codes and then build an algorithm to apply the shift key to these ASCII codes. Once the codes were converted back to characters they were ready to display on the screen! Most students managed to get to this point, with some even working on alternatives (more on that later).

The next day the students returned and were given a tougher challenge: decryption without the shift key! We discussed the letter frequency graph shown above and tried to create an algorithm to accurately calculate the shift key.

The open-endedness of this task challenged everyone and the variety of solutions suggested touched on some of the actual decryption methods utilised.

A few students suggested a brute force decryption of a digest of the entire message, looking for a small number of short English words before comparing the calculated shift key to the frequency analysis graph. When challenged further they explained that this would decrease the processing time of the decryption algorithm as it wouldn’t have to translate as many characters. Some students had even had researched further to find out which were the most used English words in written text!

The students rounded off the lesson by creating a list of advantages and disadvantages of symmetric encryption. While students took longer on the concepts it gave them the opportunity to understand some of the ideas and issues with this type of encryption.

Next week we tackle asymmetric encryption. I can’t wait!

Social media generated art in Python #ThisIsMyClassroom #Programming #STEAM

Social media generated art in Python #ThisIsMyClassroom #Programming #STEAM

For the third blog post on this topic I wanted to use Python to generate different pieces of art without relying entirely on the random function. I decided to use the tweepy library, mainly because I had already used it to post content to Twitter but had never investigated how it could be used to read information back from Twitter.

It didn’t take long to find out how to read the latest 10 tweets from my own timeline using Python. Then I split the individual words into a list and sorted them into alphabetical order (for no real reason at the moment, but frequency analysis will follow!). Then I used the write method from the Turtle graphics library to place each word at a random location on the screen. This was my first attempt:

Screen Shot 2016-04-03 at 23.50.08

A bit tricky to read the words I thought. And I’d accidentally forgotten to penup before moving the turtle. However this accidental vector spider web became part of the artwork (because when I removed it, it looked quite boring).

A little while later I was able to change the font size at random (I changed the font to palatino after experimenting with a few others) and changing the pencolor in the same way as previous Python art programs changed the text colour too.

Screen Shot 2016-04-03 at 23.53.35

I had a lot of text to display, even just from 10 tweets, so I thought of ways to reduce the amount. I wrote a little Python subroutine that removed hashtags, mentions and URLs (as well as any other non ASCII text) and that was enough!

The video below shows the program in action. I decided to make a video this time because you can make out the individual words much more clearly at the beginning of the drawing than at the end!

As before the code is now on github (with my tweepy details removed for security). I’ve left in a commented out section of code that allows you to run a search for a keyword, hashtag or phrase instead of taking the latest timeline so you can experiment.

Any comments or improvements would be much appreciated!