Sunday, April 06, 2003


Opinions About Database Design.

A good database design is crucial to the success of even the most simple application. Bad designs, like bad code, can kill or stunt the growth of a good product.

So then, a few lessons learned while working with databases:

  1. Never use DATETIME or similar database-specific functions unless you want to marry your system to a specific database. Which you don't. Instead, generate the date yourself, in the most robust format you can, and handle that date in your code as you wish. In PHP, you can generate a nice date like this: $niceDate = date("YmdHis");
  2. Always use Unique ID's for every row, even for simple things that don't seem like they need Unique ID's. Without a Unique ID, you cannot effectively tie your table to another table in the database, which you'll probably want to do one day soon. In PHP, you can generate a nice UUID like this: $uniqueID = md5( uniqid(rand(), 1) );
  3. Don't use CAPITALIZE keywords in your SQL statements. Everyone does this, it is standard, but it's 2003 and most database developers can identify a keyword without your help.
  4. Always define primary keys.
  5. Purchase this book.
  6. Make your SQL as pretty and readable as possible. A good SQL statment should be easy to follow, and people should be able to get the gist of what you're doing just by looking at your code, without having to review the data itself. Use lots of spaces (not tabs). Whitespace is your friend. An example:
 create table example ( exampleID varchar(50) not null, firstName varchar(255), lastName varchar(255), timeStamp varchar(50), primary key (exampleID) ) 

So there you go.

By Dan Benjamin hivelogic@hotmail.com. [Hivelogic]
8:20:07 PM    trackback []     Articulate [] 

The Six Project Phases

  1. Enthusiasm
  2. Disillusionment
  3. Panic and hysteria
  4. Searching for the guilty
  5. Punishment of the innocent
  6. Praise and honor for the non-participants 

 [Jonathon Delacour]


8:07:49 PM    trackback []     Articulate [] 

Source: Blogging Roller; 4/6/2003; 3:15:31 PM

SharpReader..

Brad '.Net Guy' Wilson: Oh, and isn't it interesting that the first wave of .NET rich client apps that we've seen have all been blazingly fast and look appropriate for the environment... that definitely has never been true of Java, even today 8 years after release. Microsoft has a real advantage here that they need to leverage, by encouraging people to get away from awful web UIs and get back to rich client/server UIs.

Ouch! Brad is talking about SharpReader, a new .Net based three-paned RSS aggregator. I'm downloading it now. The related posts feature looks really cool.

Update: OK, I'm sold. SharpReader is awesome. It has really leap-frogged Synderella.

Update: it does not seem to detect updated posts like Synderella and Aggie do.

[Blogging Roller]
6:53:22 PM    trackback []     Articulate [] 

Source: Ming the Mechanic; 4/6/2003; 3:15:34 PM

Thinking. Thinking is one subject I'm really interested in. Our ability to think abstractly is one of the key traits that define what a human is. Yet we seem to have little clue how we do it, or how we might do it better. Our future depends, of course, on what choices we arrive at, individually and collectively. And yet, most of us don't have any better strategy than picking the strongest thought that appears in our head, or our stomach, or wherever it appears, and assuming that this is our answer. Without examining where it came from, and without having the faintest clue as to HOW to think.I got to *think* about that again, as I saw a page about Edward de Bono's latest book "Why So Stupid?" which seems to reflect just that dillemma, and apparently provide some answers. From the foreword:

"Maybe we have neglected thinking. Maybe we have taken it for granted. Maybe we have believed, and still believe, that there is nothing more that can be done about thinking. We have an excellent 'thinking system' and nothing more needs to be done.That is where I disagree. We do have an excellent thinking system - but it is inadequate. Our thinking system is all directed at the past. We recognize standard situations and provide standard answers. We have never developed the creative thinking needed to design the way forward. Our thinking is excellent for technology and almost useless in human affairs."
I have several of de Bono's books, which are excellent. And yet I'm a bit suspicious about why somebody needs to write 65 books about essentially the same thing - creativity and thinking. But, whether he could really have said it all in one book, de Bono has some fine tools and insights to offer, and is an undisputed authority in that field. Here's another little tidbit from his website:
"The majority of mistakes in ordinary thinking (outside technical matters) are mistakes in perception. Our traditional emphasis on logic does little for perception. If the perception is inadequate no amount of excellence in logic will make up for that deficiency.Perception is a matter of directing attention. If you are not looking in the right direction it does not matter how clever you are, you will not see what you need to see."
Right on. It doesn't matter if you eloquently and 'logically' can deduct yourself from one point to the next, if you didn't perceive what really is there, or you were looking at only a small part of it, or you were looking at the wrong thing. Most people have a certain innate sense of logic, but if the input is faulty, so is the result. [Ming the Mechanic]
6:47:44 PM    trackback []     Articulate []