Programming
-
The Decree Design Pattern
The Decree pattern helps developers write single-purpose service objects that have a predictable API contract, are composable, are easily tested, and isolate the core logic of your app.
-
This Gem is Mentionable
is a gem that provides support for inbound Webmentions and microformats in Rails apps.
-
Read Ruby's Enumerable Docs
Become familiar with Enumerable to grow as Rubyist and write clearer, more performant code.
-
Work with Me
I've found my next role, thank you so much to everyone who reached out. I'll leave this post up for posterity and because it sucks when links stop working.
-
/now Hear This
/now answers “what are you up to recently?” and you should have one.
-
Painting and Proficiency With Your Tools
Musings on collaboration, adaptability, and learning focused through my hobby of painting miniatures.
-
Chesterton's Fence
We should heed Chesterton’s Fence and be careful to consider why our teammates wrote the code that they did before we look at it and think “there is a better way”.
-
The Five Minute Standup
I’ve been experimenting with a 5 minute standup meeting rather than allowing standups to run long. Scheduling them at 5 minutes before the hour and allowing them to go a little long if necessary has been really effective at keeping the team on track.
-
RSpec: The Bad Parts
RSpec is good, but it’s even better with less of it. We’ll first look through a heavily obfuscated real-world example, learning why parts of RSpec like let, subject, before, shared_examples, and behaves like can make your tests hard to read, difficult to navigate, and more complex. We’ll discuss...
-
Ignore RuboCop Changes in git blame
Have you ever run
git blame
, looked at the commit for a line, and seen some big refactoring or formatting commit? It’s so frustrating not to be able to find the useful context on changes when this happens. When adding StandardRB or RuboCop, or when making changes to your.rubocop.yml
... -
has_few :god_objects
We can achieve better object design and smaller interfaces by defining associations in one direction only.
-
Design Your Codebase with Low Fan-out, High Fan-in Classes
Smaller, simpler classes are easier to reason about than larger, more complex ones. Building low fan-out, high fan-in classes helps in designing simple systems.
-
The Law of Demeter
Talk to your neighbors, but don’t go into their garages—what is the Law of Demeter, how can we follow it in our code, and when should we make exceptions.
-
Avoid Test Delays And Speed Up Your Development Cycle by Mocking Callbacks
It takes a bit more work to mock a method that has a callback block than one without, but it’s worth it.
-
Custom Hexagon Shape in SwiftUI
Creating custom shapes in SwiftUI is pretty easy. At a high level, to satisfy the Shape protocol you just need to define
path(in rect: CGRect) -> Path
. Shape itself conforms to View, so you can even get a preview in XCode of your shape while you build it.
-
Signing Git Commits with Your SSH Key
You may already be signing your Git commits with a GPG key, but as of today you can instead choose to sign with your SSH key! Signing in SSH is a relatively new feature that lets you use your private SSH key to sign arbitrary text and others to verify that signature with your public key.
-
Mixing it up with Mocktail
Mocktail is a new testing library from the lovely folks at Test Double. It seeks to provide a more modern, less intrusive, and friendlier interface for using test doubles.
-
clamp() for Responsive Design
CSS
clamp()
provides a method for setting numerical values with a minimum, maximum, and a calculated value between the two. The syntax iscalc([min], [calculated], [max])
and it’s useful for times when you want to scale some value based on the size of the screen by using thevw
length unit. -
Flowing Text Around Images
Magazines, books, and other print layouts sometimes use images that overlap with the text, and have that text wrap around the shape of the image. It can make for an interesting effect, bringing a feeling of motion into a static medium. Done right, the text and image become conceptually closer in...
-
CSS-only Submenu Navigation with Post Tags
Our posts have categories, which I’ve used as a “collection” or “series” of posts that are on related topics. Recently, I’ve been writing up campaign notes for my D&D session as the characters themselves in a category simply called Campaign Logs. I’m also hoping to continue to write this type...
-
A Site Reborn
I’ve moved my Jekyll site into a Rails app, and I’ve done just enough work to have every post render without errors and added just enough style to make things readable. Some of the site still looks pretty bad, and none of it looks good yet. But that’s ok, because my plan is to rebuild and...
-
Come Find Me in the Hallway
As a speaker, you shouldn’t be taking questions on stage after your talk.
-
Overlay Text on Responsive Images
When putting text over an image, readability can be a concern. By combining the responsive HTML5
<picture>
container with some best practices for image overlays, we can achieve a good result.
-
The Atonement of J. Robert Oppenheimer
I built software to kill people and I gave a talk about it to warn people to think through their choices. Oppenheimer helped design the atomic bomb - was he able to atone?
-
Jekyll on Heroku
Jekyll, the static website generator written in Ruby and popularized by GitHub, is a great candidate for being run on Heroku.
-
Need a Slug?
Rails provides its own slug generator, so you may not need another gem.
-
Salary Social Club
How does your salary compare to others? Is that job offer fair? Does a candidate have reasonable pay expectations? Take the Salary Social Survey and we’ll find out together!
-
Sorting Rubyists
We’ll visualize the steps for several sorting algorithms not only using pretty visualizations on a slide, but also with people as the objects being sorted. Don’t know what an algorithm is, what performance really means, or what “Big O” means, or what these best-, worst-, and average-case time...
-
Stabby Stubbing
Define a .call() on service objects to stub with Procs.
-
Don't Get Distracted
I’m going to tell you about how I took a job building software to kill people.
But don’t get distracted by that; I didn’t know at the time.
-
Advanced Postgres Performance Tips
What do you do when indexes aren’t enough?
-
Literate Vim
Vim commands are terse and arcane, but very expressive. See a complex command broken down by clause.
-
Interface With Your Database in Go Tests
Go’s interface provides a way to abstract away things like your database for testing.
-
What is this PGP Thing, And How Can I Use It?
The need to keep your personal information, sensitive or nonsensitive, secure from prying eyes isn’t new, but recent events have brought it back into the public eye.
In this workshop, we’ll build and upload public keys, explore Git commit signing, and learn to sign others’ PGP keys. If we have...
-
PGP and You
Learn not only how to use PGP, but why each step is important and how to make decisions when interacting with PGP.
-
Use One Field to Store Names or Addresses
Collect names & addresses from users in a single field, not structured forms.
-
Not Invented Here
Rails is a mixture of design patterns, practices, and magic. In this talk, we’ll explore how Rails embraces ideas from other frameworks and projects.
Active Record was born of Martin Fowler. MVC was the brainchild of Trygve Reenskaug. Rails 3 completely absorbed the Merb project, gaining...
-
How to Accidentally Learn Vim
I have a confession to make: I wasn’t always a Vim user.
-
Multi-Table Full Text Search with Postgres
Easily searching across an application’s data is a pervasive need. If you are lucky, you can get away with simple sorting or searching on a single column, but it is more likely that you need full text search across multiple models, all from a single search field.
-
Use RSpec.vim with tmux and Dispatch
Use Dispatch to open new tmux splits to run tests async.
-
Iceberg Classes
An “Iceberg Class” is loosely defined as a class with more private than public methods, but we will be specifically talking about those classes with only one or two public methods (other than an initializer).
-
External Posts in Jekyll
If you contribute to more than one blog, you may want to have all of your posts show up in a single stream, even if they aren’t hosted on that same site.
-
How to Write a README
There is a science and an art to writing an effective README for an open source project.
-
Store Page Titles in I18n
While the title element is one of the only required tags in HTML, it is often overlooked by developers and designers alike until the end of the development process.
-
crontab: temp file must be edited in place
Solution for error crontab: temp file must be edited in place
-
Sandi Metz’ Four Rules for Developers
Four rules for clean and maintainable code from Sandi Metz
-
It’s for the Orphans!
I often come across GitHub Pages branches (
gh-pages
) branches that are simply forks from themaster
branch of the repository. -
5 Useful Tips for a Better Commit Message
You’re already writing decent commit messages. Let’s see if we can level you up to awesome. Other developers, especially you-in-two-weeks and you-from-next-year, will thank you for your forethought and verbosity when they run
git blame
to see why that conditional is there. -
Love Your Eyes
You look at code all day. Make it look nice with Pitch.
-
Strong Parameters as Documentation
Besides moving attribute whitelisting to the controller rather than the model, Rails 4’s move to Strong Parameters over
attr_accessible
provides great documentation about the data with which records are being created.
-
Stop Counting Hours
An Open Letter To the Management of (Generally) Small Companies with Internal Software Teams