Friday 5 August 2016

Finding a Project for the language

My biggest reason for joining ThoughtWorks was to learn new stuff. I wanted to do something different after 15 years of Microsoft tools. As well as being forced to learn new stuff in order to deliver for our clients it has been great to be in an atmosphere where everybody is learning, and keen to learn, all the time. The culture of continual improvement is great to be a part of and I've never purchased, and read, so many non-fiction books as I have in the last year. Many of them have been business focused in keeping with my goal to understand our clients and our potential clients better but many more have had a technical focus.

My last project was almost entirely JavaScript based, using React and Flux. That gave me a great grounding (though I am far from expert) in those technologies. I certainly understand, and respect, JavaScript much more than I did a year ago. I've moved on from the impression that I had at my previous employer that JavaScript exists only for html / UI developers to add functionality to web pages in a way that completely breaks any semblance of code quality and testability in the solution.

My current project, a much bigger undertaking than the previous one, uses Java for the back ends, a UI framework based on Backbone, various different scripting techniques in the pipeline (which we are trying to rationalise into a set of Ruby scripts) and one or two other delightful bits and pieces such as Dropwizard and Red Hat's OpenShift. So here I'm learning about what banks and big business like to call "enterprise" languages and tools.

What I've really wanted to get my teeth into from the start is something really new. Java is pretty similar to C# in looks and capability. JavaScript is a functional language but it seems to want to follow rules of syntax that make it look like C, C# and everything else. Certainly for me, the visual similarity of JavaScript to those other languages didn't help at all in understanding that JavaScript is a functional language and hence very, very different from Java and the C families. So what should I be looking at? Something that is functional, (hopefully) cool and looks very different from those other familiar things. So, ever since I spent time waiting to be on a project, I've been wanting to try Clojure seriously.

So I've bought the books, I've worked through the online exercises and I've tried to get something going to enable me to learn Clojure seriously. Unfortunately, as with many other things, I find it very hard to carry on with the learning beyond the initial excitement if I don't have some kind of project to work on. Particularly if, as is now the case, the geography of the gig is such that I have very little time in the evenings to do anything other than have dinner, put the girls to bed and fall asleep.

Like the fabled London buses, you wait for a year to one come and then two (should it be three, should I be expecting another?) come along at the same time.

First the more business oriented idea. On my current gig I'm working for a financial institution. One thing that financial institutions do is lend money to people. When you lend money to somebody you need to make a decision on how risky that person is. This helps you to decide firstly whether you want to lend them money at all and secondly what level of interest you should charge that person. In the dim and distant past such decisions were taken on the basis of face to face interviews, recommendations and other very subjective decision points. Nowadays there are a number of rules, collectively called a strategy, that execute against relevant data. Such rules are created, stored and executed by a decisioning system.

Given that strategies and how they are executed are so important to financial institutions, you would think that the software in the market to support this process would be of very high quality. It isn't. It is nothing short of dreadful. I won't mention the product, or the manufacturer, because I don't want to be sued, but suffice it to say it would not be hard to do a much better job. This seems like a perfect candidate for an open source project using Clojure. I wrote a simple decision system a few years ago in C# with a SQL database holding the metadata for the rules. It strikes me that a functional language with a non-relational data store would be a much better fit for these requirements. I haven't kicked this project off yet but watch this space.

And so to the more fun filled project. I took up running a little over two years ago now and a big part of modern running is GPS watches for recording all your training sessions. My first one was a basic Garmin unit and I replaced that with a more sophisticated TomTom last year. The functions and features of the watches themselves is out of scope here (and both have their unique frustrations). The scope of this idea is the website that is used by each to display the workouts.

I have so far used Garmin's website, TomTom's website and Strava (independent of any manufacturer) for my analysis. Most serious runners and cyclists have a presence on Strava, it is an analysis tool as well as a social network for people who run and cycle. The big problem with it is that all the best features are premium. The problem with the watch manufacturer sites is that they aren't all that good. They already have your money obviously. So after a conversation with a running club mate in which he told me he had considered parsing the gpx files himself I thought, why not? I looked at the file, a very simple xml format and realised it is very possible. So just a little open source thing to build a front end for analysing running data in the form of gpx files. Not so obviously a Clojure application but more fun that the other one.

We'll see which one gets usable first. I'm not holding my breath but at least now, with tangible goals beyond learning for learning's sake, I think I have a chance.