When to be a Software Architect

Many of the constraints I have in my day-to-day job as a developer come from this mysterious world of the software architect. After listening to Martin Fowler on the Ruby Rogues podcast talk about his book Patterns of Enterprise Application Architecture (PoEAA), I decided to pick up a copy (i.e. I ordered it from Amazon) and read a bit more into architecture. Not understanding the domain very well, I also watched a few talks and read a few different articles trying to get a feeling for the important aspects. ...

17 March 2014 · Graham Jenson

Why should you use CoffeeScript instead of JavaScript?

CoffeeScript is currently my favourite language to write in! That is because CoffeeScript contains three things that I like in a language: easy function and lambda definitions syntactically significant whitespace straight forward class definitions However, for all its benefits, CoffeeScript is complicated by its intertwined relationship with Javascript. This is because CoffeeScript is a language that doesn’t compile to binary or VM code, but it is transpiled to Javascript. So, to understand why you should use CoffeeScript you should probably understand why you should use it instead of Javascript. ...

12 March 2014 · Graham Jenson

The Difference Between Rich and Poor Schools in New Zealand

In New Zealand we split our schools into 10 groups called Socio-economic Deciles that each represent 10% of schools ranked by the relative poverty of the students family. That is, Decile 1 contains 10% of our schools where the poorest students attend up to Decile 10 that contains 10% of our schools where the wealthiest students attend. New Zealand uses this measure to target funding to more needy schools and try and ensure that compulsory education is equal for all students, some of which may not be as privileged as others. ...

6 March 2014 · Graham Jenson

What is Ruby? It is fun and makes you happy!

I have been working as a Ruby Programmer for over a year. Now I am thinking about how much I have learnt and how happy it has made me. In this post I will briefly go over the history and community of Ruby, then give a small example that I think demonstrates why Ruby is made for developer happiness. This is not a tutorial, more like an introduction to Ruby. History ...

3 March 2014 · Graham Jenson

Graham’s Ph.D. Thesis: A Study of Software Component System Evolution

Since I spent 4.5 years completing my Ph.D. at Massey University, I have decided 1 year on to give an overview of what I actually did. If you want my full thesis, you can download it here. Be warned, it is really long, really dense and an academic document. I am trying to make this post a bit more reader friendly. So here it goes… Introduction to Components and Evolution In order to agree to talk, we just have to agree we are talking about roughly the same thing. The Feynman Lectures on Physics, Motion, Richard Feynman, 1961. ...

22 February 2014 · Graham Jenson

Testing promises in Node.js with Mocha, Chai and Sinon

To test my Rails projects I typically use rspec. I really enjoy the way it helps me layout and describe my tests. So when I started writing my first node.js package (back-on-promise), I wanted a similar way in which to write my tests when testing promises. I decided to use mocha for running the tests, chai for test assertions, and sinon to mock and stub objects. In this post I will describe how to test with these tools in node.js, specifically looking at promises. ...

15 February 2014 · Graham Jenson

Envisioning Information with Edward R. Tufte

Envisioning Information was recommended to me by a friend as a way to improve how I think about and design visualisations. Although less popular than his other work Visual Display Quantitative Information (which is still on my to-read list), this book has many interesting examples and ideas on how to present complex information. Of particular interest to me, this book gives a large discussion on how cartographers design and present geographical maps. It also gives practical rules on how to design, colour and layout data in a visualisation. ...

7 February 2014 · Graham Jenson

JQuery Promises and Deferreds: I promise this will be short

I am always looking for beautiful solutions to complex problems, and recently I have been experimenting with promises to solve the ugly problem of asynchronous actions in javascript. Promises are a simple metaphor that make complex operations easy to understand. In this post I will describe what promises are, why they are beneficial, how to use them, and a project I have been working on called Back-on-Promise which integrates promises into backbone.js. ...

31 January 2014 · Graham Jenson

RPython: Compiling Python to C (for the speed)

SAT Solver Last night decided that I am going to write a SAT solver. But I had some conflicting requirements: I want it to be fast (SAT solvers are very resource heavy) I want it to be modular (Easily replace parts for more efficiency) I want the code to be very understandable. SAT4J is the SAT solver I am most familiar with. It is as efficient as Java lets it be, it is very modular, and it is reasonably understandable on the surface, but the lower you get the more it is obfuscated. ...

12 January 2014 · Graham Jenson

RPython is not a Language: An introduction to the RPython language

The exact definition is “RPython is everything that our translation toolchain can accept” :) The above quote is from the coding guidelines for RPython. RPython is not a typical language, in that it is not described by a syntax, but is defined by whether or not a tool chain can compile the code. RPython is a subset of the Python language. That is, any RPython code can run in a Python interpreter. The difference is that you can compile RPython code, with the RPython tool-chain down to C code. So the advantage of RPython is speed after compilation, and the disadvantage is that you cannot use all of Python’s features. ...

12 January 2014 · Graham Jenson

How to Deploy Mahara on Heroku

Recently, I was in need of a testing environment for Mahara’s functionality. For those that do not know, Mahara is an ePortfolio and social networking system, written in PHP, and developed right here in New Zealand. To test Mahara, I came up with three possible approaches: download&install mahara from apt-get (with all its dependencies). Then setup and configure a local environment in which I would be working, as described here. Download a virtual machine (maybe from here) and configure it to host Mahara. Or create and deploy Mahara to my favourite app server, Heroku. I tried for an hour or so to install Mahara locally, however I just ended up where I always do, Apache config hell. ...

12 January 2014 · Graham Jenson

Drawing Maps with D3.js and Other Geographical Fun

I recently decided to create some mapping visualisations. Mostly because using a map is an awesome way to present many data sets, and creating such visualisation is a skill I lacked. So I looked around and found that D3.js has geographical features. I had used D3.js in the past on projects like 100 companies, so I understood how to use it and could apply that knowledge to make visualisations with maps. In this post I will go over a few examples of how to use D3’s geographical API to create visualisation with maps. ...

12 January 2014 · Graham Jenson