Raspberry Jamboree 2013

Manchester recently held the first ever Raspberry Pi conference – Raspberry Jamboree, held at Manchester Central. It’s been a year since the launch of the Pi, and this event was to review what we did in the last year, and look forward to what we’re going to do this year and in the future.

The day kicked off at 10.30 with an opening talk from organiser Alan O’Donahoe, followed by a wonderful keynote from BBC Micro pioneer Steve Furber. The first session of talks featured Andrew Robinson (creator of PiFace), Carrie Anne Philbin (from Geek Gurl Diaries) and CERN‘s William Bell (talking about MagPi). Meanwhile, in another conference track, a hands-on workshop was being led by Mike Hewitson (LateRooms) and Pete Lomas (Raspberry Pi Foundation).

Up next was a panel discussion with Raspberry Jam organisers and attendees – including Lisa Mather, Dawn Hewitson, Ben Smith, Jack Wearden and myself. We introduced ourselves and discussed what Jams are, how they work and what we think about them, and answered questions from the audience:

One of the things that came out of this was when asked where teachers and Jam organisers could get material from to teach coding or run activities, the panel suggested using existing online resources like Codecademy and asking for help on Twitter, and I said that between the community we should strive to make resources available for this kind of use. I suggested anyone interested get together with me to discuss creating a central repository for programming tools and exercises for the classroom, code clubs or for personal skills development – using GitHub as an example platform for how this could feasibly happen and have contributions of new projects and improvements of existing ones, and making it easy for teachers to download and use. Since the Jamboree I’ve been in talks with a few people regarding this. All I can say right now is watch this space – or, better – email me your thoughts if you’re interested.

After lunch I got to see Raspberry Pi Foundation evangelist Rob Bishop speak about what’s going on with them, which was fantastic. He’s a wonderful enthusiastic speaker and I really felt the energy of what this is all for. I got a bit carried away with this tweet:

Next up was Paul Hallet, whose project DjangoPi had caught my attention when it was announced last year. That’s one of the great thing about the Jamboree – we’d all heard of all these names but never met most of them, so it was amazing to have everyone all together in one room where you could put names to faces, shake a few hands and pat people on the back! Paul’s talk was on crowdsource funding for projects, and he went over the story of his projects such as DjangoPi and the coding club he ran in a local school. Great going for an undergraduate student! He already has a fantastic CV!

Following Rob and Paul was one of the Manchester Raspberry Jam regulars – a 13 year old who goes by the alias ‘Mini Girl Geek’. Amy Mather was asked to present a project she and I started at a Jam in December – Conway’s Game of Life. What began as a simple Python programming exercise turned in to a really interesting project involving pygame, Raspberry Pi, Arduino and an LED matrix display! Amy’s talk was extremely well received, she was praised by all and congratulated personally by the likes of Paul Beech, Rob Bishop and Pete Lomas! As one of the adults who has guided her along the way, I’m very proud of her for giving this talk and can say she did so professionally – a thoroughly enjoyable talk. Now watch it!

It’s since been featured on the Raspberry Pi blog and in the Pycoders Weekly newsletter!

A closing address from Alan rounded things up and a few of us headed to the nearby Pizza Express. After a mishap with their machine not accepting my (perfectly valid) card, Alan pulled a few strings and persuaded them to accept slightly less cash than than the value of the meal, we hastily moved on. Most of the group headed home but a few of us stayed out and proceeded to Brewdog where we later met up with Rob, Paul, Carrie Anne, Simon and Andrew and the others. We had a great night getting better acquainted with each other – as I said, many of us knew each other by online personalities only so it was interesting to speak in person for a change. We also dished out a few dozen Raspberry Pi coasters around the bar. I had a fantastic day and really enjoyed socialising in the evening. I tweeted this the following morning:

Thanks to Alan for organising the event, to Les & team for their work on getting the videos recorded (and live streamed!), to all speakers and attendees and to the sponsors for making the event possible – CPC, Bytemark, BCS Manchester, Frogtrade, OCR & PC Pro.

You can see all the videos from the day on Alan’s YouTube account (or download the video files from Bytemark Jamboree Download Centre)

Update: here’s a video summing up the Jamboree:

PHPNW12

This weekend I attended the fifth (my third) PHPNW annual conference. As a member of the local PHPNW user group and community, I volunteer as a helper which involves getting delegates registered, getting the speakers to the right place and making sure everything’s running smoothly. Starting on the Friday evening hackathon social, I got chatting with a few faces old and new and once I’d eaten, got coding with Mike – we did the Ordered Jobs Kata in PHP – pairing and using PHPUnit. We continued with this, along with getting in conversations with other delegates, until around midnight – then Mike gave me a kickstarter demo on Phing – the PHP Deploy tool – which I’ve used before, but never written build scripts for, so that was a really useful session – well in to the morning!

Arriving at the conference centre bright and early, donning our new PHPNW12 red helper t-shirts we got people registered and handed name badges out. Once we had everyone settled in, the event kicked off with a truly inspiring talk from Google’s Ade Oshineye on relating API design to real world usability (like doors that are hard to work out how to open). I then shadowed Patrick_Allaert for his talk on PHP Data Structures – I learned an awful lot about the different data structures available in SPL – I had no idea they were even there. Picked up some other useful tricks and tips too.

I chatted with Ben Waine over lunch and headed over to Michael Heap‘s talk on designing systems to scale, though the room was full so I ended up hanging out in the “corridor track” with the Magma crew. In the next session I opted for the unconference track for Ben’s talk on ‘Testing Your Shit with Behat’ – cool to see Behat in action! Next up I was shadowing for Google employee Ian Barber, who gave last year’s keynote (before he worked for Google) entitled ‘How to Stand on the Shoulders of Giants‘, which is well worth a watch. This year’s on ‘How to Build a Firehose’. A really interesting talk on how to deal with exposing live data streams in real time.

Following the usual wrap-up of the day, the social happened.

Somehow I managed to get up in the morning and head back to the conference centre. The first talk was on Responsive Design at the BBC – a fantastic and intriguing talk from John Cleveley. The second talk slot had two talks I really wanted to see – Adrian‘s talk on using nginx on the Raspberry Pi, and ‘To SQL or To No(t)SQL‘ by Joroen Van Dijk – but I was down to shadow the other track, Recognising Smelly Code, which I really enjoyed – had some really good points and the speaker shared my adoration of good naming conventions and the single responsibility principle.

Another great conference – it gets better every year, without ever having been bad. Thanks to Magma for organising, and to all the sponsors and delegates for making it an awesome event. It really reminded me how great the PHP community is.

I will close with a statement expressing my opinion of Drupal:

Photo credit akrabat, Stuart Herbert and vcrgardener

Manchester Raspberry Jam Continued

I’ve now hosted four Raspberry Jams in Manchester. I posted about the first and second, here’s a summary of what went on at III & IV.

The August Manchester Raspberry Jam kicked off when Kat opened up the Madlab and I gave an opening talk about what had been going on in the news in the Raspberry Pi community, featuring announcements like Raspbian and the Gertboard, and showed examples of what people have been doing with their Pis – including Freaky Clown ruinning Metasploit (a pen testing tool) to the Pi and my personal favourite, Pi in the Sky – the first Raspberry Pi to visit near space. I then got people to write down what they wanted to learn, or what they needed help with, and then what they would be able to help others with, and tried to pair or group people together to work on things.

Kat and Alex got straight on with playing Quake on the big TV, which was pretty cool. Meanwhile visiting newcomer Simon – who was shocked when the taxi driver who shuttled him from the station said he’d never heard of the supposedly world famous Madlab – got out his lego-built Pi/breadboard stand and demonstrated his Scratch/Python/GPIO hybrid project which involved a program built in Scratch which would run through the traffic lights sequence on screen when the space bar was pressed, and also feed the same sequence through to the LEDs on his breadboard. Amazing stuff  – if you’re interested in this sort of thing drop him a line on twitter, or take a look at the questions he’s posted to the Raspberry Pi forums to see if you can help.

We also had Paul helping his daughter built a game in Scratch, we saw a Motorola Atrix dock powered by the Pi, we even VNC’d in to a Pi using an Android app on my mobile phone and then from my Nexus 7 tablet! Around 5pm once people had helped my carry my 3 monitors, TV, laptop, netbook and bag full of cables back to my flat, we headed to the pub where we stayed for several hours, and where Simon kept his pink lego Pi kit out on the table. During this time we witnessed HacMan move in to their new hackspace premises just a couple of doors down from Madlab. The phrase “How many geeks does it take to network a hackspace?” was brought up and probably tweeted, as we watched them run a patch cable across the outside wall from Madlab over the café next door. The following day I got my Pi out at home (I never get to play at the Jam – I just end up running around making sure everything’s running smoothly, and in any case all my kit gets handed out and all the screens tend to be in use) and installed OpenElec on a spare SD Card (keeping Raspbian on another), which runs XBMC – a fantastic media centre which I easily managed to use to stream high definition video over the local network from my NAS. I tested it out with X-Men: First Class (720p) which played no problem – looks great on monitor or big TV! I’ve since installed the XBMC Android app on my phone and tablet and I can select something to watch on either device and tell it to play on the TV, then use as a remote control. The future is here.

A month later and we’re back in Madlab for Manchester Raspberry Jam IV – again I begin with a recap of the news: Revision 2.0, Made In the UK and Make Your Own PiOS, and move on to skill share pairing! As usual we get a couple of people who need help setting up their SD card so I volunteered to show them get them up and running, and everybody else just picks something and starts hacking! Simon fires up his pink lego kit again (and eventually ends up blowing it up somehow…), and a newcomer called Ian started work on a project which would allow the Pi to work as Time Machine to back up his Mac!

Later on in the morning a 10 year old kid came up to me and asked if I could teach him some Python (I’d put that up as a sharable skill on the wall) – I said I’d love to, and asked what he wanted to learn, and he said anything to get him started. His Dad sat next to us an observed, saying it reminded him of learning BASIC when he was at school. I started with printing a string, then storing a string in a variable, printing it from its stored value, then storing integers. We then looked at the difference between assignment (x = 1) and comparison (x == 1), and the first idea that came to mind for implementing some of this in a program was checking an entered PIN number against a set value. While showing him the syntax of things like if statements, I let the kid type away, letting him make mistakes if I thought he would learn from the error messages, sometimes asking him what he thought it would do (he would often spot a flaw immediately), sometimes just reminding him to go on to a new line or whatever. But he was doing great. Whenever we completed adding a new feature, I’d ask him what we could do next, so at this point he’d say, “Why don’t we give them 3 chances to get the PIN right?” and we’d look at how to implement that. We’d start by copying the code that asked for the PIN the first time, and sticking it in the ‘else’, so the user would be prompted a second time if (and only if) they got it wrong the first time.

Once we had that working, I introduced the while loop, and explained a simple use case whereby it would count the number of attempts made, and keep running over the same code in the loop until the number of attempts reached 3. Then while adding feedback “Your card is locked” if they were incorrect 3 times, I noted that we could make the number of tries a variable, so that we could change it once at the top and not everywhere in the code. He got that. Then we made it tell you how many attempts you had remaining, by subtracting the number of attempts from the number of attempts allowed. And then he said he thought if he learned any more he might forget what I’d taught him, so he wanted to stop and practise that at home. I emailed the file to his Dad and suggested he might want to try adding something that calculates the balance if they withdrew money.

We finished with a short presentation from a young lad called Barney, who had built a Morse code device with his Dad – you type in a word on the keyboard and the LED on the breadboard flashed according to the Morse codes for the letters in that word. Brilliant! Then we cleared up (and hauled the vast array of monitors to my flat again) and went on to the pub. Everyone always has great fun at the Jams, and everyone’s got something different they want to get out of it. Some just come and take notes and listen to people, some bring their kids to get them excited about computers, some bring crazy contraptions they hope to get working on the Pi with the support of the group, some – like me – just like being there! It’s a great atmosphere and it’s fantastic to see kids and adults playing away, learning and having fun! I don’t generally get much chance to do much myself, but it’s always nice to pass on some python knowledge and help out where possible – and to witness amazing things happening all around me! The Pi is a wonder and we all thank the foundation for all their work in getting it to where it is – and look forward to see where it goes next! Thanks again also to Madlab for hosting the events. I really don’t know how we’d do this if the space wasn’t available.

Manchester Raspberry Jam

I’ve now run two Raspberry Pi events in Manchester, affectionately known as the Raspberry Jam. The first in June, which was the first Raspberry Jam in the UK, and which featured on the Raspberry Pi Foundation’s website where we gained recognition for getting people together to share ideas, demonstrate what we’ve been doing with the Pi, and getting kids interested in building games and writing code as well as inspiring people all over the UK (and the world) to set up their own groups. Continuing the success of the Jam, our second event took place a month later in July, which was equally enjoyable. The July event took place on the same day as the first Cambridge Raspberry Jam – a huge event attended by 300 people and hosted by the Raspberry Pi Foundation at Cambridge University. A number of the attendees from the first Manchester Jam went along to the Cambridge for this, so we look forward to hearing from them about what went on there.

I opened the first event with an introductory talk about my experience with the various computer systems in use in education as I progressed through school. This covered me playing on Granny’s Garden on the BBC Micro and word processing on an Acorn Computer before moving on to Windows 95 PCs, battling with this ‘Internet‘ thing we’d begun to hear about – wondering what the word ‘Yahoo‘ that often appeared was supposed to mean, and my first delivered tech solution at age 11 involving a series of coloured floppy disks.

I kicked things off by initialising a barcamp-style talks grid, and encouraged people to give talks or demos – we had a Python tutorial, talks on Linux for beginners and 3D printing a RasPi case, and a demo of a Raspberry Pi / Arduino hybrid implementation of the game ‘Operation‘ using a live-size manikin! Talks were optional and there was plenty else going on alongside this – with people demonstrating the likes of XBMC on the Pi, chatter over the distributions in use, people learning Python, and most notably Dan Hett from Manchester Game Jam teaching 13 year old girl geek Amy how to get started building games using Scratch – before long she had drawn up some characters for her game, implemented them as sprites in her Pacman clone and started using the drag-and-drop constructs in Scratch to control the actions in the game – it was really impressive how she was thinking like a professional developer – understanding the problems that arose with laying out the behaviour of the objects and their interactions during gameplay. Not only did she understand what these problems were and why they were problems, but she actually thought hard about how she could overcome them, without giving up on it being too difficult. Within a couple of hours or so she had built a Pacman clone with her own drawings as characters and built another game involving flying bats – which I noticed she had instructed to keep track of high scores!

Amy showed me how she had done all this in Scratch (I have not used this before) and it looked to me like lines of programming code – just with each construct in different coloured blocks. I told her if she could read that she would find Python no problem so I asked her if she wanted to watch the Python tutorial – she watched it quietly for about 15 mins, then walked off when the adults started debating over Python 2.7 vs. Python 3.2, and just went back to her Pi and started typing away. She’d remembered all the things shown in the tutorial, and tried to recreate the examples shown. With a little help from me (syntax only) she managed to build a command line based ‘game’ making use of user input and randomly generated numbers. These kids have serious potential. When given the opportunity, they make awesome stuff.

Once we packed everything away I got together with the guys from the Blackpool Linux User Group and we began recording for the Full Circle Podcast – generally covering the events of the day, discussing the potential of the Pi and the future of such events.

The second event was much like the first, except I introduced an idea I saw at another event I attended at MadLab recently – LAMP & Beyond – run by Jeremy of PHPNW / Magma Digital, whereby attendees were asked to contribute post-it notes of skills they had to share and skills they wanted to attain – with the intention of matching groups of people up with a person to lead them in learning a new skill, be it language, development tool, source control package or the latest hipster technology! This worked really well and everyone got a lot out of it. With the Raspberry Jam I hoped this would allow beginners to get started, others to share ideas and help each other with a leg-up without having to figure everything out for themselves and overcome initial issues and get on with something cool. A few people wanted to learn Python so I tutored a few people through some basic constructs of the language compared to what they’re used to in their own languages. Some people needed an OS image loaded on to their SD cards so we had a few people helping them with that, others were making games again (Amy returned to continue with her projects) and some others had the Pi running on an old serial terminal! Towards the end I finally got chance to do something for myself – I got my Pi talking to a breadboard using the PyPi GPIO library! We figured out which pins were which and hooked up an LED with a resistor and controlled its on/off status with a Python command – followed by a few functions (let_there_be_light() and such) which could be called to turn the light on or have it flash. A pretty cool start to external hardware controlled by the Pi. The interesting thing about this ability is that it would be possible to program the Pi to do something and have it do it without use of an external display – just listen to events happen and do things according to the state of those inputs – anything from controlling water sprinkler systems based on soil moisture to … well, anything!

I think it’s fair to say that everyone who comes to one of these events finds something out about the Pi they didn’t know before – the skills sharing nature of the Jam is to be praised and I would encourage anyone of any age or experience to attend one – or start their own!

Update: a few pictures from Jams I & II:

Photos courtesy of Les Pounder [flickr] and Dan Hett

XP Manchester XL – Release Early, Release Often

Yesterday was XP Manchester‘s XL event – a Saturday coding session of pairing, katas and a team bot tournament hosted at the MadLab.

I managed to persuade Kris, a friend I used to work with, to come along – it’s his first experience of this sort of thing, so I’m really glad he got introduced to the world of XP and TDD. Ash was there, Mike brought a friend along who’s also new to agile, and there was a decent crowd of about 23 attendees which was great to say we were expecting snow that afternoon. The day was led by Mark with *ahem* assistance from Jim.

We started by pairing up and solving a decimal to Roman numerals problem using TDD. I did mine with Kris to get him up to speed with what TDD was all about. We used a rather amateur if/elif construct in Python to solve for numbers up to about 20, but it was a good way to get in to the mood and to show Kris the methodology of thinking up a feature, writing a test, writing the code to implement the feature, testing it, refactoring and moving on to the next feature. The emphasis of the day was on ‘release early, release often’ which is a really good attitude for software development. As Facebook founder Mark Zuckerberg said in his letter to the shareholders:

Hackers try to build the best services over the long term by quickly releasing and learning from smaller iterations rather than trying to get everything right all at once. To support this, we have built a testing framework that at any given time can try out thousands of versions of Facebook. We have the words “Done is better than perfect” painted on our walls to remind ourselves to always keep shipping.

The next session was the opposite conversion, Roman Numerals to Decimal, which I managed to do quite well in a pair with Mike’s friend, a PHP dev with no experience of TDD. We did the kata in Python and solved it by looping through the characters from right to left, looking up the value of each character and adding it to the total. If a character of lower value than the previous character was found, its value was subtracted rather than added. I thought this solution to be suitable for any numeral using characters the program knew about. Within the set time we had tested up to 20 but it was failing on 14, which made no sense to me. I tried to debug but found no problems so I left it to inspect later. I got chance to take a look at it later on and with a few handy tips from Michael (assertEquals more useful than assertTrue) I managed to spot the mistake causing it to evaluate 14 wrong. I was right to think the solution was good for all, though, as using the value characters up to M (1000) and adding some more tests for higher numbers in the hundreds and thousands, all tests passed.

The third pair session was the now infamous Ordered Jobs Kata by Martin. I did this kata in Ruby with Michael. Ruby’s not one of my preferred languages like PHP or Python but I do like the chance to work in it for exercises like this (and I’m sure I’ll be doing more of this as I’m now living with a Ruby dev). I’ve had a go at the Ordered Jobs kata once before but didn’t complete it, so it was interesting to have a fresh attempt. We got off to a really slow start when we hit the first sign of difficulty (introduction of dependencies), and took quite a while working out a strategy for holding the input data and making sure dependencies were completed before the other jobs, and realised that although our first solution was technically sound, that the test failed because of the order we asserted in the test. We re-jigged our code to make the test pass and moved on. Speaking to Ash about this later, he pointed out that we’d have been better to specify several smaller pieces of the test separately, i.e. number of jobs in input must match number of jobs in output; all jobs in the input needed to be in the output once; and each of the dependencies individually needed to be listed before their respective dependants. We continued through the next stages and progressed rather well on to stage 6 which we just managed to pass by the end of the session. It turned out we’d managed to get the furthest in the room with that one, despite our slow start.

After lunch we had a bot battle of rock-paper-scissors-waterbomb-dynamite wherein we had to program a ‘player’ to play against a bot on a server built by Jim. It needed to be in C# so each of the .NET developers in the room split off and we joined them to make teams of 3. Kris and I teamed up and our strategy took a while to get going as we had many problems whenever our bot got loaded on to the server we seemed to get disqualified or just fail to take its move. However once all buggy issues resolved we devised a method of logging the opponent’s name and each of its moves. This allowed us to determine what had gone on in each round, what strategies other players (or the pre-programmed bots) were taking, where we won and where we lost. We made a few subtle changes to our attack and added some different approaches when we faced particular known opponents. A fun afternoon which resulted in us coming second to Mike’s team in the final round (although the bots won overall). Interestingly, Mike’s team was the only team running proper tests…

After we left the Madlab we had an extensive drinking session which involved geeky hilarity and many OHs on twitter. Huge thanks to Mark and Jim for making the event happen – and to the Madlab for hosting it.