24 Nov 2021

Awesome Bundler Feature: Inline Gemfiles

Ruby’s Bundler introduced a feature that I’m loving for prototypes and quick scripting

Inline Gemfiles

Introduced in v1.10, these avoid needing a separate declaration of a Gemfile and you write it directly into the script you’re creating.

It fixes the following ergonomic issues:

  • Writing a separate Gemfile when your program is a single Ruby script is overkill
  • Packaging your Gemfile to accompany aforementioned script is a hassle
  • For single file scripts you can now rely on Gems!

How To Use It

require 'bundler/inline'

# Declare Gemfile in ruby script
gemfile do
  source 'https://rubygems.org'
  gem 'mongo'
  gem 'pry'
end

client = Mongo::Client.new(ENV.fetch('MONGO_URL'))

PS

I’m not writing much Ruby these days because I work leading engineers, but when I hack on things in my spare time I’m prototyping and want to iterate on an idea before converting it to Golang. I did this recently when iterating on how to speed up controlled MongoDB failovers and when spiking out a terraform-like system for MongoDB configuration management.

Bundler-inline is great for these situations because they’re a single Ruby script but require installing Gems :).

13 Apr 2021

The Power of Saying No

As an engineering leader, saying no is a superpower.

Counter: Saying yes and imagining what’s possible is a superpower.

Honorable mention: Avoiding becoming a gatekeeper or single point of failure is a superpower

TLDR: Build distributed and fault tolerant human systems. Reject what needs to be rejected and say yes to ambitious things you can’t yet conceive.

11 Apr 2021

Rails Security Practices Summary

A good summary and collection of Rails security/anonymizing practices:

https://ankane.org/sensitive-data-rails

09 Apr 2021

Starting in a new environment

Recommended reading Blue Tape List

25 Mar 2021

Articles To Write
  • Transitioning a Startup from MongoDB to Postgres
  • Engineering Leadership with Remote Teams
  • Lessons as an Engineering Leader
  • Emotional Labor of Management
  • Productive Engineering and Management Culture
  • The Value of Long Form Writing and Thinking Time
  • Elixir Reflections: 2013 to Now
  • My Development Environment
  • Notetaking 2021
  • Startup Horror Stories