Category Archives: Random Ramblings

Hackference 2017

Well, it has been almost a year since my previous post here, very much living up to the “occasional blogger” title on my Twitter profile.

I didn’t think there was going to be a Hackference 2017, what with it being ‘the last Hackference’ last year, but here we are.

Annoyingly, I made it to Euston station at 6:44am on the Friday. The train I booked was scheduled for 6:43, and annoyingly left on time, so I had to buy another ticket. £58 poorer than I was hoping to be that day, I got on the next train and still made it to The Studio (the venue for the day) on time.

I’m not going to say much about the talks: they were all really good, inspiring everyone to think differently about programming, design, and to try out some of the new Web technologies.

IMG_1686

Here’s Oxford’s very own Ben Foxall demoing a combination of the Web Audio API, WebGL and Nexmo’s voice API. In short, a visualisation of a phone call between Ben and his mum, happening in real time!

The next day was the hackathon. 24 hours of working on whatever you want, with whomever you want, from midday on Saturday to midday on Sunday. There were a few sponsors who ran challenges to help focus the direction of the hacks, including Microsoft. Microsoft were encouraging the use of their Cognitive Services APIs – a collection of machine learning features making it easy for developers to add image recognition, OCR, speech-to-text etc. to their own applications; and they would award a prize to the team with the best use of their APIs.

What follow are the slides from my presentation at the end.

Slide text: Hi I'm Dan and I made a thingA Slack message from me: "Anyone stuck for ideas? I want to play around with some of the Microsoft image recognition stuff"

Quite early on I was looking for a team to hack with Microsoft’s Cognitive Services, but I might have put people off when I said some of it would be in PHP.

Added to my Slack message: "Mostly in JavaScript, but may involve some PHP later on. Anyone want to pair up?"

Anyway I carried on on my own and ended up creating this site, Is It A Bench?

Screenshot from my hack "Is It A Bench?"

The idea is pretty simple, you can upload a photo to the service and it will tell you if it thinks it’s a photo of a bench, along with the text in any inscriptions.

I imagine there may be a few of you who are wondering:

Slide text: Why?

Well, I’ll tell you.

This is Terence. You may recognise him from the conference on Friday, or from speaking at Hackference last year.

A screenshot of OpenBenches.org, showing a map of the UK

He made this website called Open Benches.

Another screenshot from OpenBenches.org

The idea is you can upload geotagged images of benches with inscriptions and they will appear on a map.

Screenshot of @openbenches Twitter account

As soon as someone uploads these images, the website will instantly post them on Twitter.

That poses a potential problem. The Internet is not a nice place and some people could upload photos that clearly aren’t benches. It would also be easier to enter in the text of inscriptions if there was some way of processing the images with OCR before they are published.

I set about making a content filter. I uploaded a photo to my service which Microsoft’s vision API decided was adult content and described it as “a close up of a tattoo”. I’ll leave it to you to imagine what it was.

"isAdultContent": true, "text": "a close up of a tattoo"

When my site detects inappropriate content, it responds accordingly.

Screenshot of my website. At the bottom is a question "Safe for uploading?" Followed by "Hell no. Get this off my website"

It was around this time when Joe Nash stuck a message on the Slack group looking for people to play Laser Tag. It has been such a long time since I last played it, and I couldn’t resist leaping at the offer.

It was a lot more exercise than I was expecting that weekend. Also I’m terrible at Laser Tag – I was consistently the lowest scorer, but it was such good fun anyway!

When I got back I got started on the text extraction. I spent a good 20 minutes working out why OCR wasn’t working. Turns out I can’t spell OCR.

A POST request to an endpoint with 'orc' instead of 'ocr'

I was pretty much finished with the proof of concept early on, so after some interesting chats with some of the attendees, I even managed to get some sleep!

The next morning was spent making a couple of performance optimisations, prepping the demo and appreciating the fantastic food for lunch. As a last minute idea I tried making a JSON response to work with photos from the Open Benches website. I didn’t finish that bit in time.

I presented a live demo of what I had, and introduced the Open Benches website explaining how I could integrate the functionality.

Screenshot from Is It A Bench. A close-up of a plaque is correctly tagged with 'bench'

Most of the photos that I’d submitted to Open Benches in the past were correctly identified as benches – even the close-ups of plaques which really surprised me.

A correct transcription of the text on the plaque

Sometimes the text was extracted perfectly, even keeping lines and capitalisation…

A less accurate transcription of a slightly-more-difficult-to-read plaque

But sometimes it wasn’t so good!

After my demo, I tweeted about its existence. Terence seemed to love it!

Once everyone had finished their demos, the sponsors left to decide on the winners. While I didn’t win the prize from Microsoft, I did win a Raspberry Pi Zero from the recruitment company Harvey Nash! During the conference, Harvey Nash had the brilliant idea of giving playing cards to the attendees. Two packs were given out and your goal was to find the other attendee with the matching card to win a prize. It was a great icebreaker and I’d love to see that more in the future.

The hackathon had everyone from students to veteran hackers; all of the genders, ethnicities and operating system preferences; and it was wonderful to see everyone simply being excellent each other. (Apparently that’s some sort of reference to Bill and Ted; if only I knew what Bill and Ted was…)

Here’s to the next one!

Advertisements

Hackference 2016, Part 2 – The Hackathon

<- Part 1: the conference
On Saturday, once everyone had got a good night’s ‘sleep’ (our hotel was just next to a loud club which only got quiet after 3am), we walked over to the Impact Hub.

Before I get started, I’m using the word ‘hack’ in the non-malicious form. Tabloids use the word ‘hacker’ to describe someone with malicious intent who steals data or takes down websites (for example, this article in the Mirror). We use it to describe someone who thinks the best way of learning is by doing. A hackathon is just a group of sleep-deprived developers playing with something new.

The event itself was free – paid for completely by the wonderful sponsors.

Before the hackathon started, not many people knew what they wanted to make (including me). Luckily the sponsors got a chance to inspire us with their products and announce their prizes. There was a variety of companies attending, each with some cracking prizes for the teams making best use of their services.

Continue reading

Hackference 2016, Episode IV: A New Hackference

Last weekend saw me heading to Birmingham to attend Hackference, a 3-day event for all sorts of programmers. There was a conference on Friday at the Electric Cinema, followed by a 24-hour hackathon at the weekend.

I’d never been to Hackference before, so I didn’t know what to expect. It’s a shame it’s probably going to be the last one though.

What follows is my account of the weekend, aided by plenty of tweets. The weekend was so jam-packed with stuff to blog about, so I’m going to split it up in two.

Part 1 – the conference

The Electric Cinema was a really cool venue. There were two screens, so two talks could happen at the same time. This was good because we could choose the talks that interested us most, but bad because most of the time I wanted to see both! Continue reading

Cosmonauts

I went on a spontaneous trip to the Science Museum yesterday to look at the Cosmonauts exhibition. I’ve always been a fan of space: my favourite book as a child was the DK Guide to Space; at the time I wanted to be an astronomer (strangely not an astronaut – I wanted to keep my feet on the ground), but then I realised that that should be more of a hobby than a career, so I went into computing instead.

The interest in space never really faded though. In 2012 while I was working at STFC, I helped out at their stargazing event for families. I operated the ‘Magic Planet’ – a spherical projector which would display the surface of planets and moons in the solar system at the click of a button. It fascinated adults and children alike, and inspired them to make comments like “That’s not Saturn, there aren’t any rings”, “That’s not how Uranus spins” and “Jupiter’s not supposed to be that blue”. I was able to answer most of the questions that were asked, reeling off facts I learned from another childhood book about the solar system.

A few years on from there and I’m now living in London, with the aim of getting cultured whenever possible. Yesterday was no exception.

The Cosmonauts exhibition ran at the Science Museum ran from September 2015 and today was its last day. It was focussed on the Russian side of the space race. I’d always thought that the Americans putting man on the moon in 1969 was the biggest feat, but the Russians had done so much more before that which kind of belittles the whole ‘Man on the Moon’ thing. It wasn’t a huge exhibition, but I somehow managed to stay there for 2 hours.

Here are a few photos with a bunch of interesting facts I learned along the way. Continue reading

Imojify! (bookmarklet edition)

At one point, when making my Imojify JavaScript library, I decided to make a bookmarklet which turns text into emoji whenever possible.

I mean, we all love emoji right? We use it all the time on social media. So I thought why not try and put it in more places on the Web? I thought I’d demo it to the folks at the most recent JSOxford meetup.

Continue reading

yellowbluepink

Last week I went to London with a few of my flatmates from first year. It was Halloween and we wanted to do something a little different. The first thing we did was visit the ‘yellowbluepink‘ installation at the Wellcome Collection, right next to Euston station.

It was a fairly large room filled with dense fog, lit in 3 colours. When we entered, the fog was thick but you could see the floor, ceiling and people from around 5m away.

Continue reading

JSOxford NodeBots Day

“The problem with hardware is that there is no version control” – Marcus Noble

JSOxford’s NodeBots day marks one year since I first used JavaScript (ish). At last year’s event I took an Arduino and used the johnny-five library to control it using Node. It was fun to make, but wasn’t really that impressive.

This time round, JSOxford had a bunch of Espruino Pico boards and plenty of hardware to hack around with, including continuous servos and wheels.

Continue reading

Realtime hacking with JSOxford

Yesterday I went to a hack day run by JSOxford. The theme was ‘realtime’, i.e. using Web technologies to update a site automatically from a data source.

Since I had no experience with realtime technologies before I came, I didn’t want to make anything too ambitious! I just wanted to learn the basics so that I could make something useful in the future.

Continue reading

Breaking News

I interrupt this extended period of non-blogging-ness to bring you news that isn’t interesting to anyone.

I’m not exactly what you would call a health freak. Since moving back to Bath to start my job I’ve been thinking “I should join a badminton club” or “I should join the gym”, but in 4 months that still hasn’t happened. As far as exercise goes, I walk to work every day – half an hour there, half an hour back – and that’s pretty much it.

I hate running. Sometimes I’ll try jogging to the Co-op (it’s literally just at the end of my road) but I always get so out of breath it put me off trying anything more strenuous.

But yesterday, the oddest thing happened. I woke up and thought “I should go for a run”. But it was a bit rainy that morning so I didn’t bother.

Then this morning, the weather was calm and bright, and I saw this tweet.

That tweet actually inspired me to put on my sports kit and (for the first time ever) leave the house with the sole intent of arriving back a few minutes later with an increased heart rate.

I ACTUALLY WENT FOR A RUN

And I did what the tweet said – I went on an incredibly short 1km run, but not quite as short as the one in Run Fatboy Run.

Turns out 1km isn’t very far at all, but I was still breathless at the end. Not quite a half marathon just yet, but maybe one day I’ll enter one!

Code Golf at Bath Ruby User Group

Golf: normally, unless it’s of the ‘Crazy’ or ‘Adventure’ variety (is there a difference?), I will stay well away from it. That’s mainly because my arms don’t swing and it involves quite a lot of standing and waiting around outside. However, yesterday evening I played a game of Code Golf.

The game goes like this – there are 9 problems (or ‘holes’ if you will), and you need to write a method to solve each one. The problems are fairly simple (I was reminded of first year programming), but the aim was to solve the problems in the fewest number of characters possible. This meant if you stood any chance of winning, you would have to squash your code into something compact and unreadable.

Continue reading