Supercharge Resque and Sidekiq With Go Part 2
In Part 1 we looked at a way to push jobs onto a queue with Ruby and have a Go program consume them. In Part 2 I want to explore some real world examples.
Read more...In Part 1 we looked at a way to push jobs onto a queue with Ruby and have a Go program consume them. In Part 2 I want to explore some real world examples.
Read more...Process background job queues faster by offloading jobs to Go. Take advantage of Go’s speed and low memory usage to replace slow or IO bound Ruby Workers.
Read more...News Year’s Eve in Sydney on the beach. What could be more splendid. Yes I realize I’m posting these three months late.
Read more...In object oriented programming we dislike the idea of type checking -
thing.is_a?(ClassWeKnowAbout)
. We prefer to just send messages to objects and
not care what class they are. In Ruby a conditional - if / else / end
- is a
type check. Don’t believe me? Consider the following code:
I’ve been writing a bit of Rust lately and I was super curious to see if I could embed Rust within Ruby to optimize some hot spots in a few programs I’d written. To test this out I implemented a Sudoku solver in Ruby using a simple brute force approach - very slow and very memory intensive. Nothing fancy or elegant. But an excellent candidate to see how much faster I could make it go.
Read more...I think too few people realize how much money and productivity their meetings drain. A one hour meeting with eight people is eight hours of lost work time - a full day of one employee’s time.
Read more...Recently decided to drive up the Oregon coast as part of a longer road trip from Tahoe to Seattle. Encountered some beautiful rain and fog that made for a surreal driving experience.
Read more...Is your Rails app starting to feel sluggish when running common start up
commands like server
, console
and rake
? Let’s take a look at debugging
rails applications that take a long time to boot.
Recently I took a short trip out to Vancouver, Canada. Saw the Canucks beat on the Maple Leafs. Wish I had taken a few more pictures. Overall, I enjoyed my brief stay. Next time I visit I’ll hopefully get the chance to put together a list of must see / do activities.
Read more...Here’s a technique for setting up your Rails app to share SCSS variables across
all of your .scss
partials.
Read more...Given an array and a value, find if there is a triplet in the array whose sum is equal to the given value. If there is such a triplet present in the array, then return true. Else return false. For example, if the given array is [-12, 3, 5, -2, -10, 19, -1] and given sum is 0, then there is a triplet (-2, -1 and 3) present in array whose sum is 0.
Quite often you might find yourself wanting to tail the logs for your remote servers. SSHing into the remote machine and manually tailing the logs is a bit cumbersome, so I’m going to show you how to do it with Capistrano (v3).
Read more...Product Roadmaps are dangerous. By committing to a long term roadmap (several quarters in length) you are choosing to make decisions several months down the road with only the data you have today. In those months things will change - priorities, customer base, cash flow. Key personnel may leave your organization, or due to unexpected success your team may now be much larger. Being stuck to a rigid plan make its hard to adapt to these kinds of changes.
Read more...One of my biggest gripes with Rails as of late has been the way third party assets are treated. To upgrade a front-end dependency I have to delete the old file and copy the newer version by hand. In 2014 this just feels a little weird, especially when tools like Bower exist.
Read more...##N+1 Problem
Read more...Here’s some tips for improving your Vim setup to edit Markdown files.
Read more...Rendering collections of Active Record models is really quite clean. Calling:
Read more...