<Digression #1: I used to work with a guy who really, really wanted high heels on… on her. Not him; that would have been too weird >
You’re going to need the back story, as they say, I don’t who “they” are and why they call it the back story instead of the “background” story. I would suggest that you read this so called back story first. Get it here.
Ok, sorry, I’m back…..
What there was was tea. As usual, you’re muttering to yourself, off he goes babbling incoherently about erotic movies and food. The fact is, folks, erotica and food are both good in their own way. When combined, however, … but I digress.
<Digression #2: Do I detect the hint of an eye roll there, missy? Curb that enthusiasm and read on, for the story may just turn out to be a highly entertaining one. Stop watching the Youtube clip of Kim Basinger stripping and get back here! >
Yes, tea, it was indeed. It lay around in chests, on the conveyors and a fine tea dust lay over most of the shop floor and the air was replete with motes of tea particles. It was a tea blending and packaging plant. Over 1000 factory workers worked 3 shifts a day, there were another 200 or so who worked the regular shift, the office clerical staff, for example.
Militant unions ruled the roost which accounted for the 3 gardeners who came to work every day on time and got paid for their effort. The gardens they’d been hired to tend had long since died and been taken over by the needs of the factory for more space. However, they could neither be laid off, nor could they be re-deployed.
But the winds of change when they blow blow sudden. That fateful phone call which I had almost not taken had turned into a veritable khamsin. Since the day that the slowly one-finger typed proposal (with two carbons) had been accepted, my life had become a miserable mishmash of mounting melancholy interspersed with occasional forehead-smacking moments.
It turned out that dbaseII was unlike anything I had seen before.
Then I could not find out how to put a display on the screen. Nothing like a “PRINT” statement. Then I could not find a way to print on a printer. Everything was different. Thank god (and the guy in Z…) we had available to us a photocopied manual. I was used to being able to address each cursor position on the screen directly, therefore being able to put an item “exactly” where I wanted. Nothing like that was available. This was a very frustrating coding experience.
It paled in to insignificance, however, when I looked at the data from the clocks. I had to read this somehow and write it to dbaseII files somehow. This data came in as a text file and I sat and stared at it for what must have looked like hours, with a headache that started in the upper reaches of the forehead and moved swiftly through the brain and down into the shoulders. The data was backwards!
And not just backwards from end to end, but each individual element was backwards.
So now I had to find a way to
- Split the whole 128 character record into it’s component 5 or 6 parts
- Take each component and flip it backwards, like sdrawkcab.
- Find a way to write it to dbaseII format so that dBaseII could process it.
Of course dBaseII offered no way to do this. It offered a method of holding data in indexed files but that was pretty much all it did. There was rudimentary data manipulation commands but this problem required something much more powerful.
In moments like this, when crazy is required, my Beloved Bangalan usually steps back and lets me have a go at it. For I prefer living in chaos and she likes order. It was once my pleasure to hear a client introduce the two of us to one of his colleagues thus “Call her if you want something done and done well, on time. If you need some whacko, weird stuff done and all else has failed, then call him.”. Privately, I think he must have added “Make sure she’s there to keep an eye on him. She’s his trainer. Looks like she’s the only one who can control him…”
I sat there wondering what I had so rashly got myself into. Two of the 5 weeks were gone and I’d barely made a dent. The unions would have had a fit if we were late with the commissioning. As I sat there with my pad of paper with logic drawings over it (I still do it on paper first, to this day), my mind was a blank.
Well, not really, because as I looked at my Beloved Bangalan watching me, my brain thought, “Hmmm, she is pretty! Maybe, if I …”, but then it hit me.
QuickBasic! There it lay before me, the floppy label turned towards my hand.
BASIC was my first love. I cheated on her with PASCAL but that was a brief affair, because PASCAL turned out to be a middle-aged paunchy man in New Mexico, not the svelte pretty thing with long eyelashes it claimed to be. I’d left the C Compiler I’d used earlier behind when the startup ended. Read that story here if you wish.
In the next 2 weeks I had managed to find a way to read the data and had written a little piece of code called, wait for it…., “FLIP”! It took the input text file from the clocks, chopped it up into 5 or 6 components and flipped each of them over, so that I could now actually nettirw saw tahw daer. <get a mirror, maybe? Or write your own piece of code?>. Another week later we had the data actually into a dBaseII readable file. Huzzah! I was still having trouble with the print / display thing with 5 days to go.
That was the day someone poured oil and sand into one of the clocks….
The unions had previously jammed screwdrivers in and broken a PCB. They’d try everything to cause a delay. The only available spare was quickly installed as were protective casings so that all the orifices of the machine were inaccessible.
Then finally, it was time to go live.
The morning shift would be the first to punch in on the new system. It was all hands on deck for the managers in the plant. The first of the factory workers would show up around 5:30 or so. My wife and I decided that I would take the early shift and the morning shift, go home, take a nap while she handled the afternoon shift change and then I would come back for the night shift which was at 10pm. We were 27 years old way in over our heads.
The chaos in the early dawn was of epic proportions. All of the old cardboard cards with the rubber time stamp from the Bundy machines were gone. Instead, there were hard plastic cards with little holes in them.
Since a large population of the workforce could neither read nor write, they were unable to find their cards. They had been used to marking their cards with their unique symbol, a torn edge, a smudge of ink. The banks of uniform chocolate brown/black access cards had neither their pictures, or any means of identification. Managers and other staff stood there helping them find the cards. Anger, raised voices, threats and a general air of menace pervaded the area.
They were used to seeing a satisfying rubber stamp that proved they would get paid for their time. The plastic card did nothing, the matrix display flashed briefly with their badge number and the time stamped and then went blank. Workers thronged the clocks, punching 18, 19, 20 or more times, hoping that somehow the machine would give them proof of their time stamp. But answer came there none.
Within 20-25 minutes the mood had turned from ugly to murderous. I was grabbed by the arm by the HR Manager and whisked into the Systems Manager’s office which was a very large room and also housed the PCs. “Stay in here. Don’t come out”. Through the glass wall I could see the shop floor and the crowds that were now surrounding the HR Manager. Shouts, shaking fists surrounded him as he talked calmly.
I sat there, watching the theatrics outside. My head was throbbing with the idea that I had no idea what my precariously built software would say when it encountered all this data. It was pretty much held together by chewing gum and tape and raw hope.
Finally, the HR Manager came in with the Systems Manager.
“Ok, we need to give them a report that shows each and every punch they made. If they punched their cards 35 times I want to see all 35 punches. Start coding now. How long will it take?”
I was still quite shaky about the print capability of dBaseII and I did not know how all the extra punch-in data would affect my software. I got to work, my back to the glass wall.
The entire early shift was blending no tea, packing no tea into packages, packing no packages into cartons, labeling no cartons, shipping no cartons. No, all 400 odd workers were packed against the glass window.
Watching me code, watching the hair on the nape of my neck standing on end and waving in the breeze….