Monday, February 27, 2012

Don't just refactor your code; refactor your learned behaviours too.

I have been contracting at a Dublin software firm for a few weeks now, and I've noticed that some database names have a mysterious number 102 in them. The core set of databases is deployed for each customer, and differentiated by customer name. The entire set of databases for each customer would be something like:


  • AcmeCorporationBlah
  • AcmeCorporationBlahBlah
  • AcmeCorporationBlahBlahBlah
  • AcmeCorporationBlahBlahBlahBlah
  • Qaz102AcmeCorporationBlah
  • Qaz102AcmeCorporationBlahBlah
  • Qaz102AcmeCorporationBlahBlahBlah.


I asked my colleagues the significance of this number and was told it was version 1.02 of the Qaz databases.

The thing is, there exist no version 101s, 103s or even 100s, neither in production nor in any other environment. In fact, every time one of these 'Qaz' databases occurs, the 102 is blindly included in the name.

I asked if the '102' was strictly necessary and the entire team looked at each other and shrugged. I then asked if we would ever deploy different versions of the QAZ databases for the same customer and was told, no, that would never happen. I then asked how long the 102 had been in the names and none of them knew. It predated them all, and the dev manager.

Since my current task involves deploying the databases for a new customer, I asked if I could omit the 102 from the QAZ database names. Now they all looked at each other and looked reproachful.

"No, that's the standard," one of them said. "Why do you want to take it out; just because you don't like it?"

"No," I replied. "I want to take it out because it's adding a small amount of unnecessary complexity to the domain."

He raised his eyebrows, said "Wow!" and turned back to his workstation shaking his head.

And that was the end of the conversation.

So now I'm propagating this fallacious learned behaviour and I'm irked; irked enough to write this blog post.

In the same way that code smells accumulate to clutter our code base, bad learned behaviours accumulate to clutter our working practices. 

We should refactor the bad smells out of both.

Often.


Monday, February 20, 2012

Wicklow-centric Meaning of Liff definitions #6

Curravanish (adj.)

Being self-conscious about the smell in your hotel room when room service arrives with your breakfast.

Wicklow-centric Meaning of Liff definitions #5

Macreddin (n.)

A self-conscious and economical crossing of oneself undertaken in public; often in conjunction with a Tomnahealy (q.v.)

Wicklow-centric Meaning of Liff definitions #4

Tomnahealy (n.)

An unintelligible burst of prayer muttered by devout Catholics on public transport as they pass a church, graveyard, ambulance, or anything at all that looks like it might have something to do with religion or death. Often accompanied by a Macreddin (q.v.)

Friday, February 17, 2012

Wicklow-centric Meaning of Liff definitions #3

Coolafancy (n.)

A hideously embarrassing dance invented spontaneously by a mildly drunk couple which they imagine is tremendously impressive to onlookers in the disco.

Wicklow-centric Meaning of Liff definitions #2

Tinahely (n.)

The sudden urge that overtakes perfectly honest people to steal a nice, weighty piece of cutlery. Can also be applied to the penchant for misappropriation of novelty branded glasses and ashtrays from public houses and other hostelries.

Wicklow-centric Meaning of Liff definitions #1

Newtownmountkennedy (n.)

A particularly randy and fecund ram which is responsible for siring most of the lambs in a given flock of sheep.