Archive for October 2008

The Difference Between Null, Empty And Zero-Length Data / Strings

A common problem faced by new programmers is understanding the difference between null, empty and zero-length variables, especially when working with database records.

While, for most intents and purposes, the three things have the same effect — either you have some data you can work with, or you don’t — they arise from different circumstances. Understanding how null, empty and zero-length are different can help you avoid data errors in your programs.

The short version is this: If a variable simply doesn’t exist — usually because it hasn’t been declared, but sometimes because it hasn’t been assigned a value — it’s null. If the variable exists but contains no data, it’s empty. And if a structured data variable, such as an array, exists but doesn’t contain any items, it’s zero-length.

An analogy is in order.

Think of a database as a house. A house has rooms, and in each of these rooms are furniture and accessories that are appropriate to that room.

For example, the kitchen has a stove, refrigerator and sink. The bedroom has a dresser, bed and armoire. The living room has a couch, television and coffee table.

Continue reading ‘The Difference Between Null, Empty And Zero-Length Data / Strings’ »

Thoughts On NFL Week 4, 2008

Why Al Davis Is A Bad Owner

The firing of Lane Kiffin as head coach of the Oakland Raiders is hardly unexpected. But I really didn’t expect Al Davis, the owner, to hold that press conference, following the firing, to assassinate Kiffin’s character publicly.

A lot of people have criticisms of Davis, many of them valid; e.g., he’s running his franchise into the ground, he’s out of touch with the modern game, he’s old and ugly. Some claim Davis is unbalanced, but his press conference certainly should have dispelled that notion.

Davis is entirely lucid. Which makes what he did during that press conference all the worse. No matter how much you hate an employee, you don’t throw him under the bus. You sever ties and that’s it. Any time you say something negative about an employee or business partner in public, you’re making yourself look bad, not the other guy.

Continue reading ‘Thoughts On NFL Week 4, 2008’ »

I Almost Forgot That I Adore PJ Harvey

Having spent so much time recently listening to Jeff Buckley’s Live At Sin-é Legacy Edition double-album, I’ve been ignoring my other musical interests.

But, oh, YouTube, how I adore your Related Videos iframe. For you brought me back to one of my first alt-rock loves, PJ Harvey.

Greatest. Music. Video. Ever. Damned if I can figure it out, but she’s the most beautiful ugly girl I’ve ever seen. And she pwns every song.

Recommended Steps In A Web Development Career

Asked recently on Yahoo! Answers:

What sequence should i follow to learn Web Development?
Hi there,
I knew by going through various answers in yahoo that to learn web developing as a totally new person,one should learn basic web designing [dreamweaver & html]. And after that, one should move forward to Web Developing.
But in Web Developing, there are lots of programming languages. I can start from C but what after that and then what and then what ?
And how important it is to follow sequence to become good web developer?
I am really expecting good answers in detail and I thank to all in advance for their valuable time and valuable advices.
Thanx again. :)

I wouldn’t go about getting into the game the way I did.

When I started back in 1996, it was largely by accident. I had been playing with HTML but really wasn’t interested in a programming career; I was happy with newspaper reporting. But my sister, who was working with an ad agency at the time, couldn’t get any service out of the one Web design firm that was available to her — coincidentally, the newspaper group for which I worked.

So, she asked if I could do a site. And that became more sites, then became a regular gig that I did on the side, until I had so much work that I had to decide between the two jobs.

I had no formal training. Everything I learned I picked up on the fly because the client needed it. There was no rhyme to it. Mostly, if I didn’t know how to do something, I looked around on the Web until I could find something close to what I needed, and figured out how to get it to work for me.

Perl, PHP, SQL, ASP — every bit of it I picked up in a hurry. And I believe it stunted my learning because I never looked at programming as a process, as a natural flow from one concept to another; I looked at it as an end, not a means.

So it’s good to find someone who wants a more orderly path. If I had to do it all over again the path I would follow would be something like this:

Continue reading ‘Recommended Steps In A Web Development Career’ »