Is WEBrick Webscale?

WEBrick is the “slowest” webserver in Ruby, how could it possibly be webscale? To answer this question and explore Is Ruby Too Slow For Web-Scale?, we will compare WEBrick to a real piece of “webscale” tech: NGINX.

Keep Reading


OMG OMSCS: Is an Online Masters right for You?

Ever wonder if you should go back to school to get a master’s degree? Right now I’m in my second semester of Georgia Tech’s Online Master of Science in Computer Science (OMSCS). I’ve had a few people ask about my experiences so I figured it was worth my time to write them down. In this post I’ll be going back and forth, question and answer style to share my thoughts on the program.

Keep Reading


How I Reduced my DB Server Load by 80%

Database load can be a silent performance killer. I’ve been optimizing the query performance of a web app I run designed to get people involved in open source, but was seeing random spikes of query times to 15 seconds or more. While I had been seeing this behavior for some time, I only recently began tuning my database queries. You can read about my efforts to First I sped up my home page with some indexes (and Rack Mini Profiler). Then I tracked down and killed some expensive queries. After these major improvements the average response time was around 50ms and my perc95 was under 1 second. Yet, I had this annoying issue where in a 24 hour period, my perc95 response times would shoot up to maybe 15 seconds or 30 seconds and start timing out for a short period of time. This post is about me finding and fixing that issue which resulted in a net 80% decrease in my database load.

Keep Reading


Using Heroku's Expensive Query Dashboard to Speed up your App

I recently demonstrated how you can use Rack Mini Profiler to find and fix slow queries. It’s a valuable tool for well-trafficked pages, but sometimes the slowdown is happening on a page you don’t visit often, or in a worker task that isn’t visible via Rack Mini Profiler. How can you find and fix those slow queries?

Keep Reading


How to write a lock free Queue

Update: I did mention that lock free data structures are really hard to write, it looks like there might be some issues that haven’t been addressed in the implementation of this LF Queue that we’re referencing. The rest of the analysis is still valid and hopefully useful to you, just know there’s actually more that needs to be done, don’t try to use that code for a mission critical application out of the box.

Keep Reading


A Tale of Slow Pagination

When I see a query in my logs without either a limit or a count clause, alarm bells go off because it is likely a hotspot. A pagination query has alimit so it usually flies under my radar:

Keep Reading


Meditations on Writing a Queue

What is a queue besides the line for the little teacups at Disney? In programming, a queue is a very useful data structure that can simplify our programs, especially when it comes to threading. In today’s post, I’m going to walk you through building a queue in C, talk about how to effectively use a queue, and also compare to the Queue implementation that ships with Ruby.

Keep Reading


Bayes is BAE

Before programming, before formal probability there was Bayes. He introduced the notion that multiple uncertain estimates which are related could be combined to form a more certain estimate. It turns out that this extremely simple idea has a profound impact on how we write programs and how we can think about life. The applications range from machine learning and robotics to determining cancer treatments. In this talk we’ll take an in depth look at Bayes rule and how it can be applied to solve problems in programming and beyond.

Keep Reading


The Programmer's Guide to Pairing on Pregnancy

You don’t have to be physically carrying a child to be involved in a pregnancy. If you pair program, you know that you don’t have to have your hands physically on the keyboard to contribute to the experience. I’m currently on track for my second little one and wanted to give a shout out to some things I’ve seen that partners of all genders have done to help with pregnancies. While I cannot physically carry my child to term, that doesn’t mean pregnancy is a passive event for me. Let’s get started.

Keep Reading


Writers Write

I’ve been writing more recently. One of the biggest reasons is that I’ve been writing more recently. Writing begets writing; the more I do it, the easier it is to do it more. I’ve found diet to be similar. When I’m eating fresh fruits and veggies, it’s what my body craves. But as soon as I “treat” myself with a bag of chips or a fatty big honking slice of greasy pizza, guess what my body wants? More of the same.

Keep Reading


Subscribe to my Newsletter 😻 🤠

Join the hundreds of developers who get new code, writing, and interesting programming links delivered to their inboxes every week.