We were interviewing tech lead candidates last week, and on a whim I decided to print out the Scientology “Whole Track” Security Check as an amusing prop. The check is a list of questions that are supposed to encompass all your past lives, and includes such gems as:
- Did you come to Earth for evil purposes?
- Have you ever enslaved a population?
- Have you ever made a planet, or nation, radioactive?
The idea was that I would leave the printout in a prominent position next to all my other papers in case the candidate got a little too curious. During the course of the interview, though, this question caught my eye:
Have you ever done anything which you hoped would be wiped out by the passage of time?
So I asked it1.
Unfortunately, I think the shock value of the question (and the fact the other interviewers laughed when I asked it) made it less than useful, but for the record here are the answers I gave when later the question was turned around and directed at me.
Don’t Try This at Home, Kids
Somewhere deep in Confluence there is a block of code that, through reflection, messes with the private internal state of a core Java library class, amongst other things causing it to disobey an IETF RFC. Above, there is a comment that still gets me in trouble with my co-workers: “This is a truly egregious hack. Please don't do anything like this in your own code.”
AbstractPage
The initial cut of the blogging code in Confluence was developed in a rush. 1.0 was approaching fast and one of our early adopters had flatly said they weren't buying the final release if it didn't have blogging in it. As a result, I made one of the classic mistakes of object oriented programming and used inheritance where I should have used delegation. The tendrils of this mistake still creep through a large portion of the product's content-handling code, and make it a lot harder to add features in that area than it really should be.
oh_my_god_thats_some_funky_stats()
Once upon a time, I was asked to write some software to help manage an Internet café. It was actually pretty neat: a CGI script (written in Perl) that used a Unix named pipe to talk to a daemon process (also written in Perl) that would add and remove firewall rules to enable and disable the various computers in the cafe. There were also a few rudimentary accounting functions, and some nifty ASCII-art graphs of desktop utilisation over time.
The problems arose from the fact that I was (1) young, (2) underpaid and (3) firmly believed I was getting a new job soon and would thus never have to maintain this script. As a result, I committed some egregious and entirely deliberate crimes against maintainability:
- I decided this was a great opportunity to teach myself OO Perl, despite not really understanding OO (or Perl, for that matter)
- One method required five local variables, occasionally swapping their values. I called them
$binky
,$banky
,$bonky
,$bunky
and$benky
- Many functions were named after the song I was listening to at the time (see above).
Three months later, of course, I was still working at the same job and we got word from the café that they wanted to change from pre-paid access to billing people once they were done. So really, the joke was on me.
1 …with the immediate qualification that I was only asking in a professional context.