Refactoring and dirt

Yesterday I noticed that I was in an exceptionally good mood for no especially obvious reason, such as winning the lottery. Thinking about it, I concluded that I was happy because I was finally able to refactor the code I was working on after several weeks of implementing new features. It got to the point where working on it in its disorganized state gave me the exact same feeling as touching a slimy rock – ew ew ew!

Interesting – we say “clean code” and “dirty hack,” but I think that we really do co-opt the “ew, dirt, contamination” module of our brains to work with code. Weird, huh? I’m going to pay attention for other interesting recruitment examples.

4 thoughts on “Refactoring and dirt”

  1. Bad smells

    In my office, we’re more likely to say that a piece of code smells bad, rather than is dirty. Same mental association, just a different sense.

  2. Re: Bad smells

    Not in the sense of synaesthesia, if that’s what you mean – it’s just a mental association, a metaphor. But thinking on it again, I think I know the feeling you’re talking about – a sense of uncleanliness when dealing with bad code. For me, I’d often associate it with the moment of realisation of just how something works – and just how wrongly it’s been done.

Comments are closed.