Friday, May 2, 2014

Pivot

It's been about three months at the new job now, which makes it a good time for a quick update.

The next quarter will be focused on a couple of critical issues, professionally:

JavaScript

JavaScript is widely used in our environments, and the last couple of sprints I've spent with a homegrown Node/Express app that is essentially a pretty front-end to a MySQL server. The past couple days have involved ensuring the server doesn't crack under scale (9 million rows means: make sure your indexes are set up correctly, and you're using them!) as well as a large amount of futility setting up unit testing for code.

One of the issues is that sinon is an excellent stub/mock/spy library, but doesn't seem to have a way to mock the more complex parts of libraries. This is a simplified version of the problem:

pool.getConnection(function(err, connection) {
  connection.query('SELECT * from foo', function(err, rows) {
      // Do stuff here
  });
});

As it turns out, it's remarkably difficult to mock connection. The object is hidden within a library, making it (apparently) impossible to stub out.

Still, JavaScript has shown enough utility that I'm going to be taking a deep dive into it, hopefully with an in-depth tour of what's coming up. With a focus on Polymer.

Seven Languages in Seven Weeks

In addition we have a book club at work. This time I've decided to participate in it, because the material is pretty compelling.

Seven Languages in Seven Weeks is a good way to get started on a habit that most programmers should get into: learn a language a year. This book is a deep dive into Clojure, Haskell, Io, Prolog, Scala, Erlang, and Ruby. Which means it'll be good for catching up! Each language has a specific way of thinking about how to solve problems, and even if I don't end up deploying Erlang in my career, it would still be good to know what philosophy underlies Erlang, and how I can use that to program in JavaScript better.

So it should be an exciting three months!