Use the Database

 
Research scientists

It seems like a shame to have to even talk about this, but I really have found myself having way too many discussions over the years about how to avoid the use of relational databases.

Today we were talking about replacing database reads and writes in a system design with file system access, XML, just floating the data around in memory, or some combination of the above.

“What time of day will this system be running?” the DBA asked.

“During business hours.”

That’s right! We’re actually planning to do a database write in the middle of the workday!

Why the thought of doing this freaks people out to the degree that it does is something I’ve never been able to figure out, but there’s an idea that persists among the less educated that read-only production access during the business day will max out an RDBMS.

Look . . . a relational database is one of the greatest tools you have as a software developer, for this reason: Relational database technology has been around since the 1970s, and, unlike a lot of other technologies, has not really changed much in all that time.

So what have all the smart database people at IBM, Oracle and Microsoft been doing during the ensuing decades? Sitting idly about?

No, indeed! They’ve been using the time to optimize the technology!

As a result, modern relational database management systems are highly efficient software systems. With few exceptions — and I can’t think of one offhand — any operation that you perform inside the RDBMS will be more efficient, more reliable and more scalable than writing your own code to do it outside the RDBMS.

Is it possible that your home-grown data management algorithm will be better then the combined efforts of thousands of Ph.D.s over the last 25 years?

Yes. Is it probable? No.

Thus spoke The Programmer.

Learned Helplessness

 
Dog

Psychologists have found that if you put a dog in a cage and repeatedly zap him with an electrical shock, the dog will soon stop trying to avoid the shock because he realizes he’s got nowhere to go.

This is called “learned helplessness.”

I mention this for educational purposes, not because it sounds like life in a nutshell . . .

Christmas at the Office

 
Santa Claus

I’m in receipt of the following “Secret Santa” email:

Please come by my desk to pick a name. Then go buy (and wrap) a new toy that represents that person. Humor is the key here! Get creative and have fun! We’ll open the toys, have a laugh with each recipient, and then donate the toys to charity.

Translation: Buy something that confirms the recipient’s worst suspicions about what people really think of him (or her), and then we’ll all go home and hang ourselves.

Clarence Thomas, Judicial Nincompoop

 

Clarence Thomas is back in the news . . .

During a recent Meet the Press appearance, Harry Reid, the Senate minority leader, questioned Thomas’ competence as a Supreme Court justice and was subsequently accused of racism, which is pretty much guaranteed to happen if you say anything critical of a black man, woman or child.

Read more

Pilot Season

 

Ignore the rumors. L.A. does have four seasons: earthquake season, fire season, riot season, and the most ravaging — pilot season. Network TV keeps groping to win over an America it despises — a viewing public it sees as a blurry, fat, brainless blob of uninsured, Hemi-powered, God-fearing Wal-Mart clerks.

Two Simple Rules

 
More software projects have gone awry for lack of calendar time than for all other causes combined.
— Fred Brooks, The Mythical Man-Month

As a corollary to this, I’d say that lack of calendar time very often forces us to admit that our projects have gone awry.

Small Texas store in 1939

Denial is a viable strategy when delivery dates are far in the future, but when the deadline is staring you right in the teeth, the time for sunny optimism is over and the time for the Day of Reckoning (DoR) meeting is at hand.

I attended one such DoR meeting yesterday afternoon . . .

This particular meeting broke down into a battle between the Designers and the Implementers. The Designers — who happen to be the more senior members of the team — felt that they had written the specs in such excruciating detail that the system should pretty much have coded itself from that point on, despite the relative inexperience of the Implementers.

The fact that this didn’t happen was frustrating to both factions. The Designers think the Implementers are incompetent; the Implementers think the Designers are arrogant.

Let me say here that if my life depended on delivering a project successfully, I would want to follow at least two simple rules, namely:

  1. Keep it simple.
  2. Deliver early and often.

At every DoR meeting I’ve ever been to — and I’ve been to quite a few over the years — one or both of these rules has been violated.

Yesterday was no exception.

Judge hitting man with gavel

Rule One violated

The company I’m working with is a believer in big upfront designs. On this project, the Designers were allowed to generate hundreds of pages of design docs, models, diagrams — then hand it off to the Implementers to implement.

The design is way beyond the ability of human beings to comprehend in its entirety. You’d have to be some kind of savant to keep that much information in your head and feel a sense of mastery of it. Software development is a technical process, but it’s also a people process, and you have to work within the limits of human comprehension.

Rule Two violated

You can’t really assess the efficacy of a design until you try to implement it — except to say that it’s almost certainly wrong in some respects — for the following reason:

If you were assigned to model an existing system of moderate complexity in perfect detail — well, I don’t know you, but I feel safe in saying that you probably couldn’t do it.

You’d get some things wrong, you’d leave some things out . . .

Now if you were assigned to model a system that hasn’t been built yet in perfect detail, just working from a set of requirements — well, that is an impossible task.

And even if you could do it, you’d find that in the course of building the system, forces beyond your control would inevitably lead to requirements changes, thus invalidating your model.

Bubbles and Lines

Bubbles and lines don’t crash.
— Bertrand Meyer
Car crashing into delivery truck

Nothing ever breaks during the design process. Bubbles and lines don’t crash — code crashes!

So if you defer the writing of code until the big upfront design is done, you wind up learning things late that you would have been much better off learning early, when you still had time to do something about them.

Again, if my life depended on a successful project delivery, I’d start with early delivery of a working system that did almost nothing, but had the basic infrastructure in place — the essential hardware, software and network connections — then start adding to it, one piece at a time.

Summary

  1. Keep it simple.
  2. Deliver early and often.

Thus spoke The Programmer.

The Potential for Fidelity

 
Broken heart

My wife is apparently a prime candidate for an extramarital affair, according to this article.

She denies it, of course:

“I have time for an affair?! I don’t even have time for lunch!

Actually, I wasn’t reading the article to assess her potential for fidelity, which I already suspected was very low. I was looking for tips on how to hook up with some desperate housewives when she finally runs off with another man . . .

The Meaning of Golf

 

But what do I get from existence? If it is full I have only distress, if empty only boredom. How can you offer me so poor a reward for so much labor . . .

— Arthur Schopenhauer
Golfer

Another weekend approaches, bringing leisure hours that we don’t know what to do with. As the busy work week winds to a close, we have a couple of days in which to ponder the emptiness of our lives.

How dreary! How much more pleasant if we could fill up the time with other activities.

Hence: Golf!

Intoxication is another option. Or both at the same time!

Ancient History as Told by a 6th Grader Who Watches Too Much SportsCenter

 

Hammerin’ Hank Hammurabi here, bringing you today’s Peloponnesian League matchup between the Akkadians and the Assyrians. Sargon the Great gives the Assyrians some much-needed leadership . . .