IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
      
     Home      Products      Services & solutions      Support & downloads      My account     

IBM developerWorks
developerWorks
lol:> Principles of preoccupation
e-mail it!
Related content:
More lol:>
Subscribe to the developerWorks newsletter
developerWorks Toolbox subscription

Candace A. York (cyork@us.ibm.com)
developerWorks liaison, IBM
April 2003

Candace York explores the yin of programming and its balance, the yang of snack food. Could programmers function without a constant focus on sugary treats?

Between the small and congenial spaces of preoccupied mind, developers are constantly talking to themselves. It's a most important practice that is passed on from developer to developer. It is an easy discipline -- easy to describe and easy to follow. But, like most complex languages, it takes some effort for it to happen.

Some say every developer learns it in school. Certainly, the constant murmur of programmers babbling in the ivory halls of erudition make us suspect that is true. Or, perhaps it is learned in coffee shops. But, I think preoccupation is to blame -- the senses spilling over when cognition missteps. As long as we are talking, somehow we feel that we aren't missing out on the pleasures of living.

Let us explore the positions of preoccupation.

"In this example, you will store and retrieve fig bars (I mean cookies, but what if it were cheesecake -- gooey, sinfully delicious ... No! No! No! Brrrrp! Brrrrp! Brrrp! Reset~! Reset!) "
if (0 <= parseInt (document.figbar.indexOf ('frames=yes', 0)))
	window.cheesecake.href="frames.htm";
else
	window.location.href="nooooooocheesecake.htm";

Mmmm! Yumm! Yumm! Do I hear you mumbling?

Preoccupation is such an easy techique. If you inhale now, there will be a slight curve in the lower region of your back, and in this position, it takes some little effort to keep your body upright.

"The program will now attempt to read the figbar for the current document.figbar property. Should it contain the keyword "cheesecake=yes", the user will be sent to the breakroom; otherwise the user is sent to the no-cheesecake page. (Thus, no cheesecake is the default.)"

This technique is guaranteed to cause your team leader to tremble, and OH MY, the salivating that will ensue in the test department.

"To simplify, I didn't actually access the cheesecake; that would require using a FRAMESET document as the initial frames page, and creating a "graham cracker crust" to hold the content."

"The GoNoFrames () function, accessed with the cherry topping on the page, enables the user to switch from a simple no-frames page to one more infinitely satisfying, which sets the figbar indicating the preference, then updates bakery.location to send the user there."

I think you see what I mean. Preoccupation is a breeze. This position is slightly asymmetrical and sometimes the upper torso needs to compensate in order to keep itself completely straight, and stop the stomach from growling.

It is important not to list to one side, and that is why sitting cross-legged on the floor with your laptop firmly braced against the stability of the indoor-outdoor carpet is important. This is called the seiza position, which you can achieve kneeling, with the nether portions of your anatomy resting on your upturned feet, which form an anatomical pillow. Preoccupation, thus assisted, will "seiza your mind," thus guaranteeing that you will lose concentration.

One way of sitting is to use a seiza bench. This handy programming toolset keeps all the weight off your mind. It helps if you are light-headed, which is important for preoccupation. Finally, it is fine to sit in a chair, although it is important to take the arms off so that you must sit upright, and keep your disgustingly scuffed sport-shoes flat on the floor.

"Here are a few observations about this example:

  • A timeout is used to send the programmer on a 15-minute break by default if no figbar has been set. The timeout is required so that the document cannot possibly finish loading before the programmer is redirected from the breakroom, returning to the next page. The timeout could possibly be shorter than the 15 minutes I suggest, and is generally accompanied by the melodic humming of a satisfied programmer.
  • You could do this without displaying the script at the beginning of the page. Needless to say, this would be more complicated, but would ensure a more interesting user experience. Fresh coffee is advised at this point, and teaming is recommended.
  • The figbar set applies to the server that sent the document. If you are working in a team environment with multiple programmers accessing the same server, you should use a more specific name for the figbar ( for example, THAT'S MY FIGBAR!) to avoid conflicts. Alternately, the same preference could be used by all programmers for multiple cheesecakes, and is recommended to avert fistfights from ruining your program."

I think I hear the senses spilling. Palm up, it takes little strength for the knuckles of your dominant hand to curl around the cheesecake. If you are left-handed, your left hand is holding your right hand while you nudge the fork closer. The thumb is lightly touching the steel, thus your hands form an oval, and the cosmic appetite tends to turn your attention outward.

The word "chee" as in cheesecake, means power and energy, and is central to the activities of this technique.

There are many ways of focusing the mind, and some traditions use visual images as a point of concentration. In this tradition, we focus on the vital force of appetite. Mind and appetite are one reality: when you are nervous, you breathe quickly and shallowly; muttering is a chore. When you are thinking about cheesecake, the mind is deep, easy, and effortless. Put your attention there. Put your mind there. Dwell in the preoccupation.

Your program will be better for it.

About the author
author Candace A. York is developerWorks liaison to the IBM brands, helping them develop, launch, and evolve their Developer Domains. You may have read her article last year on the IBM Advanced Technology Laboratory. She avoids writing seriously except during solar storms when she can't help it due to the radiation. You can contact Candace, if you need additional programming advice, at cyork@us.ibm.com.


e-mail it!
What do you think of this document?
Killer! (5)Good stuff (4)So-so; not bad (3)Needs work (2)Lame! (1)

Comments?



IBM developerWorks
developerWorks
  About IBM  |  Privacy  |  Terms of use  |  Contact