Breaking inter-package dependencies through Squeak’s pragma preferences

The Preferences class provides a common place for all parts of a Squeak Smalltalk image to register their switches: Which update stream do we want to follow? What colour do we want our Browsers? Do we allow assignments to block parameters? Do we allow underscores in selector names? Preferences range from low level things that…

Expanding reducers

When playing with a new bit of language, it can be helpful to restrict the problem space to an old, well understood algorithm. For me at least, learning one thing at a time is easier! For this post, It’ll be prime sieves, and I’ll be exploring clojure reducers.

Resumable exceptions for separating packages

Resumable exceptions form a key component of the Smalltalk infrastructure. They are one of the standard means of communicating along the call stack, much like Common Lisp’s condition system. They can, however, add a “cross layer” dependency.

One thing and one thing only

Package dependencies appear in many ways, some more surprising than others. Let’s see what we’ve recently dug up in the trenches.

Tail calls in functional languages aren’t always a good fit.

Recently I’ve started playing with Haskell a little more seriously, and I’ve been toying with the idea of using it to calculate approximated percentiles over streams of numerical data, as found in the histograms from Coda Hale’s well known metrics library. The first step in this process is picking out a representative sample of the…

Managing multiple GitHub repositories

We all know GitHub is a fantastic way to collaborate on software. It has a fairly basic issue tracker, but it serves most purposes well enough. But if your code base is spread across several repositories, it can be difficult to know how you’re doing, from a management perspective. Octoherder can help with that.

NuGet: Fetch missing or out of date packages on build

NuGet is a package manager for the .NET world. At its core is an API that will take a set of assemblies that you are interested in and download any that are new to a specified folder. There is then a Visual Studio plug-in that uses a convention-based approach to adding new packages to your…

ruby

Page objects in Ruby

Because “clicking a button” should not exist in your domain language. When we write tests, we want to be able to write them in a way which is relevant to the problem the application (or sub-component) solves, rather than how it is implemented. So, if you get an urge to reimplement natural numbers, then you…

A Double Fugue in Traits

Traits provide a means of composing an object’s functionality out of smaller, simpler parts. Verbs being limited in number, especially good ones, sometimes you want to compose two traits that share names. Today we’re going to look at how to resolve the dispute.

Testing Ansible playbooks with Vagrant

One of the projects here at LShift uses ansible to configure its EC2 machines. I needed to refactor the playbook in a minor way. But of course “refactor” doesn’t just mean “change the code”. It means “change the code (presumably for the better) while preserving behaviour“. I really didn’t want to check the change by…