Jesse Storimer's Blog Archives

Industrial strength signal handling in Ruby - August 16, 2013

This is a video clip from the latest edition of my Unix fu workshop, an online course about Unix programming for Ruby folk. Give it a watch to see part of the fun where we do industrial-strength signal handling (deferred signal handlers and the self-pipe trick) for a pre-forking web server we built. If you like it, sign up for ...
Read more

Unix fu workshop: August edition + giveaway - July 08, 2013

I just opened registration for an August edition of my online Unix system programming course. I  announced the first edition of the class a few weeks ago, but apparently I scheduled it right in the middle of summer vacation time. Thanks to everyone who got on the mailing list and let me know, this is for you! The August edition ...
Read more

[Interview] Daniel Huckstep on Ruby's stdlib and golang - July 02, 2013

I recorded a conversation with Daniel Huckstep about two topics that always arouse discussion: Ruby's stdlib and the Go programming language. Daniel is a Ruby developer, Go convert, and the author of Go: The Standard Library (ebook). Here are the highlights with links straight to the transcript: Daniel's "Ruby Batteries Included" talk from Mountain West Rubyconf # Core library vs. Standard library # ...
Read more

Nobody understands the GIL - Part 3: Thread Safety - June 21, 2013

There are some misconceptions in the Ruby community about this question surrounding MRI's GIL. If you only take one thing away from this article today, let it be this: The GIL does not make your Ruby code thread-safe. But you shouldn't take my word for it. This series started off just trying to understand what the GIL is at a technical ...
Read more

[Screencast] Faster Rails test runs...with Unix! - June 19, 2013

Anybody who works on a moderate size Rails app can probably tell you: it takes forever to run a single test. I've definitely experienced this with some of the big Rails projects I've worked on, and it sucks! Goodbye productivity. Some smart people have been advocating ways around this. But if you've got an existing app, seeing the full benefit of these techniques involves ...
Read more

Nobody understands the GIL - Part 2: Implementation - June 14, 2013

Last time, I began wanting to take you on a deep dive into MRI to see how the GIL is implemented. But first, I wanted to make sure I was asking the right question. Part 1 formulated the question, but today we'll look for answers inside MRI itself. We'll go looking for that elusive creature they call the GIL In the ...
Read more

Nobody understands the GIL - June 12, 2013

Throughout most of my time in the Ruby community, MRI's infamous GIL has been an elusive creature for me. This is a story about thread safety, and finally catching that elusive creature to get a good look at it. The first time I heard mention of the GIL, it had nothing to do with how it worked, what it did, ...
Read more

New release of Working With Ruby Threads! - June 11, 2013

I'm happy to report that I've made a BIG update to Working With Ruby Threads. Previous buyers always get free updates (you should have already received an email from me with the news and instructions). The update weighs in at about 40 pages of new content, with more diagrams and charts, and lots of clarifications and small improvements.Here's a laundry list of ...
Read more

Self publishing AND traditional publishing? - June 04, 2013

Today my friend and fellow self-publisher Pat Shaughnessy announced that his excellent self-published title will be re-released in the fall backed by a publisher. After waving the self-publishing eBook banner last year, I’ve gone over to the dark side. This Spring I decided to work withNo Starch Press to bring Ruby Under a Microscope to print. We plan to have it available online and in ...
Read more

Is lock-free logging safe? - May 30, 2013

This is a bit of an odd question without some context. Recently, I saw the mono_logger project. It claims to provide "a lock-free Logger for Ruby 2.0". When I saw it I thought "Cool! I want to see what tricks they used to implement this". It looked pretty straightforward at first. When I looked closer and compared it to Logger ...
Read more

How many threads is too many? - May 26, 2013

This is a sample chapter from my ebook Working With Ruby Threads. If you're curious about all the talk in the community about multi-threaded concurrency, this book will give you a gentle introduction so you can join the conversation. This question is relevant whether you're whipping up a quick script to scrape some websites, trying to speed up a long-running ...
Read more

[Interview] Brian Shirai on Rubinius 2.0, the GIL, and thread-safe Ruby code - March 26, 2013

Brian Shirai and I recorded a conversation about multi-threaded programming in Ruby and his work on Rubinius. Listen (or read the transcript) to hear about: what's the global lock and its effect on concurrency? why the GIL is not a substitute for thread-safety why multi-threading is hard to reason about, and the best approach to doing so the three things ...
Read more

My ebook Publishing Process - February 28, 2013

Over the past year and some, since I've been publishing ebooks, various people have asked about my publishing tools. I've given a few responses via email, or links via Twitter, but never laid everything out in one place. In December of 2012 I published an update to one of my books, here I'll lay out the steps (and tools) involved ...
Read more

Threads, Not Just for Optimizations - January 24, 2013

The Ruby community seems to be abuzz with people talking about threads. But often, the conversation is geared towards the fact that our machines all have multiple cores, and we (c|sh)ould be running our code in parallel, blazing fast on ALL the cores. I absolutely think this is a good idea, but I want to talk about the other side ...
Read more

Naivety Helped Me Learn Rails - November 30, 2012

Before I started working at Shopify I had near-zero experience with Ruby and Rails. I had read the PragProg book before starting there, but that was pretty much it. After a few months on the job, I was shipping features on my own and started contributing to all different parts of Shopify. There were a few key factors that helped ...
Read more