Re: What databases have taught me

From: topmind <topmind_at_technologist.com>
Date: 9 Jul 2006 22:28:46 -0700
Message-ID: <1152509326.828202.218370_at_75g2000cwc.googlegroups.com>


Robert Martin wrote:
> On 2006-07-08 15:18:17 -0500, "topmind" <topmind_at_technologist.com> said:
>
> > After thousands of debates and failed attempts to find objective
> > metrics beyond execution speed and matching stated external
> > requirements, I am leaning toward the "art" viewpoint. One man's
> > spehgetti code is another man's masterpeice. Just because I find it a
> > flaming tangled mess does not mean the next guy will.
>
> While it is certainly true that beauty is subjective, it is astounding
> how much agreement there is over things that are "beautiful". Good
> software is beautiful, and good programmers pursue beauty.
>
> Yes, it's true that sometimes two people will disagree about beauty.
> But there is a difference between debating whether something is
> beautiful, and debating about whether something is a mess.
>
> Most of us can recognize a mess when we see it.

A mess to *you*. I've seen code that was horrid to me, but somebody else chomped right through it. OO Visitor is quite ugly and tangled to me, but some swear by the damned thing.

> Inconsistent variable
> and function names, misplaced responsibilities. Functions that have
> more than one responsibility and that share responsibilities with other
> functions, etc, etc. And most of us can recognize nicely partitioned
> code with carefully thought through names, and modules of approachable
> size.

I have seen giant debates about things like function/method size. Both sides made fairly good arguments, but in the end, it was about fitting one's own brain, not about any objective math that could stand universal scrutiny as the One True Way.

I remember long, detailed, and tedious holy wars on things such as semi-colons. I didn't know it was possible to write and think so much about semi-colons. In the end, I decided that it was a personal pychological choice. People see differently, people get confused and tripped up over different things, etc. I cannot and should not tell you what makes your brain happy and comfortable. At best I can only explain why I like something.

A good software engineer should at least be able to offer a justification of why they did things a certain way, even if you disagree with them. A good software engineer knows about the different possibilities and gives each path decent thought. However, in the end it is still mostly a personal choice.

If you see bad variable naming, for example, it could be because no thought was given to the names, or that you simply don't understand the reasons for the choice. You cannot tell which it is without quizzing the author.

One of the reason I like to see as much as possible "tablized" is that such allows me to query and filter and sort it so that it is how *I* want to see it, not how Bill Gates or Robert Martin likes it. Relational is the closest I see to delivering Frank Sanatra software engineering:

   I SEE IT *MY* WAY.... ("did it my way" is asking too much, so "see" is the compromise.)

Code is too static or inconsistent to pull this off. There are code browsers, but they are essentially navigational structure browsers, and nav simply cannot compete with relational in my book for such uses. Dr. Codd realized this 40 years ago.

-T-

> --
> Robert C. Martin (Uncle Bob) | email: unclebob_at_objectmentor.com
Received on Mon Jul 10 2006 - 07:28:46 CEST

Original text of this message