blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Dark Matter

It's the stuff in between that counts...

It's not Refactoring, Goddamit!

It never ceases to amaze (and irritate) me, the degree to which certain terms and phrases are misappropriated - particularly in the computer industry, and doubly so with "new" terms that find their way into the lexicon on the wave of  emerging trends. The pressure to appear up-to-date and where-it's-at seems to drive people to swap out their current vocabulary with the new-fangled speak.

The trouble is, the substitution is generally approximate - the culprit "understands" the new expression in terms of his (or her) existing vocabulary, makes a connection and updates his usage to incorporate it. This results in a loss, or subversion, of meaning. The new term will typically have been coined in an attempt to introduce a subtle variation on an existing one, or to capture a notion that falls somewhere between two existing terms.

Of course, the flip side of this is marketing-speak, where a new term may be introduced in an attempt to create the illusion of distinction. 

There are countless examples. I'm sure we all have our own personal bugbears. A decade ago, as people started to take up the Worldwide Web (probably after the infamous Christmas of '95, when Microsoft abandoned its denial stance, threw Blackbird in the bin and made moves to position itself as the "inventor" of the web), it used to drive me nuts the way people would refer to the Internet as the Web. With a single word they effectively denied the existence of a whole raft of protocols and collaborative channels and confirmed my opinion that they just didn't get it. Ironically, the emergence of the latest term - Web 2.0 - actually takes us back toward the meaning of the original term, rediscovering the synergies and collaborative possibilities that once upon a time would have been attributed to the Internet.

Anyway, enough of that. I didn't come here to talk about Web 2.0. Today's misappropriated word is: refactoring (I refactor, you refactor, he/she/it refactors...).

Not a day goes by where I don't hear someone in the office (either a misguided developer or an over-enthusiastic business consultant) use the word refactor as a directly interchangeable synonym for change, rewrite, fix, re-design, re-work etc.

C'mon guys! Get with the programme! Refactoring is (or should be) a way of life for a developer - as constant and ever-present as breathing. It lies at the very heart of Agile/XP practices. It's not a tactical solution to a particular pressing problem. Granted: it's a fairly cheesy term, cobbled together by Martin Fowler in true Victorian style from Latin elements; presumably with the intended literal translation of re-make (bit of dodgy etymology going on there...). However, if the term itself is somewhat woolly and ambiguous, the process it was attempting to describe is altogether more precise. For the uninitiated, here's the "official" definition from refactoring.com:

Refactoring Logo

What is Refactoring?

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it's less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring.

 So... next time you're discussing or explaining something that needs to be changed, rewritten, fixed, re-designed or re-worked, please, just tell it like it is. Instead of saying "We've identified some 'solution start points' that require refactoring.", try saying "We've found some bugs that need to be fixed.".

You'll make me happy, and when you one day find yourself saying "I find refactoring a useful approach for refining my class hierarchies.", you'll recognize the twinkle in the eyes of the cognoscenti and you may even garner a little well-deserved kudos. Wink

Published 24 November 2006 16:54 by Rupert.Thomas

Comments

No Comments
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems