Friday 5th August, 2016
Show and Tell 21
On 8th June five of us met up at Bonfire in the Barbican. Fortunately the rain had stopped and it turned into a lovely summer evening, so we were able to sit outside on the terrace.
First up James S showed us a nice little web application he’d been building to learn about the React library. He talked us through creating Components (e.g. a Timer Component) and notifications. I’m afraid I don’t remember the details, but this led us into discussions about the use of ECMAScript 6 and JSX, the pros and cons of using Redux versus Flux, and the use of Webpack and Gulp.
Tom S told us about an e-book, Ray Tracing in One Weekend, in which the author walks you through building a ray tracer in C+ (C with classes, not C++). Tom had decided to use the book to build a ray tracer in Ruby. He showed us how he’d done this in step-by-step commits along with examples of rendered scenes. Some of the later scenes were very impressive!
In a slight diversion, this led us on to talk about how one might build a tutorial presentation using such step-by-step commits in a git repository. I really like this idea.
James A told us that he’d got frustrated with the central heating controller in his house. In common with those in many UK homes it isn’t possible to adjust the settings remotely (e.g. from his home office) and it takes about 4 button presses to do anything.
So he decided to build his own wireless controller using a Particle Photon board and a relay shield (?). As I understand it, the board connects over wi-fi to the Particle Cloud which allowed James to control the device through a web interface (as well as a web API). A great first step!
I may have got this all wrong, but I think he then made the device available to his iPhone by way of Homebridge and a simple Sinatra web app which communicated with the device via the Particle Cloud API. Homebridge emulates the iOS HomeKit API which meant that James could then control his central heating via Siri on his iPhone which was pretty cool.
Lastly I think James also built an iOS app to communicate with the device via the HomeKit API. All in all, a really nice project.
I demonstrated a prototype of an alternative implementation of the GOV.UK Smart Answers app. One of the main things I wanted to achieve was a common set of acceptance specs running against several different user interfaces, but with the same policy logic. I’d managed to get a very basic example working with a standard web app (c.f. GOV.UK), a single-page web app using Ajax, and a command-line app.
The idea of having multiple user interfaces was to force good separation of concerns, something that was particularly lacking in the GOV.UK version of the app. I also got some good suggestions about other aspects of the app. Thanks for the feedback, folks!
Last but not least, we were treated to Ben G digging out a version of the Space Invaders game which he’d written in Java 18 years ago! Amazingly he got it to build and run. He explained how it was based on a primitive neural network in combination with a simple genetic algorithm. I’m afraid I don’t remember any more details, but it was really neat!
Until next time,