October 2002 Archives

Jonathan Gennick

AddThis Social Bookmark Button

Somone recently floated the idea of a COBOL In A Nutshell book. Several
us editors were sitting around talking about the idea, and all that talk brought
back memories of my very first COBOL program. It may have been my first real
program aside from some snippets of BASIC that I typed into TRS-80s on display
at the local Radio Shack.

It was the summer of ‘79, and I was between my junior and senior years of high-school.
Somehow, from a T.V. show I think, I got the idea of taking a college computer
course during my summer vacation. My mother, bless her heart, managed to enroll
me in a COBOL I course at Henry Ford Community
College
only a few miles from my home. I still remember the instructor’s
name: Mr. Rostek, I believe it was Mr. John Rostek. He was a great instructor;
I wonder whatever became of him. The course was taught on an IBM 360, we wrote
our programs on coding-sheets and later had them punched onto punch-cards, and
I had to buy a flowcharting template so I could flowchart each homework assignment.
Those were great days.

Almost from the very beginning, I was fascinated by the wordiness of COBOL.
Not only could I use COBOL to control the computer, I could also write sentences
that read like regular, English-language sentences. The possibilities were just
too much to ignore, so when my first homework assignment came around I set out
not only to write a correct program, but also to take full advantage the opportunities
COBOL offerred for some good, old-fashioned fun.

The first flow-of-control statement we’d been taught was the GO TO. No one
would teach GO TO first today, of course, but this was then, and GO TO was still
acceptable. When I heard the words GO TO, the first thing my mind came back
with was HELL, so of course I had to structure my whole programming around the
idea of going to hell. I also had some fun with FD names (file names) and record
names, so the first part of my PROCEDURE DIVISION looked something like the
following:

        PROCEDURE DIVISION.
            OPEN INPUT THE-NEWSPAPER.
            OPEN OUTPUT THE-DOOR.

            READ THE-NEWSPAPER
                AT END GO TO HELL.

        ANOTHER-PAGE.
            PERFORM SOMETHING.
            GO TO ANOTHER-PAGE.

        HELL.
            CLOSE THE-NEWSPAPER.
            CLOSE THE-DOOR.
            STOP RUN.

But my fun didn’t end there. Our assignment was to read some records from a
file, do a bit of manipulation, and then write each record to a printed report.
COBOL’s MOVE verb was full of possibilities, as were the various arithmetic
verbs. Have you ever been told not to mix apples and oranges? Well in COBOL
you can get away with that. My SOMETHING paragraph, which processed each record,
read somewhat as follows:

        SOMETHING.
            MOVE THIS TO THAT.
            MOVE IT TO THERE.
            ADD APPLES TO ORANGES GIVING GRAPEFRUITS.
            WRITE A-LETTER.

            READ THE-NEWSPAPER
               AT END GO TO HELL.

My program was a big hit with the teacher and the rest of the class. It worked
too. I had so much fun writing COBOL programs like this that I did it for my
next two assignments. By my fourth assignment though, things were getting much
too complex for me to keep track of all the non-mnemonic variable names, so
I had to finally give in and write readable programs like the rest of the class.
Years later, when I began my professional life, I heard the structured programming
mantra "GOTO-less Programming" and learned to write much more structured
and maintainable programs. GO TO always had it’s place though, believe it or
not.

It was a great summer; real heady days for me. I have fond memories of flowcharting
programs at the dining-room table while my brother watched T.V. and my dad read
the newspaper. Three other high-school kids were in that same class, and we
used to race to see who could get to Wendy’s first after class ended, where we’d sit
down for burgers and shakes before going home. I’m probably lucky I didn’t kill
myself on the freeways. I’ve often wondered whatever happened to those three,
whether any of them ever went into the computing field.

COBOL is a great language, and is maligned much more than it should be. I had
fun writing it, and during the early part of my professional career I got to
be quite good at it. Grace
Hopper
(also see this
page
for a photo) was the driving force behind COBOL, and the resulting
language was an excellant fit for the problem space she was targeting. To this
day, I’ve not seen any other language that’s as good at record-oriented processing
as COBOL is. And then there’s true decimal arithmetic. Where’s that in any modern
language? COBOL made programming careers accessible to thousands upon thousands
of us who, were it not for Grace Hopper’s vision, might have ended up doing
something a lot less interesting with our lives.

I don’t hear much about COBOL these days, but recently, to my surprise, I heard about Fujitsu COBOL for .NET. Does COBOL still live on?

Jonathan Gennick

AddThis Social Bookmark Button

Recently I went through a great deal of frustration to install filtering software at the small church school that my
kids attend. Yesterday I encountered an issue so unexpected that, rather than
get frustrated, all I could do was to sit back and laugh. During dinner, my
daughter Jenny presented me with a very strange complaint: CyberPatrol was blocking
her from doing her English assignment, using Microsoft Word no less, on the school
computer. She was trying to use the words "is hitting" in a sentence,
and every time she tried to type those words her letters were converted to dots.

What she told me sounded so bizarre that at first I accused her of inadvertently
switching to one of those dingbat-style fonts. But no, she insisted she was
using the default Times New Roman font. She further insisted it was not just
her computer, nor just her document, but that other kids had similar problems
on other computers and in other documents. This was just too good to pass up,
so later we hopped into the car and drove up to the school. I must confess,
I had no faith in my daughter. I fully expected to sit down at the computer,
open up Word, type in "is hitting", and have everything work as expected.

I was wrong.

I got as far as "Is hi", which you can see in Figure 1.

Before censoring
Figure 1. I begin to type “Is hitting”

So far so good. But look at Figure 2 to see what happened as soon as I pressed
the "t" key.

After censoring
Figure 2. I got as far as the first “t”

This was no good! I have to filter web sites, but I’m under no requirement
to censor what the kids type at the keyboard. I want the kids to be able to
use the computers, not get frustrated by them. After a few minutes
of hunting around, I discovered that CyberPatrol has a feature called ChatGuard
that monitors keystrokes in an attempt to prevent kids from typing profanities
into chat rooms. The feature was on by default, and it had triggered in response
to the "s hit" string of letters in "is hitting". No matter
that there was a space between the two words.

Jenny and I had a good laugh about our discovery, I turned off the ChatGuard
feature on all the computers, and everything is now fine. As I write this however,
I just have to think: "how silly". I don’t know whether to fault CyberPatrol,
but probably I shouldn’t because they may just be implementing a feature their
customers demand. But what are their customers thinking? Does anyone really
believe a feature like ChatGuard will work? That kids won’t find alternative
ways to swear at their friends? It only took me five seconds to come up with
an alternative spelling for the word in question: use all uppercase letters
and substitute the digit "1" for the letter "I". Now I begin
to understand why so many bizarre spellings and abbreviations are used in chatroorms.
Some of them are probably created to avoid the filters.

Funny as I thought the situation was, some thoughts about it trouble me. The
filter encouraged the very behavior it was intended to prevent! The first thing
Jenny did when she had problems was, of course, to tell all her friends. Once
they realized what was going on, that the filter was censoring their keystrokes,
the kids (or at least Jenny) ran down the full list of profanities in order
to test them. Jenny told me during the drive to school just which swear words
she could type in and which she could not. The "is hitting" incident
focused the kids’ full attention on profanity.

Another, more troubling issue, is that of unintended consequences. Clearly,
ChatGuard’s target was the so-called S-word. The unintended effect however,
was to ban any sequence of the letters "S", "H", "I",
and "T". Jenny and I did some testing of this, and it didn’t matter
whether there were spaces between the letters (as in separate words), periods
between the letters, or even carriage-returns between the letters. In every
case, when we typed the forbidden sequence without any intervening letters,
the sequence was deleted and replaced by periods.

Many times mechanisms, whether laws, rules, or filtering software, are put
in place to prevent bad behavior, and many times such mechanisms have unintended
side-effects such as Jenny & friends encountered. My experience has been
that even when a law or rule is shown to have flaws, that it’s next to impossible
to get authorities to correct those flaws. I have no doubt that many school
administrators would have simply told my daughter to reword her sentence to
avoid the forbidden sequence of letters. Worse yet, some might have actually
faulted her for trying to use "is hitting" in the first place.

Rather than fix flawed enforcement mechanisms, sometimes authorities even "protect"
them by banning what would otherwise be perfectly acceptable.

What do we do to kids when we attempt to censor them to such a degree that
we monitor their every keystroke? Will my kids grow up with the proper respect
for authority, or will they become cynical as a result of authorities’ misguided
attempts to monitor their every word? How can you learn decorum when you’re
spending much of your time trying to get around the controls put in place to
force it? By intrusive monitoring and misguided attempts to force good behavior
on our kids, do we force them into the position of using their creative genious
to work around the barriers that we set up? And if they work around us, how
can they respect us? Will we end up engendering the very behavior we set out
to prevent?

Jonathan Gennick

AddThis Social Bookmark Button

Fair warning: this weblog entry has absolutely nothing to do with computers.

I’m doing some minor remodelling in my house, which is a somewhat older house built in the early 1950s. Tonight I’ve been installing furring strips for a new basement-bathroom ceiling, and all that working with wood has resurrected some long-standing questions I’ve had about lumber sizes.

Consider the lowly 2×4, that staple of home construction. The 2×4s I buy today are actually 1 1/2 x 3 1/2. Ok, I understand, and maybe I’m wrong about this, that half an inch in either dimension is lost to the kerf from the saw blade and the subsequent sanding required to get a smooth finish on the board. Frankly, that seems a lot to lose from sawing and sanding, but ok. However, in my house are many old 2×4s, and all of those are 1 3/4 x 3 9/16. Why? Were saw-blades thinner in the old days? At what point did this great transition occur, and why? It’s not just my house, by the way. Consistently I see 2x lumber in older houses that is 1/4-inch thicker than any 2x lumber I can buy today.

My second long-standing question concerns edges. I can go to the homestore and buy all sorts of 1x lumber with squared-off edges. But any 2x lumber that I buy always has rounded edges. Why is that? The rounded edges don’t blend too well with the squared edges on all the 2x lumber in my house. You see, whenever it was that 2x lumber shrunk in size, that must be when it picked up the rounded edges too.

In the grand scheme of things, these are trivial questions, but I’m sure there’s an interesting story behind the answers. And that’s what I want, to find the interesting story.

Do you know why lumber sizes changed, and when? Do you know why the edges of 2x lumber are rounded instead of squared? If you do, please post. I want to know too.

Stephen Andert

AddThis Social Bookmark Button

When growing up, I tried to avoid standing out in a crowd, but since I was a blond-haired, blue-eyed “gringo” in the mountains of South America, that was not likely to happen.
As a result of many years of just trying to blend in and never trying to stand out in a crowd, I gave myself a bit of an introverted mentality.

As I’ve started learning more about Oracle and discovered that there may be one or two people that I could teach something. Maybe I’m overestimating my knowledge, but if I can share something I’ve learned or discovered with even a few others, that’s something I should try to do.

To overcome my fear of public speaking, I joined a local Toastmasters
club. That is a supportive environment to gain confidence and receive the feedback necessary to become a better speaker. I highly recommend spending some time in a Toastmasters club to gain confidence and find ways to become a better speaker and presenter.

Next up was to actually present to a group of technical peers and hopefully share something that is beneficial. I wrote an article on tuning SQL*Loader which O’Reilly published on their web site.

The response I received from the people that read the article was very positive, so I took that to mean the topic was good and there was interest. I submitted an abstract to my local user group, AZORA, was accepted and made my first presentation to a technical group. I can’t say what most of the group thought about it, but at the next meeting a few months later, one of the people told me they were having a great deal of success using the things I presented.

Building on that success, I submitted an abstract for IOUG 2002, but failed to make the cut. I have since made some enhancements to the presentation and am doing some benchmarking to compare some new features in Oracle 9i to make the presentation have a wider and more current appeal. I submitted it again for IOUG 2003 and am waiting for the response.

If I get accepted, it will be another milestone in my journey from introvert to extrovert while maintaining my hard-earned computer nerd status.

Wish me luck or give me advice…

Jonathan Gennick

AddThis Social Bookmark Button

Last week I attended a three-day Hotsos
Clinic
on diagnosing performance problems in Oracle systems. It’s a great
clinic, highly recommended. It stands out as one of the two best database courses
I’ve ever attended (the other was a DEC/Rdb Internals course that my boss at
the time accidentally sent me to in 1992).

The clinic is taught by Cary
Millsap and Jeff Holt
. Cary and Jeff are among the growing number of Oracle
performance specialists who use Oracle level-8 trace data to methodically diagnose
performance problems. Some highlights from their methodology:

  • It’s user-focused. The emphasis is on response-time as perceived by users.

  • It’s business-focused. The emphasis is on maximizing the economic value
    of a system.

  • Oracle level-8 trace data is used to profile poor performing processes,
    enabling you to see exactly how much time is used by the CPU, how much time
    is used for I/O, how much time is spent waiting for various resources, and
    so forth. Using this information, you can focus your tuning efforts where
    they’ll have the most impact.

  • Hard numbers from level-8 trace data allow you to accurately forecast performance
    gains that can be achieved by purchasing faster CPUs, faster disks, etc.
    Knowing what to expect ahead of time means that a business can first determine
    whether a given upgrade will even be helpful, and then decide whether the
    resulting performance benefit will outweigh the cost.

  • There’s a single entry-point. Gone are the days when you needed to depend
    on guesswork and intuition to tune a system. Oracle tuning does not need
    to be a black-art. Apply the methodology, follow the process, and you’ll
    come to the correct conclusion.

Cary and Jeff are very rigorous, and they approach their work in a very scientific
manner. They spent a good part of the first day debunking the cache-hit ratio
and all the other ratios that DBAs have been taught to rely on as performance-tuning
aids (by they way, if you happen to have the Oracle8i
DBA Bible
, which I helped write, please rip out Chapter 20 and throw it
away). They also took time on the first day to emphasize the business aspects
of tuning. We heard the terms net profit, return on investment,
and cash flow repeatedly.

Days two and three found us plunged into the guts of the Hotsos process. We
learned how to generate level-8 trace data, how to read the raw trace files,
and how to use the Hotsos
Profiler
to aggregate the raw trace data and present it in a more useful
form. In addition, we received a mini-lesson in a branch of mathematics known
as queueing theory.
Queueing theory is concerned with situations in which requests come into a system
asking for various units of work to be performed, the requests queue up for
resources, the units of work are eventually performed, and the results are sent
back. Queueing theory can be used to predict the workload that an Oracle system
(any system really) can handle while maintaining a reasonable response time.

I thoroughly enjoyed the Hotsos Clinic, and I’ve probably not done justice
to it in this short review. If you’re an Oracle DBA with responsibility for
resolving performance problems, get yourself to this course. You won’t regret
it. Also register at the Hotsos website and
read the many helpful papers that Cary and Jeff make available. A good paper
to start with is Why
99% Database Buffer Cache Hit Ratio is NOT Ok
(you’ll need to register in
order to read it).