<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Rays Development Blog - Error Handling</title>
    <link>http://www.enterprocity.com/blogs/</link>
    <description>A look into the mind of a VB Developer</description>
    <language>en-us</language>
    <copyright>Raymond Cassick</copyright>
    <lastBuildDate>Sat, 11 Oct 2008 05:54:58 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>rcassick@enterprocity.com</managingEditor>
    <webMaster>rcassick@enterprocity.com</webMaster>
    <item>
      <trackback:ping>http://www.enterprocity.com/blogs/Trackback.aspx?guid=38e5e0fd-8ca9-4229-bb15-36b5777b9ecd</trackback:ping>
      <pingback:server>http://www.enterprocity.com/blogs/pingback.aspx</pingback:server>
      <pingback:target>http://www.enterprocity.com/blogs/PermaLink,guid,38e5e0fd-8ca9-4229-bb15-36b5777b9ecd.aspx</pingback:target>
      <dc:creator>Ray Cassick</dc:creator>
      <wfw:comment>http://www.enterprocity.com/blogs/CommentView,guid,38e5e0fd-8ca9-4229-bb15-36b5777b9ecd.aspx</wfw:comment>
      <wfw:commentRss>http://www.enterprocity.com/blogs/SyndicationService.asmx/GetEntryCommentsRss?guid=38e5e0fd-8ca9-4229-bb15-36b5777b9ecd</wfw:commentRss>
      <title>Robustness</title>
      <guid isPermaLink="false">http://www.enterprocity.com/blogs/PermaLink,guid,38e5e0fd-8ca9-4229-bb15-36b5777b9ecd.aspx</guid>
      <link>http://www.enterprocity.com/blogs/2008/10/11/Robustness.aspx</link>
      <pubDate>Sat, 11 Oct 2008 05:54:58 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;Recently,
in one of my many quests for knowledge about the good old NNTP protocol (be on the
lookout for a really cool Usenet news reader to be released by Enterprocity within
the next few months) I was pointed towards something called Postel’s Law, also referred
to as the robustness principal.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;In
a nutshell the law is simple. It states:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="BACKGROUND: white; MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt"&gt;
&lt;i style="mso-bidi-font-style: normal"&gt;&lt;span style="COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font size=3&gt;“Be
conservative in what you do, be liberal in what you accept from others.” – Jon Postel&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font color=#000000 size=3&gt;You can
see it for yourself right &lt;a href="http://www.faqs.org/rfcs/rfc793.html"&gt;here&lt;/a&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;at
the bottom of page 12 in RFC 793 (TCP).&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;Since
I am embarking on my new role as a Senior Software Engineer next week I thought that
me getting pointed to this quotation form &lt;a href="http://en.wikipedia.org/wiki/Jon_Postel"&gt;Jon
Postel&lt;/a&gt; was quite apropos.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;This
is something that I have seen so much of over the last few years as my old role as
a Senior Applications Engineer, both in the products that I supported as well as in
the products that I helped others build. Many times companies can get involved in
a finger pointing match over who owns a bug (us or them, it’s not OUR fault) or if
something is even a bug or not. Many times engineering would point to a message we
got from another component in the users solution (we did VoIP Gateways talking SIP
so in these cases is was &lt;a href="http://en.wikipedia.org/wiki/Session_Initiation_Protocol"&gt;SIP&lt;/a&gt; messages)
and said that the message was malformed in some way, and this was why our stack threw
it on the garbage heap, or leaked memory, or threw an exception, or dropped a call,
or some other undesirable behavior that caused someone to pick up their land line
and call me.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font color=#000000&gt;&lt;font size=3&gt;It
all boiled down to &lt;/font&gt;&lt;a href="http://en.wikipedia.org/wiki/Robustness_Principle"&gt;&lt;font size=3&gt;Postel’s
Law&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt;. &lt;/font&gt;&lt;span style="COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;The
third party SIP stack that we used &lt;span style="FONT-SIZE: 11pt; COLOR: black; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;(no
names here please) &lt;/span&gt;was not very robust at all in its ability to take in things
that were not 100% to the RFC. It was a good stack that did its job and had a good
team behind it but when it came to handling SIP messages, it was very picky to say
the least. One message that&amp;nbsp;was not a complete verbatim to the ABNF used in the
RFC and that message was ‘wrong’ and the behavior was indeterminate.&amp;nbsp;That and
the fact that there are some really nebulous areas in the RFC that did not help, made
it look at times like the product had some serious issues, and in my opinion it did,
from a users perspective. Taking this to another level, many of these malformed messages
were in message headers that our product did not even care about, that just ended
up adding insult to injury there.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&gt;&gt;&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;In
user land, people don’t care about all the stuff behind the scenes; they just want
things that they paid for to work. Add to the fact that other products that may not
have been better in all other respects did not have a problem dealing with these errant
messages, and our product became even more suspect in the eyes of the customers. All
engineers need to understand that a customer’s perception is reality. Even if YOU,
as an engineer, know that the problem is really NOT with your product but with the
other one, or a bug in a third party component that you use in your system, the customer
sees an exception thrown in YOUR product or poor behavior in YOUR product and not
the others; your product is the one with the problem.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;o:p&gt;
&lt;font color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;
&lt;span style="FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;So,
this is just gentle reminder to all engineers out there (myself included) that not
only do you need to validate all input to your systems (a good thing that some of
us may take way too far) but you also need to decide HOW you are going to act when
you detect that bad input. Throwing an exception when you are the upper layer, right
next to a human user, may not be the best (be on the lookout for a posting on the
use of exceptions :) ). 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.enterprocity.com/blogs/aggbug.ashx?id=38e5e0fd-8ca9-4229-bb15-36b5777b9ecd" /&gt;</description>
      <comments>http://www.enterprocity.com/blogs/CommentView,guid,38e5e0fd-8ca9-4229-bb15-36b5777b9ecd.aspx</comments>
      <category>Design</category>
      <category>Error Handling</category>
    </item>
  </channel>
</rss>