In my life I’m no different to any other developer. I make mistakes from time to time, and others around me make them too. As a result, I occasionally get allocated some bugs to fix, either ones I’ve just managed to make myself, or long standing ones which have just been found. Bugs are annoying for all concerned, I’m sure we can all agree on that. They are annoying for the person who discovers them because it means the system can’t do what they wanted or expected it to. They are annoying for anyone on a support desk, as it means they have to work through it and determine if it’s intended to work that way, or if it is doing something stupid. And it’s annoying for the developer, because there’s usually a ton of other things to do besides fixing issues. After all, our code is always perfect, so why can’t every other developer’s code be perfect?
I’ve been working a lot recently with data import and exports between systems. Obviously different systems have a variety of ways they can export data, and some even have multiple ways of importing data, but none of them seem to have a standard type for the file data. In recent weeks I have worked with:
Files where fields are delimited with a #
Files where fields are delimited with a ^
Files where fields are delimited with a , (typical CSV files)
Files where everything is nicely structured XML
The need for standards compliant HTML is documented all over the internet with the primary reason of speed and cross browser compatibility. There are, after all, reasons the standards have been created. The idea behind them is that you can take the code which is fully standards compliant and run it in any browser and it will look the same. Okay we all know that that’s not actually the case, and different browser engines render things slightly differently. It’s one of the main reasons why the web development community hates Internet Explorer; it seems to have its own way of doing things which is different to everyone else.
Bitching about IE aside, I came across another reason to have standards compliant code this week, and a problem I have seen previously, forgotten about and had to research again, so I am here to share the wisdom I have recently rediscovered, and also have it somewhere I can easily find it again.