Train Text-imonials

My train times site http://trntxt.uk is just over a year old. While I’ve picked up a handful of users, it’s fair to say that it’s not exactly gone mainstream. And that’s fine – it’s difficult to get people excited about a website that only has one function and doesn’t look visually appealing (by design).

I wanted to present trntxt at JSOxford‘s Show and Tell in May, but I knew that a black and white website wouldn’t make much of an impact. So I wanted to jazz up my talk with enthusiasm. Enthusiasm and memes.

Normally, the format of JSOxford’s Show and Tell session enables people to show off their personal projects by opening the live site in a new tab, without any slides, in about 2 minutes. And while this would have been OK, I really wanted to demonstrate the functionality on a smartphone, which is kind of difficult to do when there are about 50 people to present to.

Instead I used my slot to demonstrate trntxt in more of a ‘lightning talk’ fashion.

17 slides in 3 minutes.

trntxt presentation at jsoxford
Photo by Ryan Brooks

Continue reading “Train Text-imonials”

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 “Cosmonauts”

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 “Imojify! (bookmarklet edition)”

Sharing my photos

For about a year now, my Twitter profile has contained the phrase “Occasional blogger, amateur photographer, head in the Cloud”. Now since you’re reading this you know I write blog posts occasionally and that the content of most of them is rather computery, so that’s 2 of the 3 claims sorted.

I’ve wanted to share some of my photos for a while, but I’d never got round to it (unless you count the very occasional pictures I post on this blog), until last week when I finally opened a 500px account. The username is DanPope, simply because danielthepope was already taken 😦

Hopefully I’ll put something new up there each week. Let’s see how long I can keep that up for! I created an IFTTT recipe to automatically tweet my uploads too.

Check out my photos here: https://500px.com/danpope

Imojify: my first JavaScript library

In which Dan finds a project other than Trntxt.uk to blog about, and says ’emoji’ 11 times.

TL;DR: I made Imojify, a library that converts emoji in :colon: notation into their graphical equivalents. It’s on GitHub, NPM and Bower.

On Monday morning I had an idea for a brilliant JavaScript library, but I couldn’t do anything with it because I had to go to work then I had a choir rehearsal. I got back from choir at 10pm with the idea still in my head along with some very catchy Christmas songs.

I had a working (but buggy) prototype by 1am.

The idea was a library that could convert colon notation emoji into their PNG image equivalent. For the uninitiated, colon notation is often used in chat services such as Gitter and Slack. It consists of a word or phrase wrapped inside a colon, such as :angry: or :stuck_out_tongue:. The big benefit of this sort of emoji is accessibility – if the picture isn’t rendered for whatever reason (e.g. for a blind person using a screen reader), it is still possible to understand what the author meant. Continue reading “Imojify: my first JavaScript library”

Sleep easier after screen time with f.lux

F.lux is an application that adapts the colour profile of your computer to the rising and setting of the sun.

Your computer screens produce white light, the same colour (albeit different intensity) as the sun. This is fine during the day – the colours look natural, but as the sun sets, should we really still be looking at the sun? This is essentially what we’re doing when we use our laptops, phones and tablets at night.

There’s a lot of scientific evidence that shows the effect of blue light on the body’s production of melatonin (the hormone that helps you sleep). I’m not going to go into detail about this, just know that blue light is not good for you if you’re trying to sleep.

This is where f.lux comes in. As the sun sets, the application changes the colour of your screen to match the colour produced by light bulbs instead of the sun. When the sun rises, the colours go back to normal. On first use, this makes the screen look orange and weird, but it’s not long before you get used to it and wonder how you ever lived without it. Seriously. Once you’ve used it for a few days, try disabling it. You’ll feel your eyes strain to adjust to the new colour.

Without f.lux, You don’t tend to notice that the screen is a completely different colour to its surroundings until you see it in a photo.

flux.jpg

On the left is my laptop with f.lux disabled. The white of the screen is a completely different colour to the surroundings. Then with f.lux (right), the laptop’s colour is a more natural fit. It is more comfortable to look at for long periods.

Unfortunately f.lux is only supported on computers. On mobiles it’s a different story. The team at f.lux have made an app for iOS devices, but it only works on jailbroken ones. Apple don’t allow it on the app store because it requires access to settings which aren’t allowed to be accessed by apps. The thing is users can’t access these settings either. One of my friends has a jailbroken iPhone with f.lux installed and it looks beautiful at night. I want it, but I also don’t want to compromise the security and reliability of my iPhone.

I understand where Apple are coming from – I also don’t think f.lux should be in the app store – but instead it should be installed and enabled by default on all devices. It should be there as a setting right next to the brightness slider for everyone so that people who use their smartphones at night can get a better night’s sleep. The research supports it, f.lux users support it, it just makes sense. If a smartphone was released that natively automatically adapted its colour temperature as the sun set, I wouldn’t hesitate to buy it.

Related news:

http://www.bbc.co.uk/news/health-34744859

http://recode.net/2015/11/16/apple-tells-screen-dimming-software-f-lux-to-shut-down-its-ios-version/

Download f.lux here (Windows, Mac, Linux):

https://justgetflux.com

Update: Apple have added a F.lux-like feature ‘Nightshift’ in their most recent iOS9.3 update

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 “yellowbluepink”

Trntxt Autumn Update

I’ve made a couple of updates to trntxt since July.

One of the things I noticed during my user tests was that people typed ‘bristol’ when they wanted information about Bristol Temple Meads, Bristol’s main station. Unfortunately ‘bristol’ is a closer match to the smaller Bristol Parkway station because it comes above Temple Meads alphabetically. Before August, there wasn’t a way to get the user to correct their search, but trntxt now has search suggestions!

The feature was implemented while being moderately inebriated by a single bottle of Henry Weston’s at the Meanbee hack night in Bath.

Now if you go to http://trntxt.uk/bathspa/bristol it will ask you if you meant Bristol Temple Meads instead of Bristol Parkway.

Just don’t ask for ‘London’.

20151002_205404000_iOS

The other new thing is journey times. Trntxt now shows you how long each journey takes, so you can identify the faster trains more easily. The number is calculated with preference to the estimated timings, so if a train is delayed, the time will adjust accordingly.

20151002_210611000_iOS

Next logical step – sort by arrival time instead 😉

I’m also looking to make trntxt’s suggestions cleverer. I’ve started collecting data about the devices that use the site and the inputs people give. I’m hoping to expand that to also collect and store data from the National Rail Enquiries API. Don’t worry, the information collected is not personally identifiable (unless your user agent string is “HI MY NAME IS DAN”).

Hopefully, after some more practice with MongoDB I’ll be able to draw conclusions predicting the stations people mean based on their input. For example if someone types /bristol/london, they probably mean London Paddington, whereas /southampton/london should take the user to London Waterloo instead.

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.

https://twitter.com/misssarahwarren/status/624871571300200448

Continue reading “JSOxford NodeBots Day”