28 Jun 2017
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.
22 Jun 2017
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 a
limit so it usually flies under my radar:
14 Jun 2017
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.
12 Jun 2017
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.
07 Jun 2017
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.
30 May 2017
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.
24 May 2017
As truisms go, one of my favorites is “writers write”. Many developers walk around pondering whether they are “real coders”, or they ask “how can I be more senior”. To them, I say “coders code”. If someone is writing, then by definition they are a writer. It doesn’t matter if they are J.K. Rowling or working a blog post. The act of writing creates a writer. The same is true of coding. If you’re in QA or DevOps or Front End or Backend or spend your days hunting down missing semicolons in code-reviews, you’re a coder. When you put your fingers to the keyboard at your editor of choice, even if it’s not Emacs or Vim or **, you're still a coder. If your fingers never grace a keyboard and you drive a pair session or dictate text, you're a coder.
17 May 2017
You want a faster app - where should you start? At RailsConf 2017 I was in a panel “Performance: performance” moderated by Sam Saffron and joined by Eileen Uchitelle, Rafael Franca, and Nate Berkopec. While we talked about many things, I realized I’ve never written explicitly about how to go from “zero” to “working on application performance”. Here’s the video from the panel if you’re interested:
08 May 2017
Break things and move fast. Which things? How fast? What if we’re stuck? A death spiral of indecision is when there’s a problem everyone agrees that must be solved - But there’s not one clear obvious winning answer. Today, I want to share an extremely effective technique I’ve used to make progress in these hairy situations.
01 May 2017
You’ve got an app with runaway memory use, what do you do hotshot? What do you do? If you’ve exausted the usual suspects it might be time to take drastic steps. It might be time to take a production heap dump. I previously wrote about doing this on Heroku, but since then we’ve launched Heroku exec, a way to SSH into a live running Dyno to allow you to debug. Now that you can do that, you don’t need an AWS account or any fancy gems to generate a heap dump, just activate this feature and add the
rbtrace gem to your app. Let’s do this to an app together.