On Tue, May 18, 2004 at 11:04:35AM +0900, Gavin Sinclair wrote:
> There's a spectrum of reusability, and the onus is on the programmer to
> work out where they are aiming and to use the appropriate techniques. 

Let me tell you a little story...

Once upon a time I was stuck at work doing psychological support. It
was an Windows server and hence, 'not my problem', but the guy lived
near my place, so we usually walked home together, so I stuck around.

I figured I might as well do something semi-useful, and had been
irritated by the fact that internal documentation was these HTML files
stuck somewhere. I had an idea about these editable pages, so I
started fiddling with some PHP...

In a few hours I had something that worked, you could edit sections on
a page, add and delete pages, so on and so forth. Didn't look to bad
on the outside, but the code wasn't exactly what you'd call, ahem,
structured. It was a quick hack, and it worked.

I thought, "I'll call this SiDoc", from the initials of the company,
and proceeded to show it to my boss. He liked it, and it was quickly
decided that this was what we'd use for internal documentation. All
was nice.

A little while later, he came and asked if I could make a copy with a
'view only' version, so you'd have 2 pages, where only one could
edit. I said 'sure', made a copy and removed the edit links from one.

It wasn't until a few days later that I discovered that my one day
hack was suddenly the CMS system for a site... Made me wish I'd
actually bothered to clean up the duplicate code.

That was a few years ago. SiDoc is still the internal documentation
system, even though the company has changed name and wikis has gained
popularity. And it's still the CMS behind a site about small local
harbours.

I learned 2 things from this: Don't clean up your code 'later', and
there's no limit on how your code will get abused. Even by
yourself. ;)

-- 
Thomas
beast / system-tnt.dk