Skip to content

Writing

RSS

Long-form articles and short code snippets on what I learn building software in production.

Everything published

How to write a custom ESLint rule

Building a custom ESLint rule that bans a component, with a walk through traversing the AST, picking the right node type, and bundling the rule into a local plugin.

4 min read
  • javascript
  • eslint
  • tooling

How to upload files to S3 using @aws-sdk/client-s3

Using @aws-sdk/client-s3 from Node.js to upload single files and entire folders to AWS S3, plus the gotchas you only learn the hard way (content type, leading slashes, Windows paths).

4 min read
  • javascript
  • node.js
  • aws
  • aws-s3
  • tooling

Snippet

How to clamp text to N lines with CSS

A pure-CSS recipe for limiting a block of text to a fixed number of lines: handy when the content is dynamic and you don't want the layout to drift.

  • css

Snippet

How to integrate NProgress with Next.js

Snippets for showing a top loading bar while Next.js navigates between pages, using NProgress wired to the Pages Router events.

  • react
  • next.js

Snippet

GORM cheatsheet for Go

A handful of GORM snippets I keep around when I start a project in Go: installing, modeling, validations, many-to-many relations, hooks, and the queries I run most often.

  • go
  • gorm

Being Tech at Crehana: fail, but learn fast

What I learned in my first three years as a Frontend Developer at Crehana: failing fast, believing in what you build, and why people matter more than anything else.

3 min read
  • culture
  • career
  • crehana

BDD in Ruby on Rails with RSpec and Capybara

Why controller specs often re-test what Rails already guarantees, and how feature tests with RSpec and Capybara let you test what the user actually sees.

5 min read
  • ruby
  • rails
  • testing
  • bdd

How to test your Rails models with RSpec

An introduction to TDD in Ruby on Rails; the red-green-refactor cycle and how to test a model's validations with RSpec.

6 min read
  • ruby
  • rails
  • testing
  • tdd