Your web-browser is very outdated, and as such, this website may not display properly. Please consider upgrading to a modern, faster and more secure browser. Click here to do so.

Daniel Pritchett

Consulting product developer with Coroutine in Memphis, TN.
Apr 1 '14
Mar 6 '14
"The problem is that the F-35 costs a gazillion dollars, and (partly because it costs a gazillion dollars) the program is too politically wired-in to cancel. So they have to cut other planes to make room for it, and the only way to do that is to claim the F-35 can do the missions those other planes currently do. Which it can’t, of course, but since admitting that would require keeping the other planes, which would require canceling the F-35, which can’t happen, everybody has sort of agreed to pretend it can."

Organizational politics in a nutshell.

Feb 27 '14

Lightweight Spree testing and deployment with Wercker and Heroku

Continuous deployment to Heroku has been a huge help on my last two projects. You might find it useful too!

Nov 19 '13

How I felt when the e-commerce framework I’ve been building on all year accepted my pull request.

Nov 4 '13
Oct 12 '13
Aug 2 '13
Jul 9 '13

Endless HTTParty retries in Ruby with a simple block

See also: A Ruby HOWTO: Writing A Method That Uses Code Blocks

# Simple wrapper to allow retries for HTTP requests - prolongs daemon life.
def with_http_retries(&block)
  rescue Errno::ECONNREFUSED, SocketError, Net::ReadTimeout
    DaemonKit.logger.error "Cannot reach [#{@service_url}]. Retrying in #{@retry_seconds} seconds."
    sleep @retry_seconds

# DRYing up the connection params
@request_params = [@service_url,
      { headers: { "Authorization" => "Token token=#{api_key}" }, timeout: 5 }]

loop do
  response = with_http_retries { HTTParty.get *@request_params }

  puts JSON.parse(response.body)

  sleep @delay_seconds
Jul 3 '13

Fixing PostgreSQL after Homebrew upgraded it from 9.1 to 9.2 and I was suddenly unable to access my existing databases


  • You just rebooted and suddenly PostgreSQL isn’t responding
  • Restarting postgres fails due to a “Your data files are incompatible with the current version of Postgres” error.


There’s a utility that comes with Postgres named pg_upgrade which should sort you out. In order to work it you’ll need to create and initialize a new postgres data directory and then call pg_upgrade and pass it paths for the old binaries, new binaries, old data directory, and new data directory. Read the script below for an example.

Jun 28 '13