Why it’s dangerous to output debug messages within web interfaces

Because you risk forgetting about them and shipping them in your production code. Latest example I just saw: look at the status bar at Barclaycard Merchant Services. You’ll see messages about their menu tree, ending on a triumphant "4 Hierarchical Menu Trees Created". Well, congratulations, you eventually managed to make it work (if there’s a status message here, you can bet it’s been added because it didn’t work properly during dev or tests), but I don’t care that much as a user. Sometimes you can even see "don’t forget to remove" notes in the source code that went, well, forgotten.
Hopefully, Internet development environments are becoming better at providing integrated debugging tools. For those (still) coding with a text editor, I’d try to either find a project management policy that make sure these notices are actually removed before the site goes live, or I’d use something that’s so obvious (big red fonts, pop-up), that nobody is likely to let it slip (but it’s still dangerous to do on less used/tested sections of a site.) Or maybe a variable used to trigger debugging code if set to its "testing" value.

Leave a Reply

Your email address will not be published. Required fields are marked *