Fixing Floated Columns

Flexing on Bootstrap

One codebase I’ve inherited makes use of almost every major web trend from the past 10 years: KnockoutJs, React, Bootstrap, Font Awesome, and 3 different versions of jQuery. When getting to grips with a project like this, it’s necessary to start tuning out the noise fairly quickly in order to become productive. Many oddities may be due to technical or architectural limitations you are not aware of yet, or they could be stylistic or design patterns decided upon before your time. Of course, as you become more familiar with the codebase you can start paying attention to the minutae again.

This particular example sticks out because searching the repository for the solution yielded 200+ results

[Read More]

My Generator Journey

A practical, small-scale use-case

The yield keyword has existed in Python since version 2.2 (2001), and JavaScript 1.7 (2006) but dates back as far as 1975. Over the years I have periodically remembered the existence of generators, read a handful of articles introducing them, and promptly put them to the back of my mind as trivia rather than a useful tool. It was only recently that I feel I have understood the value they provide. [Read More]

Usability, Uranium, and You

On the Origin of Standards

This post is adapted from the first part of a talk I gave in a brown-bag session during my time working for Iglu on the importance of usability and accessibility.

For anyone who entered the world of software development through Computer Science like myself, the focus is typically on the theoretical. This leaves countless fields pertaining to the practical and pragmatic almost entirely untouched. Linguistics, Semiotics, and Psychology are intertwined with the work we carry out each day and failure to embrace this can leave clients and colleagues sore.

[Read More]

Name Your Logic

The bare-minimum when refactoring is not viable

Despite best efforts, we will all at some point or another come across “stars-align” logic. It usually sits at the intersection of business logic and technical requirements (a smell of it’s own) and looks a little something like this:

if (model.SomeProperty.HasValue
    && model.OtherProperty > config.MinimumPermitted
    && user.HasPermission
    && (!model.RequiresFeatureX || featureX.IsEnabled))
{
    // Preferred Behaviour
}
else
{
    // Plan B
}

We’re already in a bad place here and the ideal solution is to refactor. We should never have reached this point, but code rot is a death by a thousand cuts and there’s only so much technical debt that can be factored into your workload.

[Read More]