- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Another thing the middleware evidently didn't handle: timeouts for processes that take too long to send a query.
Edit Admin
A much more realistic version of this story would have had Frank retired, died, or moved to Australia while his software lived on. And of course he left no documentation, no source code, no nothing with Sally during his brief out-brief. By now Sally too is long gone and nobody even knows Frank's app is still running on some dusty box under a desk someplace.
Admin
no timeout and crashing instead of killing the oldest connection is crazy even if the limit was like 1000. atp is just a matter of time before a client accidentally dos you
Admin
no timeout and crashing instead of killing the oldest connection is crazy even if the limit was like 1000. atp is just a matter of time before a client accidentally dos you
Admin
A program that runs for over a decade without issues and only crashes because some idiot uses it wrong? Does anybody have Frank's number? I'ld like to hire him.
Edit Admin
You mean Edgar. Frank was the person that took the middleware down.
Admin
Operations on empty data-sets. If will succeed every time. I had a coworker who was challenged to bring down a validator in the test-environment. There were donuts involved. Developers grinned, they had tested against the most gruesome input strings. long, even longer, quotes, punctuation, even switching codepages. My coworker held up his finger, and after a moment of anticipation brought it down on the ENTER key. << crash >> They had sanitised against all the empty garbage one could input. But not against an empty string.
Edit Admin
This is the real reason I read TDWTF . . . to learn what fsckups I might have in my code. Thanks, Frank.
Edit Admin
One connection per thread, and blocking operations? What the ever-living fuck?
Edit Admin
A TDWTF story with a happy ending! What is this sorcery?
Edit Admin
This was old software and written in C. Seems obvious to me that he wrote his own listener. I've been teaching people since the mid 90's to have something like Microsoft Transaction Server (before the web days), IIS, Httpd, Node.js, or some other professionally-supported platform host your stuff. Edgar may have been competent, but he wasn't aware of the norms of the world he lived in and didn't use the tools available to him. Sounds like he needed a mentor or some training.
Edit Admin
So?!? Regardless of when you're writing this, nor of which language you're using, one thread per connection (and one connection per thread...) using blocking sockets has always been (and always will be) a disaster ready to happen. Properly structured code with non-blocking sockets (thread pool optional, and necessary only for handling more volume of simultaneous requests) really isn't hard, except for a few fiddly details about timers, especially about what happens if you cancel one when it's ready to tell you it has expired. Hint: the fine(1) folks who built
boost::asio
got those details almost as totally wrong as is conceivable.Indeed, and I'll admit to having had a very good mentor when I was learning about this stuff.
(1) As usual, if I use this adjective when talking about people, it's hiding a fairly profound, and definitely unprintable, insult.