Geekin' It Real

More than just a living, coding is a lifestyle.

Null expectations in computer science

I've been dealing with VB 6 a lot lately -- too much, in fact -- and I'm getting really sick of it.  Among other things, I keep dealing with stupidity as evidenced by the following comment I found in code:

"VB doesn't like Nulls"

When I finally heard someone say "VB doesn't handle Nulls well", I had to correct him.  This mentality seems to propagate in a companies like The Talent Pitâ„¢ where bad code leads to more bad code and misunderstandings becomes accepted as fact.

It's not that VB doesn't handle Nulls well.  Most VB programmers don't know VB and its type system well enough to know how to write correct code to handle them.  The Null value in VB 6 is also its own type.  VB handles the Null type according to very specific rules and understanding those rules is the key to being able to write the code to handle it.  Among those rules is that Null cannot be converted to any type, neither implicitly nor explicitly, and that's where people tend to throw in the towel and blame VB instead of learning about it.

Knowing how this stuff works is one of the things that distinguishes programmers from script kiddies.  While what we do may seem like art or even magic, it is at its core still a science...  Computer Science.

It's hard to believe that I defended VB but it was only to chastise so-called "programmers" who are too lazy to learn even the simplest of concepts, people who go to great lengths to stay stupid.

Published 31-07-2006 02:54 by bbenson
Filed Under:

Comments

No Comments
Anonymous comments are disabled
SkinName:iroha_Blog2
Powered by Community Server, by Telligent Systems