We’ll go no more a’ tibbling

Phil Factor, 2010-01-25

I have to admit that I’ve never liked Hungarian notation in database work. I’ve often heard it called ‘tibbling’ in development groups, after the horrible habit of prefixing table names with the lowercase tbl (table without the vowels). So you end up with tables called tblCustomer, tblInvoice, tblSales and so on. The same started happening with indexes (idxName and so on), and stored procedures, so that everything became spThisAndThat. This made conversation about data issues rather difficult as it was never clear how to say the word tblCustomer or tvfMyFunction.

Hungarian Notation was originally developed by Charles Simonyi, who went on to become a chief architect at Microsoft, as a quick fix to the errors that came from programming in BCPL, a very loosely typed language. It caught on so well that it became a part of object-oriented orthodoxy, particularly at Microsoft. In SQL, where it wasn’t necessary, we Database developers managed to stay aloof from the practice of tibbling until we started to get Microsoft Access applications being ‘migrated’ into SQL Server. The developers, who used Hungarian notation for their Visual Basic, naturally had done the same for the database objects and the names were perpetuated when the migration occurred: Because of this, and because a generation of programmers have been brought up with the idea that Hungarian notation is the way to do it, SQL Server is now hopelessly infected with the practice.

Hungarian notation isn’t necessary in any compiler that does strong type-checking. SQL can occasionally produce errors where implicit conversion of data types happens, but these errors are too subtle to be caught by tibbling. Another problem is that, where a column’s datatype is changed, then the name of the column has to be changed. Anyone who has done this, and has fallen foul of dynamic SQL and the problems of finding and renaming all the instances of the column, or other objects, due to the vagueness of the dependency checker, will want to avoid too much of this.

However, my biggest objection to Hungarian notation is that it gives a false sense of security. Even if you are a strict adherent, and use Hungarian notation to tell you the object type, and maybe the datatype, it doesn’t tell you the purpose, or intended use, of the object. No; as the old folk song goes "We’ll go no more a tibbling, though whitsuntide is nigh"

Rate

5 (3)

Share

Share

Rate

5 (3)

Related content

Mini-Me

Will the next version of Windows be a “Mini-Me” version of Vista? Who knows, and it’s too early to tell, but apparently there’s a mini-kernel version of Windows 7, the one after Vista, which fits into 25MB on disk. That’s a touch lower than the 4GB that Vista takes up. Granted it’s not a full […]

Steve Jones

2007-10-25

59 reads

An Hour in Time

Daylight Savings time switches a little later this year. In fact it’s November 4th this year, after having been in October for all of my life. In case you don’t remember which way we move the clocks, here’s a saying: Spring forward, fall back.

5 (1)

Steve Jones

2007-10-17

199 reads