Learning to Code in the Real World — My time at White October
Hi, I’m Tara!
I’m 16 and I have just finished taking my GCSEs. Although I’ve got two ideas for what I want to do when I’m older — either Psychiatry or Astrophysics — I’ve always been interested in computers.
Over the summer holidays, I decided to seek out some opportunities for work experience. Fortunately, I came across White October!
My first day was a bit of a rollercoaster, but I was ready to take on what the day had in store. When I arrived, I walked in on the Monday icebreaker, and the question was — What was your favourite ice cream during childhood? I chose a particular coconut ice cream that you can only find in Menorca. Following this was a business meeting which was tricky to understand in the beginning. But everything made a lot more sense the more I found out about White October, and their role as a digital product consultancy in the tech industry.
My mentor and Senior Developer, Ed, then showed me to my desk for the week. I was given the task of plugging in the Raspberry Pi and getting it booted up. While I had one at home, I’d never actually experimented with it. The first thing I did was open up an IDE (Geany was what was on this one), and try out “Hello World!” It worked!
We went back upstairs, and he briefed me on what we were going to be doing:
The idea was — to program the Pi to flash different colours in different ways for different ‘statuses’, so that you could tell whether a colleague was available to help you or not.
Programming the Pi
Ed gave me the creative freedom to create my own status. So I read through the already-created actions.py to work out how this script was controlling the lights on the Blinkt board, and got straight to changing the alert colour to pink. It didn’t really work at first, since I chose a light pink (which just looked white). But when I made it a bit redder, you could really tell! Mission accomplished.
Next I made a ‘loading’ function (that ended up being useless in the end, but it was fun to make) — where three blue lights would move across the LEDs. I adapted this to make a ‘timer’ function (also useless), which I was more proud of. It gradually filled the strip of LEDs with blue lights over a user-inputed time limit, and flashed red three times when it was done.
The Web Part
So far so good…until I was introduced to the web element of the project. Python was something I was quite familiar with, and had been working with since I was about 12. HTML and CSS however… Ed showed me webpage.html and webpage.py and — wait, what..?
You can run a web page through Python? I never knew that!
It turns out there’s something called Flask that does all the hard stuff for you. Awesome. Anyway, I read through these files to work out what was going on. And although I didn’t completely understand it, I got the gist of things.
On Wednesday, Ed made the project even bigger. Instead of controlling just one Pi we were going to control multiple, and all through one web page (or ‘Dashboard’ as we called it). He drew some vague ideas on a whiteboard and I got started. I didn’t really have much idea of how to do it, but I assumed it would just involve replicating the web page multiple times. It was much harder than that and I was starting to find the CSS frustrating.
All I wanted to do was centre some text – how many different ways are there to do that?!
And then don’t even get me started on trying to make them into a grid. Bootstrap to the rescue!
I was told that Bootstrap would solve all my problems. But I only used it to make a nice looking button. It was blue in normal Bootstrap, which didn’t fit my pink theme. So I customised it and made the button pink, as well as importing the new style sheet. By the end of the day, I had a working dashboard that controlled the Pi and had the potential to control others — and it was all in shades of pink!
The non-dev stuff
On Thursday, Ed was out of the office so I had a business day with the non-devs in the office! Hillary, a Product Strategist, let me shadow her for most of the day, and we did some research about how VR and AR is being used in museums around the world. I also got a 101 on project management from Phil, Delivery Lead, which was something I found fascinating.
In the afternoon, Hillary let me sit in on an internal meeting about building a product for students. I was able to provide some insight into what students want, need and already have — and I really felt like a member of the team. I found it interesting to listen to how the non-developer side of the company manages people and projects. It’s actually a very complicated process!
At the end of the day I worked out what the problem with my lights was. It turns out the Pi was making two files to read the status from — so it had two files at once! I’d tell it to go offline and it’d be partying. However, I only realised this around five o’clock so I would have to wait to fix it.
At the start of my second week, I got started with cleaning up the code I had. This way I could understand it better, and the next person would find it easier to work with. I did this by making any necessary comments on it and separating out certain code, so that each file was as simple as it could be.
Some code needed generalising, like the code to find the devices currently connected. So I worked with the computer programme Avahi to identify those in a separate Python file, which my dashboard would then use. I also made it so that most of the files didn’t need changing, which meant it could be transferred to another Pi with no problems. The only unique file would be the file that described what the Pi could do.
I separated the original actions.py into two files: one that would be unique to the device, and one that would form a base for that file. This way, anyone could program some new functions to the device by modifying one file, based off the contents of another file. Through doing this, I learned a lot about how to make code clear and efficient, and what the general good practice was considered to be.
Adding new devices
After doing code-cleaning and drawing multiple mind-maps to try and understand the code myself, I moved on to hooking up new devices to the dashboard. I started with a simple light switch (still a Pi, but functioning as a light switch). I installed Rasbian onto a fresh SD card and set up SSH and the WiFi. I then created an ‘on’ and ‘off’ function and I could now control it through my dashboard.
A cool slider feature!
Fixing some bugs
I also discovered how to fix my crazy lights problem. When I looked at the cron file for the Pi, it turned out Ed had done some example that meant that every day at five o’clock, the Pi partied… I got rid of this because sorry, no partying unless I say so.
On Thursday, I installed Rasbian etc. onto a new PI. I decided to keep it simple and have it do the same things as my original Blinkt. When trying to copy the files to the new one, I came across an issue with encryption and keypairs. Due to the fact I’d moved the SD card into a different PI, it didn’t have the half of the key to allow me to SSH in from my computer.
I had to clear the hostname from my computer and try again. It worked, and I was able to copy the files across. I then set up cron on it so that the required files would run on boot, and all I had to do my side was run dashboard.py. Now, I had three devices that I could change the statuses of through a web page. Awesome!
Overall, my time at White October was very beneficial. I learned about how developers deal with clients, how they work together in a team (through things like GitHub), and how other members of the company work with them. I finally understand what the job of developing websites is and what it actually consists of. I feel like development is definitely an option for me and I would love to go into IT when I’m older. I’m just not sure which option to choose now!
Thank you for reading. Do share your comments below!
We’ve learned that Tara scored in the top 2% of the U.K. on her GCSEs (many in STEM subjects) — congratulations, Tara!