• Abstractions With Database Views

    Wikipedia defines a software abstraction as:

    In software engineering and computer science, abstraction is… the process of removing physical, spatial, or temporal details or attributes in the study of objects or systems to focus attention on details of greater importance; it is similar in nature to the process of generalization;

    A database view can provide a useful abstraction; a concept that represents something in a domain. Recently, I had the opportunity to do use a view to create an abstraction, to represent data that is missing from the database.

    Read on →

  • Deployments With Schema Migrations

    Deploying code that depends on database schema migrations successfully requires putting some thought into when to run them during the deployment. This post develops a framework to reason about it, through analysis of a specific code example and multiple kinds of deployments. While the example is specific to Ruby on Rails, the lesson carries over to any similar web framework.

    Read on →

  • The REPL: Issue 64 - December 2019

    Git from the inside out

    In this essay, Mary Rose Cook explains how git works, focusing on the graph structure that underpins it and governs its behavior. git is a powerful piece of software, and digging into how it’s designed thought me a lot.

    Code less, Engineer more

    Liz Fong-Jones writes about how effective software engineering teams become more effective: Writing less software. The premise is that the focus should be on the impact of the work, not how much code we write. Build what you must, buy what you can, and write it all down. Custom software should be a last, rather than first, resort.

    A lot of this article resonates with me, especially the part about writing everything down. I’ve come to believe that documenting how and why you made a decision is as important as the decision itself. There will come a time when another engineer will ask, “Did you consider X or Y?”. The decision record will answer that question, and eliminate much bike-shedding.

    Your Makefiles are wrong

    Jacob Davis-Hansson shares his strong opinions on writing Makefiles. make was obscure to me for a long time. Its not common knowledge among rubyists, but I’ve come to appreciate it more as a generic build system, especially for file-oriented tasks. In this post, Jacob explains his preferred defaults. I found the use of sentinel files particularly useful.

    Read on →

  • The REPL: Issue 63 - November 2019

    The Language Agnostic, All-Purpose, Incredible, Makefile

    This post is a great introduction to make, one of the most versatile unix programmer tools, that has lost favor in recent years. I personally use make in some of my personal projects, but have yet to take advantage of it in large Ruby projects at work.

    How containers work: overlayfs

    Julia Evans explains how overlayfs – a union filesystem – powers containers and makes it much more efficient to build images from other images. Great read.

    Read on →

  • Large Teams: Finding A Green Build

    I work on a large engineering team. The main Slack channel for our engineering department has 425 people in it. The code base is split into many repositories, dominated by a big Ruby on Rails application with many contributors. At the time of writing, the last 1,000 commits in master on that repository where made by 169 contributors.

    The continuous integration for said mono-repo is heavily parallelized but still takes ~30 minutes to complete. Occasionally, a branch is merged that causes the build to fail. Usually, the case is that the specs worked correctly for that branch (otherwise we can’t merge), but new changes in master are not compatible. As hard as the team tries to maintain a green build (i.e. a build that passes and is deployable), a red build is somewhat frequent.

    Read on →