Jon Cairns

topics.keep_if { |topic| %w(unix ruby vim).include? topic }

  • Blog
  • Projects
  • foobar2000

Main menu

Skip to primary content
Skip to secondary content

Post navigation

← Older posts

“Fat model, skinny controller” is a load of rubbish

6
Posted on April 11, 2013 by Jon Cairns

You may have heard the expression “fat model, skinny controller” when talking about MVC frameworks. I’m going to try and convince you that why that’s a misleading and potentially dangerous rule to follow. Problems working with MVC MVC frameworks provide … Continue reading →

Tagged design, mvc

The role of bundler with gem dependencies

Reply
Posted on April 5, 2013 by Jon Cairns

The very first gem I ever created was actually pretty good. Apart from one thing: when you installed it, it didn’t install the dependencies (i.e. the other gems that it depended upon). This might seem like a pretty big oversight, … Continue reading →

Tagged gem, ruby

Wait for a unix process to finish

Reply
Posted on March 20, 2013 by Jon Cairns

I sometimes find myself in the situation where I have a command running in my terminal, and want to run another command only after the first has finished. I’m pretty forgetful, so I don’t want to come back later and … Continue reading →

Tagged bash, pid, unix

Finding the process ID (PID) of a command in unix

1
Posted on March 20, 2013 by Jon Cairns

Getting the PID of a running command is something I do daily, particularly by grepping on the name, e.g.: The second column gives the process ID, which I then pick out to do something with (e.g. send a signal). You … Continue reading →

Tagged bash, pid, unix

Ruby rocks: averaging an array of numbers to return a set number

Reply
Posted on March 13, 2013 by Jon Cairns

I had a miniature programming challenge earlier today, creating an algorithm to manipulate an array of integers in Ruby. The array can be any length, but it needed to be modified to contain a maximum of, say, 5 elements. So, … Continue reading →

Tagged ruby

Reset PostgreSQL auto increment value in Rails

1
Posted on January 3, 2013 by Jon Cairns

I’ve been involved in writing a rake task to migrate an old database schema to a similar but new schema in a Rails project. The new schema was similar enough that we could carry across all the primary keys from … Continue reading →

Tagged active-record, postgresql, rails, rake, ruby

Post navigation

← Older posts

Follow me

Follow @joonty

Pair with me

Pair program with me!

Give me a shout if you're interested in doing some remote pair programming on open source software, and spread the word about pairprogramwith.me.

Twitter

  • @BobiKK yeh but that would ruin @devopsreactions 2 days ago

Recent Posts

  • “Fat model, skinny controller” is a load of rubbish
  • The role of bundler with gem dependencies
  • Wait for a unix process to finish
  • Finding the process ID (PID) of a command in unix
  • Ruby rocks: averaging an array of numbers to return a set number

Search

Archives

  • April 2013
  • March 2013
  • January 2013
  • December 2012
  • November 2012
  • September 2012
  • August 2012
  • July 2012
  • May 2012
  • March 2012
  • January 2012
  • October 2011
  • September 2011
  • October 2010

Tags

active-record bash ci code columnsUI foobar2000 gem git Github Google Chrome iTunes java JavaScript jenkins jTools LAMP linux mac mass-tagging netbeans panelsUI paperclip passenger pcntl perl phpqa pid playlists plugin postgresql python rails rake replaygain ruby rvm tdd testunit thin tutorial ubuntu unix update vdebug xdebug
Powered by WordPress and generous amounts of caffeine. © Jon Cairns 2011.