Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Parallel

A Slice of Tongue


Mar04: The New Adventures of Verity Stob

Verity is the pseudonym of a programmer based in the UK. She can be contacted at [email protected].


"In 50 years, perhaps much less, the ability to read and write [computer] code will be as essential for professionals of every stripe as the ability to read and write a human language is today," claimed Dylan "inspiration for The Matrix" Evans in The Guardian. Oh yeah?

Sir Lancelot Spratt swept into the surgical ward, a magnificent and majestic cruise liner with a fleet of lesser vessels in his wake: the registrar, an SHO, an anesthetist complete with a Daily Telegraph folded to present the half-completed cryptic crossword, Sister and her double escort of a staff nurse, and the nursing assistant (whose sole task was to carry Sir Lancelot's PDA), and last, and also very much least, the group of medical students that included me. I bobbed timidly at the rear of the group, hoping to achieve invisibility by association. "Do keep up, Mr. Gordon," said Sister, undermining my attempt to hide.

There was an empty bed by the door. Sir Lancelot pointed to it. "What happened there? Man. Operated Monday. Gall bladder."

Unfazed by this vague description, Sister consulted her clipboard. "Died last night, Sir Lancelot."

"Dead?" said Sir Lancelot in a tone of incredulity, as though death were an unknown occurrence in a hospital. "Dead? Damn it, are you sure, Sister?"

Sister didn't much like having her word questioned. "Quite sure, Sir Lancelot."

"I wasn't impugning your accuracy, Sister. It's just that made a particularly neat job. I remember saying to you, 'Fred, I've done a particularly neat job there.'"

The anesthetist, scorning to join the rest of the crowd grouped around the Chief, was leaning on a corner of the nurses' station, his eyes focused on the middle distance in search of 17 Down's particularly elusive anagram. He made a grunting noise that might have been an affirmative. There was an awkward silence.

"We could look it up in the system," suggested the SHO, craftily setting up a situation where she, at least, could relax.

"Good idea, Marianne. You there. Mr. Grimsdyke. At the back. Bring up the patient's details on my PDA."

"My name's not 'Grimsdyke,' it's 'Gordon,' sir," I said stupidly.

"Who cares what your name is? Plug it in here, so we can all watch."

With sinking heart, I took the PDA from its bearer and plugged it in to the ward's big display screen, enabling everybody to track my keyboard clumsiness one keystroke at a time. I managed to log in and fire up the search application, but before I could get anywhere, I heard the words I dreaded the most.

"No, no, no, no. We'll have none of your wafty, GUI interfaces in this ward, thank you. Do it properly, man. Do it in SQL."

Regretting very much the hours I hadn't spent with the classic textbooks of Joe Celko—time I had instead idly frittered away with Gray's Anatomy and back numbers of The Lancet—I found and started the SQL client and nervously managed to type on the teeny keys of the PDA:

SELECT * FROM VASC_PATIENTS WHERE LNAME =

"Um, what was the name of the patient, Sir Lancelot?"

"Name? Something like Mainwaring or Higson or Simmonds I should think. How the blazes would I know?"

I froze, struggling to frame a WHERE clause string that would encapsulate this bewildering range of monikers. Even with liberal use of LIKE and the % wildcard, it was quite beyond me. Fortunately, Sister took pity on me and consulted her clipboard again. "The cholecystectomy patient was 'William Clark,' without an 'e.'"

"Just as I said," said Sir Lancelot complacently. I altered the SQL

WHERE LNAME="Clark" AND FNAME="William"

and was just about to hit the Enter key, when...

"Take you filthy hands off my machine!" thundered Sir Lancelot. I complied with more speed than dignity. "Can anybody tell me what he's doing wrong?"

"Doesn't he need a JOIN?" A fellow student took advantage of my confusion to score brownie points. Sandra Lomas had no difficult at all with SQL, and was a genius with imperative languages like Java, too. She would definitely go far. There was already talk of her being surgeon material.

"That's correct, Miss Lomas. The VASC_PATIENTS table contains nothing of interest to us. Of course he needs a join to the OP_OBSERVATIONS table. That's where we'll find if Mr. Clark's SATS dropped below 50 per centum. And what sort of join?" He swung back to me.

"Um..." In my panic, there suddenly seemed to be dozens of different types of joins in SQL: inner and outer and left and right and full. Nothing for it but to guess. "Is it a CROSS JOIN?"

Sir Lancelot looked as if he were going to burst his bow tie. "'Is it a CROSS JOIN?' he says! I have never heard anything like it in my life. No, it is bloody well not a CROSS JOIN. The only time, boy, that you will ever need a CROSS JOIN is when you self-join the list of teams while preparing the fixtures list for the rugby club." He got a sycophantic laugh. "Can you help us, Miss Lomas?"

"An inner join with an additional restriction in the WHERE clause to limit the observations to the last two days?"

"Quite right, Miss Lomas. Perhaps you had better take over at the keyboard. Boy, while she does that, can I have a word in your shell-like." He beckoned me away from the group, into the corridor by the sluicing room, and addressed me in a faux whisper that could easily be heard in geriatrics:

"Are you sure medicine is the right career for you, boy? You don't really seem to have the aptitude..."

DDJ


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.