Tag Archives: node.js

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

Advertisements

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

Let’s talk about mobile data

In this post I’m going to talk about what I’ve done (and what I’ve not done) with trntxt in order to get the fastest page load times possible. I’ve split this up into two sections. The first part might be interesting to most of you, whereas the second part goes into technical detail that will look like complete gobbledygook if you haven’t programmed using Node before.

You have been warned.

Continue reading

Train Times Made Simple With trntxt.uk

TL;DR: I made trntxt.uk, a data-friendly train times website.

Over the past few weeks, I’ve meed putting a little bit of my free time into developing a train times website.

The idea came to me after a JSOxford talk by Tom Lane about open rail data. It turns out that the data you see on train station departure boards is all accessible, so long as you register for a free API key.

I decided that the reason why the train times app on my phone wasn’t working was because the data was taking too long to arrive over a 2G connection, so I thought I would try and speed things up a bit. I’d make a website without using anything unnecessary, and in doing so I’d have a website that works well on whatever device you’re using.

trntxt.uk

I call it “Train Text”. It works like this. Let’s say you’re at London Paddington and you want to find out when the next train to Bath Spa is.

You would point your phone’s browser at trntxt.uk/paddington/bathspa. You don’t need to use the full name of the station – just use part of the name and trntxt will probably find it. Just ignore spaces or any other punctuation. If you know the 3-letter station codes, you can use those too and save some typing time in the process (trntxt.uk/pad/bth). trntxt makes these station codes visible to help you remember them.

The website was designed so that even my old Nokia 6303 can access it correctly on a slow 2G connection.

image

I’ve stripped out everything unnecessary so that you can get the fastest responses possible (more on that in another post). That’s why it doesn’t look very good 😛

There are, however, some limitations. One of them being it can only handle direct routes. If you’re traveling from Swindon to Oxford, you need to change at Didcot. You’ll need to make a request for Swindon to Didcot, then another from Didcot to Oxford.

It doesn’t do arrival times yet, but I’ll get them in soon!

What’s more annoying is that after I made the site, I realised that it seems to work everywhere apart from Bath Spa station.

image

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

Bath Hacked 2.1: VoteTub

Photo taken by Jon Poole (I think). More photos here.

This weekend I took part in my first ever weekend-long ‘hackathon‘, where a bunch of developers group together to create solutions to make Bath better. The event took place at the Bath Guild. We were encouraged to take publicy available data about the city and turn it into a resource that members of the public could actually make sense of.

I formed a team with two other hackathon newbies, Christopher and Cliff. Christopher wasn’t a coder but had an idea for a project, Cliff had experience as a front-end developer, and I was a recent graduate with almost no experience building a thing from scratch.

Christopher’s idea was to build a website that would help people decide who to vote for in future elections. It would list the candidates with links to various forms of social media, and give unbiased policy information. It would also look into the past, providing results of previous local elections, and also the future. An idea was to try to tackle tactical voting. The site would ask visitors who they were going to vote for, then who they would ideally like to see in power. It would then show them the summary of what other people replied. We thought it would be interesting to see if this data would affect people’s decisions.

Continue reading