Friday, October 21, 2005

In Batch Processing Mode

In Batch Processing Mode


Planning to start a new routine for the coming days (and possibly weeks): go to bed early and start work early the next day. You see, I'm still trying to fine tune my day for maximum productivity--I want to ensure that I reserve my most productive (and hopefully creative) hours during the day for "batch processing" work, and leave the rest for miscellaneous activities.

I categorize activities that constitute "work" into two categories: online transaction processing (OLTP) and batch processing. Every working person has to deal with both. The former are those "transactional" type of activities such as meetings, phonecalls, e-mails, SMS and nowadays Skype and online chat sessions.

These OLTP processes are relatively short duration "request-respond" type of tasks. A greater part of our working hours is dedicated to these activities. They are only taxing when the transaction rates are high--e.g. trying to squeeze as many meetings as possible into one day.

However, OLTP processing are easier to handle in a sense that, you usually don't have to prepare too much--you just think on your feet and respond immediately. OLTP can come in a varied mix: a con-call, followed by an SMS response and then a quick meeting at Starbucks downstairs and then back to the office to send off a fax. They can even happen in parallel (most people send and receive text messages during meetings these days). No problem.

The difficult tasks are the batch processing ones. This include any kind of lengthy writing work--reports, articles, papers--and deep analytical work. You need a stretch of uninterrupted time--a whole day or a whole week or months even. You need research, you need inspiration. You need time to immerse yourself into the subject before you can settle down to work.

You cannot for example, write your article or report for five minutes and then interrupt yourself to make a phone-call for the next ten minutes before resuming exactly from where you left off. Your train of thoughts would have already been disrupted. Your mood is already spoilt. You need to start all over again. That's what I mean by batch processing.

In data centers, you typically don't mix the two workloads together in one server because you can only optimize computing resources for one type of job at any one time. Most data centers do their batch processing runs at night. Which is the same reason why some people are forced to work late into the night--you don't get interrupted so much.

But unfortunately we are not machines that can perform consistently throughout the day. The mind gets tired. It's difficult to do lots of transaction processing for the whole day and then go home and be expected to be equally productive doing batch jobs.

Emotions affect us too. If you have just concluded a very heated meeting, you are certainly not able to plunge immediately into writing a thesis on the Electrodynamics of Moving Bodies. Your head will still be swirling with thoughts and emotions. You'll most likely pick up the phone to call a friend to vent your frustrations; or if you are a geek, you'd be inclined to pour everything out in your blog.

What I've been trying to do is to lump all OLTP work for the week, if possible into one or two days and leave the rest for batch processing. But you can only schedule things that are within your control that way; you cannot stop people from calling, texting and interrupting you during your batch processing days.

I've been thinking maybe, early morning rather than late at night would be the most conducive for doing batch processing work. You go to bed early and your mind will be fresh when you wake up at 4.00am. There'll certainly be no interruptions during that time (hopefully!). So, a few quality hours of batch processing followed by OLTP for the rest of the day.

I woke up at 4.00am this morning and was able to put in some productive work. Planning to do the same again tomorrow morning. It's getting late--I've got to go and hit the sack now. Goodnight!

Tuesday, October 18, 2005

Night's Plutonian Shore

Night's Plutonian Shore


I managed to spend time this morning jogging around the neighbourhood park today. Feel so much fresher after some exercise. If I don't sleep too late tonight, I'll probably try and wake up early for another session tomorrow morning.

My productivity today is about average. But the day is not done yet--I'm only taking a short break to deposit my random thoughts into cyberspace. There's another long night of work ahead.

Not sure what I'm going to write today but as usual I'll just ramble on until I hit a topic. Or maybe I'll pull out one of my books and see if I can dive into any interesting passages for inspiration...

Ah, let's talk about Poe. When I was a teenager, I loved reading Edgar Allan Poe. I still do. Every now and then I'll reread one of his Tales of Mystery and Imagination and immerse myself in one of his dark and atmospheric pieces. As a schoolboy, I had tried to imitate his style in my essays. My English teachers were of course not amused with my morbid imagery and ridiculously ornate sentences!

Some of my favourite stories by Poe include Berenice ("Misery is manifold. The wretchedness of the earth is multiform"), the Pit and the Pendulum ("I was sick -- sick unto death with that long agony"), The Cask of Amontillado ("I must not only punish but punish with impunity"), The Masque of the Red Death ("Blood was its Avatar and its seal --the redness and the horror of blood") and The Tell-Tale Heart ("here, here! --It is the beating of his hideous heart!"). Of course, the famous "Raven" poem is also a personal favourite of mine ("quoth the Raven, 'Nevermore'").

I've always been intrigued by Poe's masterful ability to blend sound and imagery in words to such great effect. It is sheer pleasure to read his works aloud. In fact I think both his prose and poems are meant to be read aloud.

In my computer notebook, I keep a copy of The Edgar Allan Poe Audio Collection--a wonderful selection of his most popular stories, dramatized by the booming voices of Vincent Price and Basil Rathbone. No one could evoke the terror and mystery of his stories better than these two actors.

Now whenever I feel a bit weak and weary from working late into the night, I'd play my Poe audiobook and allow myself to be transported into his strange world--a phantasmagoric world so terrifying and yet so nostalgically familiar to me; and then all that wonderment of my boyhood years would come back; and slowly, I'd allow myself to drift deeper and deeper, into the dark and haunted recessess of my mind, into that nether-realm of half-conscious dreaming, into Night's Plutonian Shore...

Sunday, October 16, 2005

The Craftsman at Work

The Craftsman at Work


A weekend of continuous work leaves me quite exhausted indeed. I hope to find some time to go jogging again this coming week--it's something that I haven't been able to do very regularly these days.

Come to think of it, it has been a long time since I had the time to go for a long and unhurried breakfast with the morning papers. I used to do that a lot when I was working in Singapore. At that time (and like now), I was working mostly from home.

When you work from home, it usually means that you are virtually working the whole day. The good thing is that your time is more flexible and you don't have to join the mad rush to work every morning. However this flexibility can also be easily abused if one does not have the necessary self-discipline.

Self-discipline is so critical to anyone who wants to accomplish any kind of job. But how does one supervise oneself? Isn't that close to an impossible task?

I use my favourite pain and pleasure technique again. There must be enough push (pain) and pull (pleasure) factors to drive one forward. I constantly remind myself of all the pleasure that I could enjoy once I accomplish something. It is important that this pleasure is made vivid and real in one's mind, so that it is enticing enough. The pleasure could be material (money), emotional (sense of pride and accomplishment) or spiritual (success in subduing one's negative impulses).

The push factors are usually pretty clear: pressure from the customer or your boss, plus the ever-present need to make ends meet. For some, the fear of failure (resulting in loss of face or pride) is another big push factor.

But once the twin forces of pain and pleasure are set into motion, you are quite assured of not remaining static. It is as if you are on auto-pilot, provided that you remain in conscious contact with the push/pull forces.

Because work usually means making sacrifices for some future pleasure, the immediate "pleasure"--such as procrastination--can often be a much greater pull. One can counter this by organizing small rewards--like allowing yourself to watch your favourite show on TV--upon finishing a chunk of work. Break up a huge job into small chunks of tasks, with rewards thrown in upon their completion. That way the long journey to completion will not feel so tedious.

I also like to see work as a spiritual cleansing exercise. In a previous posting, I used the paradigm of a "workout" to describe the benefits of working. That way, work is never a pressure-filled experience. It is an act of meditation. How is that so?

If you watch a skilled craftsman at work closely. say an engraver or even a cobbler, you will find that his motions are never hurried. He works at a steady pace and there's a certain harmonious ease in the way he moves. He is completely at peace with his surroundings.

This is what I mean by work being an act of meditation: the worker and the work fuse into one. That's the state of mind that I want to achieve whenever I'm working--the mind of a craftsman deeply and happily engrossed in his task.

Well, I must confess that I don't always succeed. I'm definitely not a craftsman yet in what I do. But I'm working on it.