Skip to content

On Magic Values

Magic values are data values with a special meaning. For example, you might store store someone’s age as -1 if you don’t know what it is. Magic values are commonly considered to be a programming error, because you may encounter a business requirement which conflicts with your choice of "magic value."

Here’s a perfect example:

Jim Cara wanted a vanity license tag that would make people laugh. But when he chose "NOTAG" for the plate on his Suzuki Hayabusa, a sleek blue and silver motorcycle with a speedometer that reaches 220 mph, the joke backfired.

The new tag arrived Saturday under an avalanche of Wilmington parking violations.

"All the traffic tickets say, ‘Notice of violation. License number: no tag,’ " Cara said.

City computers, talking to state Division of Motor Vehicles computers, had finally found an address for ticketed vehicles that lacked license tags: Cara’s home in Elsmere.

"I messed up the system so bad," Cara said. "I wonder if they can put me in jail or something?"

He has received more than 200 violation notices. The mail carrier came twice on Saturday. Cara opened a few. They ranged from $55 to $125 for violations such as meter expirations.

Wilmington appeared to be the only jurisdiction with the no-tag computer glitch, said Kelly Pitts, spokeswoman for the state Transportation Department, which oversees the motor vehicle division.

So one of two things happened here:

  1. A programmer picked a legal license plate as a magic value, or
  2. The users of the software picked a legal license plate as a magic value and blamed the software for their choice.

Either way, it’s the same error.

Post a Comment

Your email is never published nor shared. Required fields are marked *

Bad Behavior has blocked 1846 access attempts in the last 7 days.

Close