In this concluding article, explore the scripts which add andremove timesheet entries to the system, and get a crash course instatistics by using these entries to generate useful resource allocationand usage reports.
Yes, I know that was a little complicated, but you have to admit it works like a charm. One of the major battles is now behind us, with one still ahead - report generation.
Before I start writing code, I'd like to spend a little time analyzing the problem ahead. First, there are innumerable types of reports possible with the data available to us. Numbers can be massaged and interpreted in different ways to produce different conclusions (as Disraeli famously said, "there are lies, damned lies and statistics") and so it's essential (especially since I'm running out of time) to identify which types of reports are most useful, and concentrate my efforts on those.
In order to get a better feel for the problem, I decide to turn to the Boss for help. After all, he runs a company too - surely he'll have some idea of the kind of data that would be most helpful in making business decisions on resource allocation and usage. And he does...
"Well, lemme see," he drawls, spinning in his swivel chair to look out of the window. "The most important thing, in my opinion, would be to see the amount of time spent on the different tasks within a project. I'd find it very useful to know, for example, how much time you spend on code design and development, versus the amount of time the System Test people take to test your code. If I can break up a project into tasks and attach a dollar value to the hours spent on each task, I can then calculate the total time and money spent on the project, compare it with the revenue earned, and find out if we're actually making any money!" (this last accompanied with a fist slamming down on the table.)
"Next, " he continues, calming down a little, "I want to see a breakdown of hours spent on a project by user, so that I know who's pulling the weight and who's slacking off. I notice that you, for example, spend an inordinate amount of time at lunch - I'd be very curious to see how those hours are logged."
So he's been keeping tabs on me, huh? Gotta wonder how this guy has time to manage a company, given the amount of time he spends keeping track of employee lunch hours...
But the Boss is just warming up.
"And, since I've also happened to notice that this company's output drops dramatically every time I have to go out of town, I'd very much like the ability to see a big-picture overview for a specific period of time - this should show me the time spent on *all* our active customers, broken down by user and task. And you know something - I bet that if I compare that data for the weeks I'm in the office and the weeks I'm out of town, I'd be able to draw some interesting conclusions," smirking away like he's just thought of something funny.
Right. I've just about had enough of this guy. So I do the only thing that occurs to me - I stand up, walk around the desk, tip his swivel chair backwards and, as he flaps around helplessly on the floor, turn on my heel, and stride through the door with my long black coat flowing behind me like a cape...