Quantcast
Channel: Binary Code » /dev/random
Browsing all 10 articles
Browse latest View live

Raw SQL queries and Rails

For some crazy reason you find yourself thinking “it’d be really great right now if I could just run some raw SQL queries against my database in this here Rails app”, but how? The saner amongst us...

View Article



Menuito: Fixing Broken Sites One Restaurant at a Time

This week a good friend launched Menuito, his company aimed specifically at helping restaurants improve their websites for mobile users. Menuito is pretty damned clever. It effectively routes around...

View Article

Rake :needs deprecated

Recently I updated rake on a project and was met with this warning: WARNING: ‘task :t, arg, :needs => [deps]‘ is deprecated. Please use ‘task :t, [args] => [deps]‘ instead. It wasn’t immediately...

View Article

Living Code

Long, long ago I posted Better Range Intersection in Ruby, which was Dan’s improved solution to my solution for finding intersections across date ranges. Two years and 3,100 pageviews later, Montgomery...

View Article

Measuring Slow Code in Objective-C

A note to myself, because I can never remember how to do this: NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; ...operation here... NSTimeInterval duration = [NSDate...

View Article


Stubbing Geocode with FactoryGirl

Google doesn’t seem to like it when our geocoded models hammer their geocoding API during our test runs so we should stub out the geocoding call. To do so: FactoryGirl.define do factory :place do name...

View Article

Blocking Facebook

While I do have a Facebook account (because it’s damned near impossible to delete one; it certainly isn’t possible via the Facebook site itself), for the most part I try to run invisible to Facebook....

View Article

Paying vs. Pirating

Over in the Ottawa Citizen, Kate Heartfield writes in “Please, let me pay for that movie”, a poignant op-ed piece, that quite a lot of people who might be inclined to pirate content would really rather...

View Article


Ruby: Invalid multibyte char error and rspec

When testing in rspec and the dreaded “invalid multibyte char (US-ASCII)” error shows up, it’s probably because the test file doesn’t have # encoding: UTF-8 at the top of it.

View Article


Rspec, DRb::DRbConnError and Connection Refused

My Rspec specs suddenly stopped working with the following error: Failure/Error: Unable to find matching line from backtrace DRb::DRbConnError: druby://127.0.0.1:8989 - # Oddly, the first two tests...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images