Week 16

April 2015—April 2015

This is a post about weeknotes.

Named WebSockets

A bit of a stressful week trying to get the Chrome Named WebSockets working. There are a lot of technical hurdles to overcome and then the peer-to-peer logic of the application itself was really tricky to get my head around. I really don't enjoy this kind of low-level programming that doesn't have a visual/user interface aspect.

I initially tried an object-oriented view but that made things worse. I ended up, after a few stressful nights working until 2am, with a more functional codebase that used arrays to hold collections of sparse hash objects. Collected each bit of functionality into functions that took in those arrays and operated on them. This makes writing unit tests much easier since you can pass in arrays and validate that the end result is what you expect. Hopefully it reduces the complexity of the system. I certainly found it easier to keep in my head.

Towards the end of the week I made a small web app using the NWS client to visualise peers joining, leaving and sending messages in a channel. This helped to highlight bugs in missing messages.

I then came across Electron, a wrapper around io.js (a fork of node.js) and Chromium for writing desktop applications using web technologies. Being able to use the node.js runtime directly would be much better since it already has higher-level modules for WebSocket servers etc. I also think performance would be better than the Chrome App. Hopefully I'll have some time next week to experiment.

John Hopkins

Went to see John Hopkins perform at the Brixton Academy. Great show with amazing visuals to go alongside what's essentially a lone man on a stage pressing buttons.

Trendy Tottenham

Went all over on Saturday, to the 4D model shop to get some rods to put on my gears from Fiver Fun. Still have no idea what I'm going to make with them.


Then to Tottenham as my sister's looking at a flat. Needed a lot of work. Basically everything, including the whole kitchen. Very nice location on a leafy, quiet estate near the canal.

Visited Craving Coffee a nice cafe on an industrial estate nearby. I think the rest of the building is art studios.

Then down to Shoreditch to another pub that I used to go to all the time, the Red Lion for a friend's birthday. Sat on the roof terrace in the sunshine which was fantastic. Until it started raining. Had a totally filthy burger there too.

Espruino Pico

Very excited to arrive home during the week to find some Espruino Picos waiting for me in the post, via the Kickstarter campaign. They're much smaller than I expected and I'm very excited to try them out.

Espruino Pico next to a 5 pence coin