You are hereHome / Development / You have been warned

You have been warned


By Gerd Riesselmann - Posted on 09 September 2005

If it comes to evaluating software, I follow a rough rule: If I can't get it to work within one hour - forget about it. Today another software failed the test: Props, a newspaper CMS.

While the installation itself went seamlessly (OK, it's just copy files and edit a config file), right after the start, the page was flooded with "notices" like "Undefined index: xxx". For those who don't know PHP, which is the language Props is written in, has several levels of error reporting, including notice messages. As the php manual states:

Note: Enabling E_NOTICE during development has some benefits. For debugging purposes: NOTICE messages will warn you about possible bugs in your code. For example, use of unassigned values is warned. It is extremely useful to find typos and to save time for debugging. NOTICE messages will warn you about bad style. For example, $arr[item] is better to be written as $arr['item'] since PHP tries to treat "item" as constant. If it is not a constant, PHP assumes it is a string index for the array.

This clearly makes sense, and I of course have notice messages enabled on my machine. And to be honest: I cannot understand why the Props developers don't do the same. This just smells bad.

However, the Props developers are in good companionship. Did you ever try to compile an average Microsoft C++ project with warning level 4 enabled? Mircosoft recommends:

For a new project, it may be best to use /W4 in all compilations. This will ensure the fewest possible hard-to-find code defects.

Too bad doing this brings up trillions of warnings raised from within the visual c++ include files themselves, mostly the STL implementation actually. Turning on warning level 4 therefore becomes just plain silly.

To finish the story: Finally it weren't the notices that stoped me testing Props - these are annoying but can be switched off quite easily. No, it was much more simple: Logged in as administrator, the system didn't allow me to access the admin pages. Dooh!

Topics