Adam Milligan's blog



Adam MilliganAdam Milligan
Refactoring a dead horse
edit Posted by Adam Milligan on Sunday May 10, 2009 at 05:30PM

A while back I made the point that the HasOneThroughAssociation class in Rails shouldn't be a subclass of HasManyThroughAssociation. I also submitted a Rails patch in which I changed the superclass of HasOneThroughAssociation from HasManyThroughAssociation to HasOneAssociation and moved the shared Through functionality into a module. Despite support from the teeming millions, Rails core team member Pratik rejected the patch for being "just a refactoring."

Adam MilliganAdam Milligan
Pondering a low grade slump (4)
edit Posted by Adam Milligan on Sunday May 03, 2009 at 12:23PM

The concept of flow holds a mystical, holy place in the lore of software development. Nearly any programmer can tell you about being "in the zone," totally immersed in code, oblivious to the passage of time. Countless programmers have cited this apparently hyper-productive state when stating their need for enclosed office space, separation from their colleagues, working from home, working at night, or any other similarly isolated work situation.

I'm not going to dispute the existence of a flow state; I've experienced it myself. I know the feeling of looking up after solving an interesting problem to find that fourteen hours have passed, it's the middle of the night, and I haven't eaten anything since the previous morning. I've felt the satisfaction of burying myself in ideas until finally finding a way to convert them into code.

However, I will suggest that working in isolation in order to promote a flow state is not the most productive way to write software. It's better than working in an environment filled with distractions unrelated to the task at hand, but less productive than working in a collaborative space, or pair programming. To illustrate this, consider another, simpler task that also often involves working in a flow state: cruciverbanalysis.