Stronger Types with C++

So I used to read Joel On Software quite a bit. A few posts stand out, but one in particular is Making Wrong Code Look Wrong for a few reasons: the problem Joel describes is real, it’s subtle, and the proposed solution is elegant and trivial. Now I’m not going to claim I’m disciplined enough to actually follow it all the time – especially since most of my projects start off as toys where it’s easy enough to keep things right – but I love the idea in theory.

Continue reading

Thinking With Tasks

Up until now, all dependency ordering in dev-pipeline is managed using a function that provides a valid sequence as a Python list. The simplified code is basically this:

build_order = resolve(self.targets, self.components)
for target in build_order:
    for task in self._tasks:
        task(target)

This has been fine for initial versions, but it’s not very flexible.

Continue reading

Step 1 — Scratching Your Itch

Every good work of software starts by scratching a developer’s personal itch.

Eric Raymond, The Cathedral and the Bazaar

Like most developers, I’m a creature of habit. I like git for source control, so I use git to track changes in pretty much everything, even if they’re non-source (e.g., configuration files, my resume, and even my hobbyist writing). It’s mostly a matter of sticking with patterns I know and embracing muscle memory; with git not only get version tracking, but I can easily back my work up to tons of places with one command.

Continue reading

Modernizing C++ Interfaces

Let’s assume a project has to transform data from one form to another; this could be updating a configuration file during a software update, loading XML to store into a database, or any of the other million things that this problem applies to. For the sake of simplicity, we’ll assume the theoretical project needs to convert strings from mixed-case to uppercase.

Continue reading