Celluloid and Sidekiq hackfest in Portland

Tim Carey-Smith (aka halorgium, Celluloid committer) and I are meeting for a Celluloid and Sidekiq hackfest this Wednesday in Portland. Join us for anything related to Ruby, concurrency, threading, asynchronous processing and lots of other SEO-friendly buzzwords!

Where: Lucky Lab NW (20th and Quimby)
When: Wednesday May 29th, 6-10pm
Who: Anyone interested

Blogging and the Paralysis of Choice

When I talk to younger developers about starting to blog, they often say things like “I don’t know what to write about” or “I have nothing to say”. This is because there is simply a paradox of too much to say, or what is commonly referred to as paralysis of choice. The field of software engineering is a complex one, full of detail. Trying to encompass all that detail can be terrifying.

I was rereading Zen and the Art of Motorcycle Maintenance a few months ago and the author had a wonderful anecdote about how to get past this paralysis. He asked his class to write an essay on anything related to the city they were in. A student expressed confusion, stating she didn’t know what to write about. He said, “Then write about the front of City Hall”. She still looked confused so he clarified: “Ok, write about the top left brick on the front of City Hall”. The next day she turned in 1000 words about brick making in the area.

Simple advice: if you find yourself paralyzed by choice, zoom in. Other details will fade away and you can focus, research and write about that single element.

Sidekiq Pro reaches 1.0!

I announced Sidekiq Pro seven months ago and since then I’ve released 15 versions with both minor bugfixes and major new features.

Today I decided to pull the trigger and call it 1.0! I’ve moved the Sidekiq Pro changelog to the sidekiq repo for better visibility for all Sidekiq users. Watsi, Litmus, Customer.io and Travis-CI are just a few of the companies that have upgraded to Pro.

To celebrate the 1.0 release, I’m giving away one free license to an existing Sidekiq user! All you have to do is tweet an image of your current dashboard “Processed” count and say you want Sidekiq Pro. Here’s The Clymb’s dashboard:

dashboard

Example: “.@AcmeCorp wants Sidekiq Pro! http://example.org/dashboard.png”

A few days from now, I’ll collect all the tweets and draw one at random from a hat. Good luck!

Dealing with Stuck Workers

Occasionally Sidekiq users report workers that are “stuck” processing jobs for a long time. Usually this means that there are entries in the Workers page in the Web UI that linger for a long time. This post explains what you can do as a Sidekiq user to track down what is happening.

Continue reading

Board Games and Beverages at Railsconf 2013

Carcassonne

You are invited to a whimsical evening of merriment and gamesmanship!

What: Board Games and Beverages
Where: Skyroom Lounge, top of Red Lion Hotel, across the street from Railsconf
When: Tuesday, 4/30 7-11pm

The Skyroom has a great view of Portland so try to get there before sundown. We should have enough games for everyone but bring your favorite if you’d like. They have food if you need a late dinner. They have room for 250 so I’m hoping we’ll have plenty of room for everyone.

If you’re in, please comment to RSVP!

Railsconf 2013 events

Want to know what’s going on during Railsconf 2013 outside of the conference center? Here’s a list of all events open to the public, this page will be updated as I learn of more events. Email mperham at gmail with event details.

Sunday 4/28

KidsCodeCamp, 10am-4pm, Multnomah Arts Center
PlanetArgon.com Gorge Hike, 12:30-6:30pm, meet at Convention Center

Monday 4/29

Tech Women’s Communities Social, 7-9pm, NewRelic HQ
Code Fellows Happy Hour, 7:30-9:30pm, Rontoms
ZenCoder and SendGrid Party, 7:30-9:30pm, Ground Kontrol
Pivotal Labs Mixer, 9-11pm, Spirit of ’77

Tuesday 4/30

RailsConf Run 1, 7am, Steel Bridge
Board Games and Beverages, 7-11pm, Skyroom Lounge
A Night in the Ruby Sky, 7:30-10:30pm, NewRelic HQ

Wednesday 5/1

Railsconf Bike Ride, 6:45pm
CodeClimate Drinkup, 6pm, Green Dragon
Kickstarter Meetup, 7pm, Dig a Pony
EngineYard / Elemental After Party, 7:30-10pm, Elemental Office
Lumosity Party (pw: lumos), 8:30-11:30pm, Spirit of ’77

Thursday 5/2

RailsConf Run 2, 7am, MAX Zoo Station

Signal Handling with Ruby 2.0

A user recently ran Sidekiq with Ruby 2.0 and found that the signal handling did not work well at all. Ctrl-C and other signals resulted in some ominous stack traces.

It turns out that Ruby 2.0 locks down what you can do in a signal handler in order to prevent unsafe or possibly non-deterministic behavior. You can’t take a Mutex within a signal handler anymore as this could result in a thread context switch or even deadlock. In fact you can’t even write to a Logger because it tries to use a Mutex internally.

I rewrote the signal handling to conform with the new restrictions: all handlers now just push the name of the signal onto a global array and the main thread polls once per second for unhandled signals. This isn’t perfect, polling is something to be avoided where possible, but I don’t know of a better solution and it’s a lot better than the previous “fat” handlers that did a lot of work.

Bill Gates

Some back of the envelope numbers I was pondering this morning:

40 hours / week * 50 weeks / year = 2000 hr / yr

Bill Gates is worth about $66 billion. He’s worked for about 33 years now.

66 billion / 33 years = $2 billion/year / 2000 = $1 million / hour.

Bill Gates has made roughly $1 million per hour over the length of his career. Most people would be happy to make that amount in a decade. No moral or judgment here, just an astonishing number to think about.

Happy Birthday Sidekiq!

This day last year I released Sidekiq 0.5.0 to the public. I left Carbon Five in mid-January and was moving to Portland to join The Clymb with wife and child in tow. For the previous few months, I’d been thinking about background processing and felt there was opportunity for a library that was more efficient and also provided more functionality. I spent my two weeks of downtime building what became Sidekiq.
Continue reading