You are here
Home > Programming > Life in the key of C# (Part 3)

Life in the key of C# (Part 3)

Fallback Image

Trust but Verify

This was the almost signature phrase adopted by Ronald Reagan.  At the signing of the INF Treaty he used it again and his counterpart Mikhail Gorbachev responded: “You repeat that at every meeting,” to which Reagan answered “I like it.” Well in my mind, Ronald (who by the way, would have been 100 years old on the 6th of February 2011) had a point going there. How can we as developers adopt that mantra to our work?

A couple of months ago, I worked on an Interface that communicated XML files between two disparate systems. The developers on the other side assured us of the file layout that they could receive. Turns out that if a Tag was not in the right place, their system would ignore the file and just “lose” it. With that, I mean the file would be thrown into the cyberspace equivalent of a black hole from which no binary bit can ever escape. Luckily we decided to audit the actual XML sent to them, which allowed us to resend the file if needed.

This requirement was not actually in the spec, but then again, the other “team” didn’t stick with what the specification stipulated anyway. There is a saying “Walking on water and sticking with a specification is easy if both are frozen”. Well, I can tell you, those folks kept on changing it to suit them. What this all boils down to in the end, is don’t ever assume. Like Bruce Willis said in one of his movies…. “Assumption is the mother of all…… ahem….. mistakes”.

A good rule of thumb (well for me anyway) is to develop for the worst case scenario. I always ask myself “What if…”. What if the system we are sending this file to loses it. What if only one of the two database transactions succeed? What if the end user does this or that. Is the application user friendly? How easy will what I am coding here be to maintain if another developer had to maintain it? I know that some companies enforce certain standards, but I believe that as a developer, you need to have a few of your own. If you see an area of the development process that might be risky, take it upon yourself to moderate that risk. You will reap the rewards in the long run.

Reference Flickr

Dirk Strauss
Dirk is a Software Developer and Microsoft MVP from South Africa. He loves all things Technology and is slightly addicted to Twitter and Jimi Hendrix. Apart from writing code, he also enjoys writing human readable articles. "I love sharing knowledge and connecting with people from around the world. It's the diversity that makes life so beautiful." Dirk feels very strongly that pizza is simply not complete without Tabasco, that you can never have too much garlic, and that cooking the perfect steak is an art he has yet to master.

Similar Articles

Top