Readit News logoReadit News
the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
talkingtab · a year ago
This reminds me of an experience debugging a network protocol implementation - specifically AppleTalk NBP for other ancient people. I had coded everything but my packets were rejected (aka silently dropped) when real (aka Apple implementation) packets were not. I had a copy of the good and bad packets on the screen of my computer and had gone over them byte by byte to find the problem. And there was none. From start to finish they were exactly the same, with correct check sums etc. It was time to go home and I decided just to print the stupid things to look at later.

As soon as I printed them, the error was clear. My version ran to two pages and the good implementation one page. I had not been careful to clear the buffer before sending the data (mbufs don't you know).

This still cracks me up.

the_real_tjaart · a year ago
Thanks for sharing!
the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
rrr_oh_man · a year ago
I found it quite mild compared to the 500 mile email

https://www.ibiblio.org/harris/500milemail.html

the_real_tjaart · a year ago
Thanks for sharing!
the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
davidmurdoch · a year ago
Loved reading this. This is now one of my new favorite bug hunt stories!
the_real_tjaart · a year ago
I am glad you enjoyed it.
the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
bufordtwain · a year ago
What about the missing comma at the end of the first line? :)
the_real_tjaart · a year ago
Whoops, :)
the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
kazinator · a year ago
But the line "We are happy to welcome you to our family." is not anywhere near the line limit. There is something else going on here, like perhaps the whole thing actually being an HTML MIME attachment, perhaps? IN which it is like

  ... lots of text ... <br>We are happy to welcome you to our family.<br>
or whatever. But if you blindly split HTML into lines, it will break tags.

the_real_tjaart · a year ago
This was just an example, sorry for not providing a real example that had the exact character count.
the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
carimura · a year ago
Good story. Reading this reminds me of all the "curious cases of....." that I've solved (or in some cases not solved) over my career and how that feeling of triumph is so deeply tied to why I got into computers in the first place. The pure joy of unraveling the mysteries of engineering... like forgetting a semi-colon somewhere in a 50k LOC Perl backend.
the_real_tjaart · a year ago
> how that feeling of triumph is so deeply tied to why I got into computers in the first place

I share your sentiment, thank you for reading.

the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
teddyh · a year ago
I see two huge bad habits here. The first is the obvious one, as pointed out by many commenters here: Don’t implement standards haphazardly, if you even should do so yourself. Either give the implementations the necessary care and attention, or use a pre-made library.

But the other thing is: Don’t vendor your dependencies. Those libraries you use need to be updated regularly and timely, and absolutely not “only as necessary”. If updates lag behind or are avoided entirely, bugs like this can be huge problems even when the upstream code has been fixed, for people who thought that they should update only when they, themselves, see a problem or need.

the_real_tjaart · a year ago
> Don’t implement standards haphazardly, if you even should do so yourself. Either give the implementations the necessary care and attention, or use a pre-made library.

I agree 100%.

the_real_tjaart commented on The curious case of the missing period   tjaart.substack.com/p/the... · Posted by u/the_real_tjaart
evmar · a year ago
> A portion of this code implemented a SMTP client.

If I wanted to root cause this, the real problem is right there. Implementing protocols correctly is hard and bugs like in the post are common. A properly implemented SMTP client library, like one you would pull off the shelf, would accept text and encode it properly per the SMTP protocol, regardless of where the periods were in the input. The templating layer shouldn't be worrying about SMTP.

the_real_tjaart · a year ago
I agree 100%.

u/the_real_tjaart

KarmaCake day226March 16, 2023View Original