Category Archives: Software Development

ActiveRecord default_scope is an Anti-Pattern

TL;DR Active Record’s default_scope should be renamed to something like always_prepend_scope to better describe what the method does. The Inspiration The other day, "default_scope" is an anti-pattern came across my twitter feed.  Having been burned by this issue I get the sentiment. The Problem with default_scope Let’s say I have a simple class like the

Solr Sorting Tidbit

The basic requirement was a fuzzy search on a series of business names and locations using a Levenshtein fuzzy string to handle typos, with results being returned with those whose name started with the query term displayed first followed by others that may have matched.  For our purposes, let’s say I had the following data

Viewing the command line using top

So I was watching what was happening on one of my Linux boxes the other day using top. I meant to quit using Ctrl-c, but instead, I missed the control key and just hit ‘c’. To my wonder, the list changed and now I could see the full command line for each process. How crazy

Wish CEOs Still Had Some of this Sentiment

"What the average man on the job wants is a good job and a feeling that as long as he does what is right he can keep it.  If a man is to have this feeling–and he cannot do good work without it–then the company must be loyal to him.  As a matter of sound

Breakfast Topics 4/15/2011

иконографияПравославни икони Very interesting to hear what people are working on. Some of the topics (that I remember) from today’s Tech Breakfast Multi-Tenant in Rails Using Capybara-Webkit Using Mechanical Turk instead of Selenium/SauceLabs/BrowserMob for Q/A of a website Using Maven with the Play Web Framework Using Fourier Transforms and Kalman Filters in image processing