How (Not) to Troll GitHub Comments

Trolling is horrible and counter-productive; however, we can learn what NOT to do, by asking what a troll would write. Who am I to talk about trolling github comments? I wrote an app, which helps thousands of people get more visibility into open source discussions, so they can make better comments and help out. The service is called CodeTriage and it sends community issues right to your inbox.. Essentially, I read a lot of Github issues and comments. Time to pay the troll toll.

Keep Reading


Going the Distance - How Levenshtein Spelling Suggestion Algorithm Works

I’m not what you would cosider an algorithm guy, but after needing to use a bit of spell checking in some code, I became fascinated with the Levenshtein distance. I found plenty of resources explaining what it did, I also found plenty of resources with example implementations. What I couldn’t find were any really simple explanations for exactly HOW it worked.

Keep Reading


Hashie Considered Harmful - An Ode to Hash and OpenStruct

Update: I made a PR to mitigate most of the performance penalty in Omniauth. Deprecating and removing Hashie has resisted several attempts at refactoring. There’s also a really good set of discussions in the Reddit comments.

Keep Reading


Unraveling String Key Performance in Ruby 2.2

Everyone wants their programs to be faster and to take up less memory. However, it’s not often that this is achieved without having to modify source code. This post will introduce optimizations added in Ruby 2.2.0 when working with a Hash and string keys. To understand the optimization, you need to know current behavior.

Keep Reading


36% smaller Rails memory footprint through Benchmarking

America is in the middle of an obesity epidemic, and your Ruby app might be suffering from bloat. While people suffer from overeating, and lack of exercise apps get bigger for other reasons. One of the largest memory sinks in a Ruby app can come not from your code, but from libraries you require. Most developers have no idea what kind of a penalty they incur by adding in a library, and for good reason. Until now, it’s been hard to measure.

Keep Reading


Benchmarking Rack Middleware

Performance is important, and if we can’t measure something, we can’t make it fast. Recently, I’ve had my eye on the ActionDispatch::Static middleware in Rails. This middleware gets put at the front of your stack when you set config.serve_static_assets = true in your Rails app. This middleware has to compare every request that comes in to see if it should render a file from the disk or return the request further up the stack. To do that it hits the disk, basically doing this on every request:

Keep Reading


Design Driven Tests: This is how I roll

The only way to be heard in programming these days is to start fires, and kill sacred cows. To which I’ll say: Fuck. That. Here’s how I write tests, and write design-driven code. I call it T&DD. It’s not a prescription, it’s how I work.

Keep Reading


GEM_PATH

I’m writing this as more of a note to myself than to you. In Ruby GEM_PATH environment variable is where rubygems will look for installed gems. Hidden in in the docs is:

Keep Reading


Why We Should (Absolutely Never) Build Software Like We Build Houses

I’m building a house and I write software for a living. So when someone showed me the article Why We Should Build Software Like We Build Houses I had to disagree.

Keep Reading


Practice while you Play: Multiple conferences, one Talk

New isn’t always better, especially when it comes to conference talks. A number of conferences have a CFP that explicitly looks for “fresh” talks that have never previously been given. My take: practice makes perfect, and repeat talks produces a better experience for attendees

Keep Reading


Subscribe to my Newsletter 😻 🤠

Join thousands of developers who get new code, writing, and programming links from me delivered to their inboxes.