TechBookReport logo


Meet Joe Bloggs

Episode 6: Code Review

I get the bad news second-hand. Colin wanders over to my desk with the kind of grin on his face that makes most people shudder and step back.

'Someone just been killed?' I ask him. A good car accident always puts Colin in a good mood.

'Not yet,' he replies cryptically, then looks back over his shoulder.

I can see why Colin's so cheery. Terence Didlock, our very own code policeman is striding purposely towards me. Bollocks.

'Joe, how are you old man?' Terence announces at the top of his voice. People in the building across the road are peering through their windows at us.

'Fine, fine,' I mutter. 'And to what do I owe the pleasure?'

'Pleasure? Mine's a double Scotch on the rocks!'

I resist the belly laugh and adopt Colin's grin instead.

'Actually, old man,' Terence says, lowering his voice so that he can only be heard in our building. 'I need to talk to you about a rather delicate matter …'

'Prickly heat playing you up again?'

Terence looks blank for a second then laughs so loud that the windows rattle. 'Very good, old man, very good. Now, can we chinwag somewhere a little more …'

Unfortunately there are no padded or sound-proofed rooms in the office, so whatever it is he's got to share with me is going to be over-heard by the entire team. In fact they've already stopped work and are wearing the blank expressions worn by those listening intently in the fond expectation of overhearing bad news.

A minute later and I'm sitting in our meeting room, looking out at the troops as they smirk back at me. Terence has got his back to the glass partition so he's oblivious to the huddles breaking out here there and everywhere.

'I'm afraid that I've been looking at your team's code again,' Terence begins.

'We're doing our best to follow the standards …'

A sad shake of the head cuts me off. 'It's not that exactly,' Terence tells me.

Shit. I was just about to launch into an explanation of our code review procedures. Every week we sit around a table and carefully and dispassionately analyse and constructively criticise each others code. And it works. We sit there and listen and take it all in. It works really well and team morale is excellent. One day we're even planning to do one when we're sober.

'If it's not non-standard program code then what is it?'

'Well, I'm working on a paper for a conference at the moment,' he explains. 'It's called "Development Errors and Exceptions in Programs - Soft Heuristics in Information Technology". Snappy title, what thinks you?'

'You're kidding, right?'

'No, it's for the Automated Reasoning in Software Engineering conference. Very prestigious.'

I stifle the laugh and resist asking him on why he's writing an ARSE paper on DEEP-SHIT. I'm sure someone will tell him about it before he gets up in front of a thousand people to announce what he's working on. I'm sure …

'What's this got to do with my people?' I ask.

'I was running some of your code through DEEP and it threw up a few things I think we need to be aware of.'

'I see,' I lie. 'Such as?'

'I was looking at exception handling specifically. I wanted to see how manual coding leads to undetected bugs due to poor abstraction levels at the conceptual level.'

'You mean you wanted to see what the programmers had missed?'

'That's one way of putting it,' he sniffs airily. 'Anyway old man, I was a bit surprised by some of the error messages in the exception handlers.'

'Such as?'

Terence suddenly produces a tiny PDA from his jacket pocket. It's miniscule. Smaller than a mobile phone. It looks like a kid's toy. He taps at it a few times with a stylus that looks like a toothpick.

'Impressed?' he beams. 'Wireless connection back to the network. Colour screen. Masses of memory. Calendaring and contacts. The works. Anyway, take a look at this code.'

He carefully lays the PDA on the table and then pulls out a huge magnifying glass. 'Go on,' he urges, 'have a look.'

I take the magnifying glass and peek at the screen. It's displaying four lines of Java source code.

'It's an error message passed from a networking class. If you try to connect to a non-existent address this is what comes up.'

The message says "You wish."

'There's more. Take a look at this one,' he taps again with the stylus and a new bit of code is on the screen. 'This is from a database query.'

It says: "In your dreams, fuckwit."

'Who's code is this?' I ask.

'The first one was Phil's, the second one was Colin's. But that kind of attitude seems prevalent in your team.'

'I see.'

He taps again. 'This is from a URL wrapper class. Pass it a malformed address and you get this.'

"Typing error? Delete user and start again."

'I see.'

Terence nods sagely. 'Well, you can imagine how shocked I was. We can't have code calling users 'fuckwits', can we? It's just not on.'

'No, I suppose not,' I agree. So far all of the classes he's shown are at the server end. There's nothing there that would ever make it to an end-users screen.

'Well,' he continues, 'once I started digging I found more. I looked at comments in the source code as well.'

'But nobody ever looks at that code, we don't release it,' I point out.

'I know, but code quality is an important issue. It's part of the standard that we comment code.'

'And?'

'Well. Look at this.'

I read the comment at the top of block of code: "Fucked if I know how or why it works, but it mostly does - don't dick with this unless you have to."

'Awful,' I say, wondering when it was that I first wrote that comment.

'And this one was most interesting.'

I look at it for a moment in silence.

'Well,' he prompts me.

'That's a good recipe for Mushroom Dopiaza,' I acknowledge. 'Bit light on the chilli mind you …'

'But what's it doing in a Java program?'

I shrug. 'Passing on valuable knowledge?'

'And then this …'

I look at the tiny screen through the magnifying class. It's a list of hardcore porn sites at the top of a Java class definition.

'Did you …?'

'Yes,' he admits.

'When do you get your machine back?'

'Next week I hope,' Terence admits mournfully. 'Barry in tech support has insisted on copying all the files to CD for future reference, once that's done, and he's given copies to his friends, I should get my machine back in time to complete this sodding paper?Another couple of days using this damned PDA and I'll go loopy …'


Who Is Joe Bloggs? Read other episodes here

Return to home page

Contents copyright of Pan Pantziarka. If you like it link it, don't lift it. No copying for commercial use allowed. Site © 1999 - 2004.