All Posts

A Developer's Job Isn't to Write Code

Paper is small, constrained, and uses fine writing implements. It has pre-printed lines and boundaries - starting again is difficult and slow. No one else can see what you’re writing.

Coding is slow, complex, hampered by irrelevant constraints (the need for valid linting, correct syntax & versions of APIs, etc). Code is like paper.

written Read on →

Git Gardening

Git’s “branch” terminology captures the nature of divergence from the trunk, but fails to convey any meaning for the convergence (branches don’t “merge” in nature).

written Read on →

Using CSS and Sass to Encode Measurement Types

CSS requires properties to be expressed in low-level units that are readily available for the machines evaluating them: integers (positive and negative) and decimals (floating point numbers). These are not, however, the optimal units to express many measurements. It’s up to developers to have the awareness and discipline to select and encode them in a way that expresses the semantics of the underlying properties.

written Read on →

Use Delta-based Tickets

There are two ways version control systems model changes over time: delta-based and snapshot-based. By exploring the distinction - and when to apply each - it’s possible to explain many common problems with planning, tracking and communicating software development.

written Read on →

Style Your Design Elements, NOT Your Mark Up

A common mistake made when developing digital products is to express their designs in terms of the underlying markup or primitives of the technology being used. This is like decorating a room by painting each raw material, instead of by wall, floor or fixture.

written Read on →

Tracking Changes in Open Source Libraries on Github

There are two ways to consume open source libraries. The first is for situations where you want to specify a fixed, specific version, and move that version forwards (to gain access to new features or bugfixes) or perhaps backwards (to side-step regressions or incompatible changes). This situation is common when developing end-user applications and is optimised for predictability.

The second situation is when you want to specify a range of compatible versions, and let a package management solution decide which of those versions is the most optimal (by perhaps sharing a version already available). This situation is common when developing libraries that depend on others, which sit between an end-user application and the open source libraries and is optimised for maximum support.

written Read on →

Thinking in Dimensions: A Unified Approach to Filter Grammars

Learning filter grammars (such as CSS selectors, regular expressions or SQL) can be slow and error prone. Cheatsheets help with picking up a new grammar, or revising an old one you may be returning to after a period of absence, but because each has different concepts, syntax and operators, it’s often difficult to see the similarities. They are so different that it’s easy to lose track of the fact that they are all different tools to perform the same job.

This article explains a unified approach to filter grammars that provides a framework to classify, select and apply them appropriately; it also aids to reduce the barrier to identifying and learning new ones when your application calls for it.

written Read on →

jQuery Best Practices

jQuery extends the browser’s JavaScript interface, often providing thin wrappers for functions you can perform in plain JavaScript with a similar amount of code.

written Read on →

JSON API Cheatsheet

The JSON API specification the following design goals:

  • Standardising the JSON schema (irrespective of the data you’re transmitting)
  • Minimising the number of client requests
  • Minimising the amount of data transmitted

Understanding how each is achieved is essential in effectively using its features.

written Read on →

CanCanCan Cheatsheet

A breakdown of how to define and check abilities with CanCanCan, with an opinionated set of best practices based on experience.

written Read on →

Emojis Are the Solution to Useless Commit Messages

In most git clients, commit messages are truncated after a single line. This is not enough space to fully describe the changes a commit contains - and to attempt do so would be misguided. A description that imparts as much detail as reviewing the changes themselves offers little in the way of useful abstraction. But these limitations may be overcome.

written in commit, emoji, emoticon, git, message Read on →

How to Shoot Trouble and Squish Bugs

It’s frustrating to encounter a bug or failure when you know things should be working just fine. This is especially true when the last time something like this happened it was several hours before you found a solution. Even worse is when you are on the other side of those several hours and still have no idea how to solve your problem, despite having tried everything you can think of.

What you need is some debugging suggestions that will spark a new idea on how to go about finally finding that solution.

written in "problem, debugging, solving", troubleshooting Read on →

How I Learned to Learn

Every week I come into contact with over 20 programming languages, frameworks, APIs and other things I need to know. This is not remarkable for someone in the business of software development; there are many web technologies available - each regularly expanding its capabilities - and they may be connected in countless ways. However, there are common rules and patterns shared amongst them all.

written in documentation, learning, programming, research Read on →

The Best Still Untitled: The Adam Savage Podcast Episodes

The Still Untitled: The Adam Savage podcast was one of the very first that I got into. Its conversational style and the fact that Adam regular answers listeners' questions makes for a welcoming and engaging listening experience.

Like many long-running, lightly produced podcasts, however, Still Untitled has touched on a great many subjects - some much more interesting than others. Here is a list of my favourite episodes, broken down into two categories.

written in "still, best, podcast, recommendations, untitled" Read on →

Getting to Better Code Reviews

I recently set out to improve the process I use for reviewing code that myself and others have written. I wanted to focus on being more systematic and getting consistent results for the time investment.

The reviews I was doing appeared to be going well enough: they were picking up problems and I was making sensible suggestions for how to improve code quality; less bugs seemed to be finding their way into the final product when I did the reviews than when I didn’t and I felt more confident about code that had been through review. But I began to suspect that the quality of these reviews were variable and subject to random and unpredictable human factors.

written in code, review Read on →

SourceTree Keyboard Shortcuts

Originally (back in 2015) this post was a record of my attempts to brute force the discovery of Sourcetree keyboard shortcuts, because they were not well-documented by Atlassian (or anyone else I could find at the time).

Now, in 2020, the keyboard shortcuts are readily available both in-program (on each context menu item) as well as a few easily located resources online. So I’ll repurpose this blog post instead to surface some of the more useful keyboard shortcuts (this list is no longer exhaustive), and explain how I extend the keyboard shortcuts Sourcetree provides natively.

written in atlassian, efficiency, keyboard shortcuts, sourcetree, version control Read on →

Interview Questions for a Development Job

Last year I went through the rather exciting process of interviewing for a series of positions in search of a new development job. Having sat down and thought about what I had gained from my previous working environments, I compiled a list of questions that I thought would help me gauge the type of work I would be doing and the environment I would be a part of if I took the position.

written in interview, interviewing, job Read on →

Inversion of Control

Popularised by Robert C. Martin and Martin Fowler, Inversion of Control is a design principle where custom code components receive the control flow from general library components, similar to custom code modules being written for a larger general-purpose framework. This is an inversion of the traditional control flow found in procedural programming where the custom components encode the program’s functionality in terms of general purpose libraries. The pattern offers the advantage of making the program more modular and extendable.

written Read on →

First Five Principles of Object-Oriented Programming

SOLID is an acronym mnemonic coined by Michael Feathers for Robert C. Martin’s “first five principles” for object-oriented programming. Each concept is worth looking at briefly so I have tried to summarise the important points of each below.

written Read on →

Creating Cards for Spaced Repetition

Spaced repetition is a revision technique that minimises the number of exposures to a piece of subject matter required to commit it to longterm memory. This is achieved by altering the frequency in which items of revision material are shown to the user based on how easily it was recalled last time; the content is shown to the user right before he or she is due to forget it - and not before, avoiding wasting time on premature revision. Anki is a free and popular tool available on Windows, Mac and mobile devices that allows you to synchronise your progress between all your devices via Ankiweb.

written in anki, learning, memorisation, spaced repetition Read on →

Reducing Code Complexity

I have already covered what I picked up from Steve McConnel’s Code Complete and Robert C. Martin’s Clean Code on packaging and labeling blocks of code and simplifying their inputs. Now I intend to cover what the two volumes offer in regards to reducing the complexity of the shape of, and relationships between, code segments. As is consistently emphasised through McConnel’s Code Complete, the author of a piece of code is beholden to its reader and should write for readability and maintainability, as if often ends up being the same person or a colleague.

written in clean code, code complete, complexity, simplification Read on →

Ordering and Labelling Code

Reading Steve McConnel’s Code Complete and Robert C. Martin’s Clean Code, I encountered a subject that I previously hadn’t given much thought to but is of great importance. McConnel talks of reducing the cognitive load of reading and understanding code by writing for humans first, computers second; where the reader of a piece of code should be the author’s highest priority - if not only because these often end up being one and the same. An important part of this is facilitating quick code navigation to allow the reader to find what they need, and providing useful levels of abstraction so the reader need not concern themselves with irrelevant details.

written in clean code, code complete, naming, ordering Read on →

Reducing a Routine's Parameters

Steve McConnel’s Code Complete provides a great insight into understanding some of the common function forms and how to go about simplifying wayward parameter lists into something that clearly conveys intention and is easier to remember and use. McConnel writes, software should be written for people first and foremost and focus should be given to improving readability and maintainability, rather than performance.

written in code complete, complexity, function, method, parameter, simplicity Read on →