Friday, January 28, 2011

RVM

It looks like I am the last hold out for the use of RVM.  What prompted my move?  Well Macs come with ruby 1.8.7, but I always use ruby 1.9 in my projects.  I replaced the standard system ruby with my own 1.9 version.  The problem came when starting a new job since they used ruby 1.8.7 (a patch level greater then supplied my Apple), and JRuby.

I spend a few hours just trying to get JRuby to play nice with the 1.9 version that I had installed.  Things where not going well.  The problems were almost entirely related to path-ing, but I am ruby programer not a system administrator.  I was almost ready to give up when I remembered a lightning talk given at the B'more on Rails group on RVM.

In case you, like me, have been hiding under a rock for the last few years RVM is a Ruby Version Manager.  In a nutshell it lets you install any or all versions of ruby in their own sandbox (you would be insane to install "all", but you can!).  It solves all the problems associated with having different ruby versions installed and allows you to easily switch ruby versions with rvm use XXX where XXX is the version of ruby of you want.

More then just being able to switch ruby versions; you are able to create arbitrary sandboxes for gems called GemSets.  This is most useful for me in trying to figure out what gems are used in what projects.  In most of my projects now I have a .rvmrc files containing the version of ruby and the GemSet to use for that project: echo "rvm use XXX@YYY --create" > .rvmrc, where XXX is the ruby version and YYY is the GemSet to use.  --create just creates a GemSet if it doesn't exist.

Your results may vary, but for me all I had to do was:
  1. Follow the quick install: bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
  2. List the rubies I could install: rvm list known
  3. Install a few rubies: rvm install XXX
  4. Switch to a ruby and test it: rvm use XXX
  5. Setup and a .rvmrc file: echo "rvm use XXX@YYY --create" > .rvmrc
I have not yet played around enough to see if I could use a GemSet to create a Bundler package.  It seems that they are made to play nice with each other, so I foresee no reason it will not be as straight forward as this.

Monday, January 10, 2011

Problems with Agile Implementation

I really like agile programming.  It keeps me close to the action, and makes me have to think about my next moves.  It also keeps me informed as to what is going on around me.  But in my many years of using agile I realize that, though the process itself is very nice, its implementations can tend not to be.

Problem don't arise from agile itself, but who and how it was implemented.  If the implementer's goals do not match the Agile Manifesto there is little chance of success.  I have used scrum many times and the most common problems I see are:
  1. Agile as Micromanagement
  2. Agile as a Whip
  3. Agile as an Excuse
Agile as Micromanagement
It looks like:
  1. Having to break task down into hourly segments of work
  2. Having to break task that logically have to be done by a single person
  3. Having to account for ALL time taken, even time not related to code like attending meetings
Agile tenet misused:
  1. Individuals and interactions over process and tools
  2. Working software over comprehensive documentation

This happens when a manager (chicken role) is the Scrum Master or when the Product Owner has say over implementation specifics.  It is a confusion of roles, which in turn leads to a confusion of goals, which in turn leads to over documentation.

Agile as a Whip
It looks like:
  1. Filtering a burn-down on an individual basis
  2. Placing more in the sprint then can be done (but still requiring it all to be done)
  3. Associating points with people (publicly)
  4. Associating number of tasks done with effort
  5. Associating points with hours
  6. Basically anything where measured output is more important then people
Agile tenet misused:
  1. Individuals and interactions over process and tools

Anytime you associate numbers with people you have created a crab mentality.  Their focus will stop being on software, but on making their numbers better.  Those that are better at number games will succeed, those that are better at software will fail.

Anytime you put your people under undo pressure then simple mistakes are made.  This is going to later erode confidence in the team.  It is going to happen like this: "you missed a comma in a Javascript file which causes it not to work in IE.  That was such a simple mistake to have tested for that I am not sure you are testing any of your code."  The problem was caused by 4 hours of sleep in 72 hours of coding at the end of an over-extended sprint.  The programmer was nearly delirious.  It is shocking it was the only mistake, not that it was a simple mistake!

Unfortunately I have seen this situation start innocent enough, with comments like "we don't want to over work the staff" or "we want to make sure they always have something to do" or "we want them working on the correct things".  If the "we" in question is management (chicken role) then there is probably already micromanagement going on, and Agile is being used as whip to solve the problems created by the bad implementation.

Agile as an Excuse.
It looks like:
  1. "You said it would take XXX.  It took YYY.  You need to make up the difference out of your own time"
  2. "We cannot slip these date, and you have already pared back the release N sprints ago.  You need to put in extra effort"
  3. "Agile is about being agile.  Even though we are mid sprint we are radically changing direction, but we are not canceling the sprint or doing sprint planning.  We are just swapping out some tasks for others."
  4. "You picked the language.  It is now your problem to bring this project to conclusion and under budget."
Agile tenet misused:
  1. Individuals and interactions over process and tools
  2. Responding to change over following a plan

These are all excuses I have heard.  Each time given by a person in chicken role (managers) because they are ignoring changes in the field (military term).  Every choice has a set of outcomes: some good, some bad.  The attempt with agile is not to mitigate bad outcomes, but to allow those outcomes to contribute to the overall direction.

Sometimes the bad outcome will be that something took to long, or that one language/tool was not the correct choice given the problem set.  If for every problem that happens the developer has to take their own time, or face embarrassment, to solve the problem then they will stop making choices.  Not just choices that might have bad outcomes, but choices altogether.  At which point someone in a chicken role will start making more choices then they should.