<?xml version="1.0" encoding="utf-8" standalone="no"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0"><channel><title>The Daily WTF</title><link>http://thedailywtf.com/</link><description>Curious Perversions in Information Technology</description><lastBuildDate>Sat, 24 Oct 2026 11:28:41 GMT</lastBuildDate><item><dc:creator>Lyle Seaman</dc:creator><title>Error'd: It's About Time</title><link>https://thedailywtf.com/articles/it-s-about-time</link><category>Error'd</category><pubDate>Fri, 23 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/it-s-about-time</guid><description>&lt;p&gt;Usually I have to save up a few weeks&amp;#39; worth of error&amp;#39;ds to get five of a kind, but this week we got a rash of funky date entries!  I guess we were due.&lt;/p&gt;

&lt;p&gt;First up
&lt;strong&gt;Tim R.&lt;/strong&gt; reminding us here that &amp;#34;Dates are difficult!
...but when the
entire purpose of your web site is to convert the
time to different time zones, I&amp;#39;m not inclined to give
you much slack for being one hour out.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#1371abe9676f46debf688bd7e7a51928"&gt;&lt;img itemprop="image" border="0" alt="1371abe9676f46debf688bd7e7a51928" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/22/1371abe9676f46debf688bd7e7a51928.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;And an anonymous reader who just doesn&amp;#39;t trust big tech.
&amp;#34;In my calendar I have a monthly reminder to clear
my data MS data manually. Now you know why, although
I don&amp;#39;t expect this will come as a surprise to
anyone.&amp;#34; Note the date on the lower right of the screenshot.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#581cebc83c5a49669bd71ee42aa7951d"&gt;&lt;img itemprop="image" border="0" alt="581cebc83c5a49669bd71ee42aa7951d" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/22/581cebc83c5a49669bd71ee42aa7951d.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&amp;#34;June has 30 days, so 31 was not accepted,&amp;#34; repeats 
&lt;strong&gt;Daniel D.&lt;/strong&gt; incredulously.
&amp;#34;I needed to calculate day difference between two dates. So
I entered June 30 (as shown) only to get this
error message. Now - should I trust that calculator to
calculate date differences, what you say?&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#8ff882cd2a8d4e1cb7e324865a0ee168"&gt;&lt;img itemprop="image" border="0" alt="8ff882cd2a8d4e1cb7e324865a0ee168" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/22/8ff882cd2a8d4e1cb7e324865a0ee168.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;
&lt;strong&gt;Daniel D.&lt;/strong&gt; went on to share with us a couple of images from 
&amp;#34;A well-known e-commerce website in Central Europe that allows you to
filter by battery life! Only it randomly switches
to seconds.&amp;#34; Yes, randomly. See the second image too.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#868c6bd8600c455bb651cc31ad15c221"&gt;&lt;img itemprop="image" border="0" alt="868c6bd8600c455bb651cc31ad15c221" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/22/868c6bd8600c455bb651cc31ad15c221.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; 
&lt;/p&gt;&lt;p&gt;&lt;a href="#b98573628e504e25aa2702abc7c99bb7"&gt;&lt;img itemprop="image" border="0" alt="b98573628e504e25aa2702abc7c99bb7" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/22/b98573628e504e25aa2702abc7c99bb7.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;And finally this week, 
&lt;strong&gt;Marc Würth&lt;/strong&gt; identified a novel 
 Network Solutions Domain History Date Format(TM)
&amp;#34;In other places, they displayed dates formatted as &amp;#34;01/13/2025&amp;#34;, for
example. I guess, instead of using actual ISO 8601, they
just flipped the order and replaced the slashes with dashes.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#d3d75a1823cb4692b2e15092845bce93"&gt;&lt;img itemprop="image" border="0" alt="d3d75a1823cb4692b2e15092845bce93" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/22/d3d75a1823cb4692b2e15092845bce93.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/proget-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.&lt;a href="https://inedo.com/proget?utm_source=tdwtf&amp;amp;utm_medium=footer&amp;amp;utm_content=PlebsFooter"&gt;Learn more.&lt;/a&gt;
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>13</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/it-s-about-time</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>Representative Line: Readable Formats</title><link>https://thedailywtf.com/articles/readable-formats</link><category>Representative Line</category><pubDate>Thu, 22 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/readable-formats</guid><description>&lt;p&gt;We all love format strings for generating human readable text. Certainly, they&amp;#39;re a better choice than string concatenation. Even if I have a blind spot that keeps me from remembering the &lt;code&gt;printf&lt;/code&gt; format tokens, I still prefer to use format strings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jasmine&lt;/strong&gt; has a co-worker that does use format strings, but they also miss using string concatenation. So they&amp;#39;ve found a way to combine them, and avoid the perils of making readable code that describes the format of their text.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-csharp"&gt;myField.DataFormatString = &lt;span class="hljs-string"&gt;&amp;#34;{0:#,##0.&amp;#34;&lt;/span&gt; + &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-built_in"&gt;string&lt;/span&gt;(&lt;span class="hljs-string"&gt;&amp;#39;0&amp;#39;&lt;/span&gt;, &lt;span class="hljs-number"&gt;2&lt;/span&gt;) + &lt;span class="hljs-string"&gt;&amp;#34;;(#,##0.&amp;#34;&lt;/span&gt; + &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-built_in"&gt;string&lt;/span&gt;(&lt;span class="hljs-string"&gt;&amp;#39;0&amp;#39;&lt;/span&gt;, &lt;span class="hljs-number"&gt;2&lt;/span&gt;) + &lt;span class="hljs-string"&gt;&amp;#34;)}&amp;#34;&lt;/span&gt;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, in their defense, I can see how this code started its life. At some point, they wanted to make the number of decimal places a parameter. And sure, this is an easy way to do that and retain the intent, though this whole thing could be cleaned up with just a simple &lt;code&gt;decimalPlaces = new string(&amp;#39;0&amp;#39;, 2)&lt;/code&gt;, which would make the concatenation less confusing to read.&lt;/p&gt;
&lt;p&gt;Related, while I was checking the documentation on the .NET formatting strings, I learned that they have a per-mille format specifier &lt;a href="https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings#the--custom-specifier-4"&gt;which requires writing a unicode sigil&lt;/a&gt; on most keyboards.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but seeing &lt;code&gt;string perMilleFmt = &amp;#34;#0.## &amp;#34; + &amp;#39;\u2030&amp;#39;;&lt;/code&gt; in my code would be TRWTF.&lt;/p&gt;
&lt;!-- Easy Reader Version: Todo: write a version of ALGOL that uses just the unicode escape characters. Y'know, for readability. --&gt;&lt;div&gt;
	[Advertisement] Picking up &lt;b&gt;NuGet&lt;/b&gt; is easy. Getting good at it takes time. &lt;a href="https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf&amp;amp;utm_medium=Footerad&amp;amp;utm_campaign=nuget"&gt;Download our guide to learn the best practice of NuGet for the Enterprise.&lt;/a&gt;

&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>12</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/readable-formats</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Doing the Assignment</title><link>https://thedailywtf.com/articles/doing-the-assignment</link><category>CodeSOD</category><pubDate>Wed, 21 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/doing-the-assignment</guid><description>&lt;p&gt;Today&amp;#39;s code maybe isn&amp;#39;t much of a WTF, but it does point in the general direction of, &amp;#34;Damn, you live like this?&amp;#34; Poor &lt;strong&gt;Nancy&lt;/strong&gt; unfortunately does.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;&lt;span class="hljs-type"&gt;int&lt;/span&gt; &lt;span class="hljs-variable"&gt;x&lt;/span&gt; &lt;span class="hljs-operator"&gt;=&lt;/span&gt; &lt;span class="hljs-number"&gt;3&lt;/span&gt;;
&lt;span class="hljs-type"&gt;int&lt;/span&gt; &lt;span class="hljs-variable"&gt;y&lt;/span&gt; &lt;span class="hljs-operator"&gt;=&lt;/span&gt; &lt;span class="hljs-number"&gt;4&lt;/span&gt;;
&lt;span class="hljs-type"&gt;int&lt;/span&gt; &lt;span class="hljs-variable"&gt;z&lt;/span&gt; &lt;span class="hljs-operator"&gt;=&lt;/span&gt; &lt;span class="hljs-number"&gt;4&lt;/span&gt;;
x = y = z;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each variable is declared and initialized, and then they&amp;#39;re set equal to each other. It just raises the question though, &lt;em&gt;why do it this way&lt;/em&gt;? Why not declare them and then &lt;code&gt;x = y = z = 4&lt;/code&gt;, if we want that? Or maybe, for more clarity, &lt;code&gt;int x = DEFAULT_VALUE;&lt;/code&gt; would be more legible, and we can skip the multiple assignments on one line. &lt;em&gt;Why does &lt;code&gt;x&lt;/code&gt; get set to 3 but then overwritten&lt;/em&gt;?&lt;/p&gt;
&lt;!-- Easy Reader Version: I'm never fond of x = y = z. It points at being *clever*, and as oft stated, I *hate clever*. --&gt;&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/proget-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	ProGet’s got you covered with security and access controls on your NuGet feeds. &lt;a href="https://inedo.com/proget/private-nuget-server?utm_source=tdwtf&amp;amp;utm_medium=footer&amp;amp;utm_content=GotYouCoveredFooter&amp;amp;utm_campaign=Cyclops2020"&gt;Learn more.&lt;/a&gt;
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>19</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/doing-the-assignment</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>The Outage</title><link>https://thedailywtf.com/articles/the-outage</link><category>Feature Articles</category><pubDate>Tue, 20 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/the-outage</guid><description>&lt;p&gt;At my employer, we use a service called Coveralls, which is a code coverage reporting tool that hooks into your CI pipeline. It takes your &lt;code&gt;lcov&lt;/code&gt; reports and gives you some insights, and also makes it easy to cause the CI pipeline to fail if newly added code doesn&amp;#39;t have reasonable coverage.&lt;/p&gt;
&lt;p&gt;I have no strong feelings about the tool, but on February 24th, our CI jobs started failing,  and our CI step that talked to Coveralls was the culprit. Coveralls had gone down. That happened to us, and a lot of other people. It was a widespread outage impacting anybody who used their service.&lt;/p&gt;
&lt;p&gt;Coveralls actively published updates as the outage dragged on, and boy, &lt;em&gt;did it drag on&lt;/em&gt;. Between them posting nearly identical updates minutes or even seconds apart and the general desperation that snuck into their outage notes after the first few days, I couldn&amp;#39;t help but find their notes hilarious.&lt;/p&gt;
&lt;p&gt;They&amp;#39;ve &lt;a href="https://status.coveralls.io/incidents/pdbt7vdzlvpj"&gt;published their post-mortem&lt;/a&gt;, and the short version is that despite them paying their bills, Amazon decided they hadn&amp;#39;t, and shut down their services. But it took them roughly 68 hours to figure that out.&lt;/p&gt;
&lt;p&gt;If you scroll down past the post-mortem, you can see their outage notes. This is an unauthorized, dramatic reading of those notes. We&amp;#39;ve taken some liberties in interpreting it.&lt;/p&gt;
&lt;iframe width="720" height="480" src="https://www.youtube.com/embed/YgVKi4B6nrs" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""&gt;&lt;/iframe&gt;
&lt;p&gt;I hope this is taken in a good spirit, because they were just doing their best when this happened. I don&amp;#39;t think most companies would be able to maintain operations when their cloud provider decides to lock their accounts. But I don&amp;#39;t care who you are: begging your users to email you if they can help you migrate off AWS is &lt;em&gt;funny&lt;/em&gt;.&lt;/p&gt;
&lt;!-- Easy Reader Version: Yes, I am in fact the kind of person who thinks an eight minute video where all the dialogue comes from outage notes is funny. --&gt;&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/buildmaster-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	&lt;a href="https://inedo.com/BuildMaster?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Confidence&amp;amp;utm_campaign=Buildmaster_Footer"&gt;Utilize BuildMaster&lt;/a&gt; to release your software with confidence, at the pace your business demands. &lt;a href="https://inedo.com/BuildMaster/download?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Confidence&amp;amp;utm_campaign=Buildmaster_Footer"&gt;Download&lt;/a&gt; today!  
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>12</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/the-outage</wfw:comment></item><item><dc:creator>Ellis Morning</dc:creator><title>A Vat of Terrible Experiences</title><link>https://thedailywtf.com/articles/a-vat-of-terrible-experiences</link><category>Feature Articles</category><pubDate>Mon, 19 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/a-vat-of-terrible-experiences</guid><description>&lt;p&gt;Taxes are a royal pain for everyone. Amazon has found a unique way to make them even worse, as &lt;b&gt;Kris W.&lt;/b&gt; attests:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I recently bought a €9.61 kitchen knife on Amazon Spain. My card was charged €7.94 instead. After some investigation, I discovered that Amazon had applied an old VAT registration number I&amp;#39;d added to my personal account years ago, and had classified my purchase as a VAT-exempt intra-EU business transaction. The invoice even contained my business address from 2022, which no longer appeared anywhere in my account settings. I just wanted to remove the VAT number so I could go back to buying kitchen utensils without accidentally generating international tax paperwork.&lt;/p&gt;

&lt;p style="float:right; padding-left:10px; padding-bottom:10px;"&gt;&lt;a title="Wikideas1, CC0, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:European_VAT_Taxes.svg"&gt;&lt;img itemprop="image" width="300" alt="European VAT Taxes" src="https://thumb.wikimedia.org/wikipedia/commons/thumb/7/78/European_VAT_Taxes.svg/250px-European_VAT_Taxes.svg.png?utm_source=commons.wikimedia.org&amp;amp;utm_campaign=index&amp;amp;utm_content=thumbnail"/&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Unfortunately, Amazon no longer provided any visible way to manage that VAT number. Their customer support chatbot insisted I provide the order number from which I wanted the VAT number removed. A human agent confidently explained that I must have entered it into a secondary address field, and instructed me to delete and recreate my shipping address. Another support representative sent me an extensive list of documents I&amp;#39;d need to provide, including my passport, airline boarding passes, proof of export outside the EU, or my NATO identification card. Apparently removing a VAT number from an Amazon account is a process normally reserved for international travelers, Andorran residents, and military alliances.&lt;/p&gt;

&lt;p&gt;Eventually, I found Amazon&amp;#39;s official help page. It explicitly stated that VAT numbers could be removed either by contacting Customer Service or by creating an Amazon Business account to use the self-service option. After another round of correspondence, Customer Service informed me that they were &lt;i&gt;not allowed&lt;/i&gt; to remove VAT numbers and instructed me to use the Business settings that my personal account didn&amp;#39;t have. So I followed the documentation and created a Business account using my existing email address. During registration, Amazon required me to enter the very VAT number I was trying to remove, then promptly congratulated me by email on successfully adding and activating it.&lt;/p&gt;

&lt;p&gt;But I couldn&amp;#39;t access the Business settings yet. Amazon couldn&amp;#39;t verify my business and demanded official documentation, so I obtained two freshly-issued certificates from two separate Spanish government agencies to prove that I was, in fact, a self-employed software developer. I uploaded both documents and waited. Eventually, my shiny new Amazon Business account was approved. I now had a separate Business account, complete with its own purchasing features and complimentary Business Prime membership. At last, I could navigate to the promised VAT-management page!&lt;/p&gt;

&lt;p&gt;The page displayed my VAT number, confirmed it was valid, and offered a button to add more tax information. Beside the existing number, however, there was no &lt;b&gt;Edit&lt;/b&gt; button. No &lt;b&gt;Delete&lt;/b&gt; button. No self-service removal option whatsoever. There was only a link saying, &lt;i&gt;Contact Customer Service to change your tax ID.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Naturally, the link led to a generic help center. After creating an entire business account, submitting government paperwork, and successfully registering the same VAT number a second time, I had arrived precisely where I started: Customer Service, which had already explained that it was not allowed to remove VAT numbers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div&gt;
	[Advertisement] Picking up &lt;b&gt;NuGet&lt;/b&gt; is easy. Getting good at it takes time. &lt;a href="https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf&amp;amp;utm_medium=Footerad&amp;amp;utm_campaign=nuget"&gt;Download our guide to learn the best practice of NuGet for the Enterprise.&lt;/a&gt;

&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>28</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/a-vat-of-terrible-experiences</wfw:comment></item><item><dc:creator>Lyle Seaman</dc:creator><title>Error'd: Scrollpocalypse</title><link>https://thedailywtf.com/articles/scrollpocalypse</link><category>Error'd</category><pubDate>Fri, 16 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/scrollpocalypse</guid><description>&lt;p&gt;&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;Dr. Doom...scroller&lt;/strong&gt; titled this one &amp;#34;Scrollbar-ception&amp;#34;.  Said he
&amp;#34;Screenshot of the TikTok webpage (i.e. in a desktop browser)
while not logged in. I swear this wasn&amp;#39;t a NSFW
TikTok video, instead it was a montage of some live
show from some singer. Anyway... Back on the topic of
the actual publishable snarky comments: Social media is known for
doom-scrolling. Well, these are scrollbars of doom. Or doom-scrollbars.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#d6711f9e7fb94f9ab616977c242562b2"&gt;&lt;img itemprop="image" border="0" alt="d6711f9e7fb94f9ab616977c242562b2" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/d6711f9e7fb94f9ab616977c242562b2.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;An anonymous reader clarified 
&amp;#34;I was reorganizing the document by drag-and-dropping a bunch of
table cells a bit too far for Word&amp;#39;s comfort and
it&amp;#39;s telling me what I did wrong.&amp;#34; Clearly.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#01270f373b754d9f8cb520b5cd8ef856"&gt;&lt;img itemprop="image" border="0" alt="01270f373b754d9f8cb520b5cd8ef856" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/01270f373b754d9f8cb520b5cd8ef856.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;
&lt;strong&gt;B.J. H.&lt;/strong&gt; reported a crisis.
&amp;#34;First Southwest made me question the existence of my bags:
I saw them scanned but the bag tracking system said
there were no scans. Then the next page made me
question my own existence as well.&amp;#34;  B.J. who? 
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#08e657a929724b46b1f2c7289a928800"&gt;&lt;img itemprop="image" border="0" alt="08e657a929724b46b1f2c7289a928800" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/08e657a929724b46b1f2c7289a928800.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;
&lt;strong&gt;Adam R.&lt;/strong&gt; reported a new way of formatting numbers.
&amp;#34;Stripe has decided &amp;#34;You know what, I&amp;#39;ll put the +/-
sign for the transaction amount on the *previous* line instead
of the same line, just for funsies.&amp;#34; Less snarkily: line
break algorithms are fickle, and they forgot to put a
non-breaking space in there.&amp;#34; 
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#2ec536ec73504cc8bc237ef60664ed37"&gt;&lt;img itemprop="image" border="0" alt="2ec536ec73504cc8bc237ef60664ed37" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/2ec536ec73504cc8bc237ef60664ed37.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;
&lt;strong&gt;Peter S.&lt;/strong&gt; proposed
&amp;#34;I was trying to sell my Peleton equipment on their
official &amp;#34;Repowered&amp;#34; site, and I was shown this nice list
of yes/no buttons. I am not sure if I feel
like gambling today with these answers.&amp;#34; I want to know if Peter is unloading all his equipment because he reached his goals, or if he just gave up.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#a40614615c714000846db94564b7e877"&gt;&lt;img itemprop="image" border="0" alt="a40614615c714000846db94564b7e877" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/a40614615c714000846db94564b7e877.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/buildmaster-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	&lt;a href="https://inedo.com/BuildMaster?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Self_Service&amp;amp;utm_campaign=Buildmaster_Footer"&gt;BuildMaster&lt;/a&gt; allows you to create a self-service release management platform that allows different teams to manage their applications. &lt;a href="https://inedo.com/BuildMaster/download?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Self_Service&amp;amp;utm_campaign=Buildmaster_Footer"&gt;Explore how!&lt;/a&gt; 
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>15</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/scrollpocalypse</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>The Frist Line of Defense</title><link>https://thedailywtf.com/articles/the-frist-line-of-defense</link><category>Feature Articles</category><pubDate>Thu, 15 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/the-frist-line-of-defense</guid><description>&lt;p&gt;We don&amp;#39;t cover a lot of security issues here, simply because they&amp;#39;re not usually &lt;em&gt;funny&lt;/em&gt;. But sometimes, they are. So here&amp;#39;s a quick hit about some recent ones.&lt;/p&gt;
&lt;p&gt;We start with a very bad month for the Danish social security system, the Central Register of Persons (CPR). Last week, they detected a breach &lt;a href="https://www.theregister.com/security/2026/10/06/denmarks-id-register-spills-more-peoples-details-than-the-country-has-residents/5301307"&gt;which exposed the personal details of 8.8m people&lt;/a&gt;. Per the Register article, a cybersecurity specialist correctly pointed out that treating your ID number as if it were a secret was a terrible idea in the first place, but unfortunately, so many systems have grown up around the idea that full knowledge of your state issued ID number as proof of identity, that the security expert is screaming into the wind. They&amp;#39;re right, but it&amp;#39;s going to take a lot to change.&lt;/p&gt;
&lt;p&gt;Okay, Denmark&amp;#39;s social security service was hacked. What&amp;#39;s so funny about that?&lt;/p&gt;
&lt;p&gt;Well, the mechanism of the hack appears to go thusly. First, third party companies have access to the database, which they can use to send notifications to their customers via CPR. That connection is secured with a password, and one of those third parties secured their account with the kind of password you&amp;#39;d use to protect the precious air of the planet Druidia. Also known as the kind of &lt;a href="https://www.youtube.com/watch?v=a6iW-8xPw3k&amp;amp;pp=ygUocGFzc3dvcmQgc29tZSBpZGlvdCBoYXMgb24gdGhlaXIgbHVnZ2FnZQ%3D%3D"&gt;password some idiot would put on their luggage&lt;/a&gt;: &amp;#34;123456&amp;#34;. (&lt;a href="https://politiken.dk/danmark/art11016363/%C2%BBOh-my-god%C2%AB-Fynsk-virksomhed-havde-mindst-tre-profiler-med-adgangskoden-123456"&gt;paywalled, Danish article&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The hacker accessed the system on September 10th, and spent ten days searching through the system. The intrusion wasn&amp;#39;t detected until October 2nd, when CPR went to send an invoice to the third party company and noticed, &amp;#34;Boy, that&amp;#39;s more searches than they have customers.&amp;#34; Now, obviously, CPR should have never even allowed such a low complexity password, but also, the third party company shouldn&amp;#39;t have &lt;em&gt;used&lt;/em&gt; such a low security password.&lt;/p&gt;
&lt;p&gt;Now, if you&amp;#39;ll excuse me, I have to change the combination on my luggage. &lt;!-- I jest, in America, you aren't legally allowed to put a secure lock on your luggage, every lock you travel with has to be openable by the TSA, which is one of the reasons why I never check a bag if I can help it. --&gt;&lt;/p&gt;
&lt;p&gt;In other news, I&amp;#39;m not particularly fond of blockchain stuff. Mostly, the whole distributed ledger seems like a solution in search of problems, and &amp;#34;trading tokens as if they&amp;#39;re money&amp;#34; is the best thing anybody&amp;#39;s been able to come up with. Back in my consulting days, when blockchains were all over the news, I was consulting with a large retailer, and they were exploring using blockchain in their supply chain. &amp;#34;How does that work?&amp;#34; I asked innocently. &amp;#34;It&amp;#39;ll have blockchain in it.&amp;#34; &amp;#34;Sure, but what does the blockchain get you?&amp;#34; &amp;#34;We&amp;#39;ll be using blockchain. If there&amp;#39;s like, an e. coli outbreak, we can trace where it came from.&amp;#34; &amp;#34;Couldn&amp;#39;t you get that out of a regular database?&amp;#34; &amp;#34;But this&amp;#39;ll have blockchain.&amp;#34;&lt;/p&gt;
&lt;p&gt;In any case, blockchain companies getting hacked and having all their users&amp;#39; assets stolen is practically a daily occurrence. Not really notable. But a recent hack &lt;a href="https://www.bleepingcomputer.com/news/security/ledger-confirms-hardware-wallet-spy-implant-behind-crypto-thefts/"&gt;is legitimately interesting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A company, called Ledger, sells &amp;#34;hardware wallets&amp;#34;. Instead of storing your keys on some third party&amp;#39;s servers (where it&amp;#39;ll get hacked and you&amp;#39;ll lose all your &amp;#34;money&amp;#34;), you store them on a hardware device that you put in a safe. It&amp;#39;s not connected to the internet, and thus is unhackable. Or so you&amp;#39;d &lt;em&gt;think&lt;/em&gt;. But if enough people are buying those devices, a supply chain attack becomes potentially very lucrative. And that&amp;#39;s exactly what happened. &lt;em&gt;Someone&lt;/em&gt; in the &lt;a href="https://www.coindesk.com/tech/2026/10/12/ledger-says-unauthorized-implant-found-in-at-least-one-device-sold-by-cryptobilis"&gt;supply chain&lt;/a&gt; cracked a bunch of these devices open, and inserted new hardware. They attached a microcontroller to the screen leads, that allowed it to read what was on the screen (and thus detect when the screen was displaying a recovery code that could be used to access the wallet), and a cellular modem that allowed it to literally phone home with that information.&lt;/p&gt;
&lt;p&gt;In total, these hackers walked away with the equivalent of nearly $100M in cryptocurrency.&lt;/p&gt;
&lt;p&gt;All the devices passed through Ledger, where they were inspected before being sold. Presumably, they were sealed with tamper-resistant packaging. It&amp;#39;s plausible that the tamperer was downstream from here and the customers didn&amp;#39;t fully inspect the packaging. Even your most savvy user generally doesn&amp;#39;t check that kind of thing, and I suspect a lot of these customers aren&amp;#39;t actually all that savvy. But also, companies in the crypto space tend to be... we&amp;#39;ll say, &lt;em&gt;more eager than cautious&lt;/em&gt;, so I wouldn&amp;#39;t be surprised if the tampering happened upstream and didn&amp;#39;t get caught by their inspection process.&lt;/p&gt;
&lt;p&gt;Security is hard in the best case. It&amp;#39;s much harder when you&amp;#39;re putting the final onus of security on end users who may have thousands or even millions of dollars locked behind a single key. Or when passwords are hard, so you pick an easy one to remember.&lt;/p&gt;
&lt;!-- Easy Reader Version: in an objective sense, Spaceballs is one of Mel Brooks' lesser contributions to the parody genre. On the other hand, if you're seven years old when you watch it, and are a child obsessed with Star Wars, it'll leave a mark in your brain that you can't escape. --&gt;&lt;div&gt;
	[Advertisement] &lt;b&gt;Plan Your .NET 9 Migration with Confidence&lt;/b&gt;&lt;br/&gt;Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. &lt;b&gt;&lt;a href="https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet&amp;amp;utm_source=tdwtf-footer"&gt;Download Free Guide Now!&lt;/a&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>21</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/the-frist-line-of-defense</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>Representative Line: A Diamond in the Rough</title><link>https://thedailywtf.com/articles/a-diamond-in-the-rough</link><category>Representative Line</category><pubDate>Wed, 14 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/a-diamond-in-the-rough</guid><description>&lt;p&gt;&lt;strong&gt;Mandy&lt;/strong&gt;&amp;#39;s co-worker recently learned about virtual inheritance in C++. It&amp;#39;s become their new favorite button to push, and they &lt;em&gt;only&lt;/em&gt; use virtual inheritance.&lt;/p&gt;
&lt;p&gt;Virtual inheritance is one workaround for the &amp;#34;&lt;a href="https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem"&gt;diamond problem&lt;/a&gt;&amp;#34;, where you have an inheritance tree that &amp;#34;recombines&amp;#34; via multiple inheritance: when a child class has a Hapsburg-esque parentage, it&amp;#39;s hard to decide which inherited methods are being invoked or overridden.&lt;/p&gt;
&lt;p&gt;In C++, imagine you have class A, which gets derived into classes B and C. Class D then uses multiple inheritance to inherit from B and C. In practice, this means that D inherits from A twice, and would have two internal copies of all of A&amp;#39;s members.&lt;/p&gt;
&lt;p&gt;If, on the other hand, you have B and C inherit &lt;em&gt;virtually&lt;/em&gt; (&lt;code&gt;class B : public virtual A&lt;/code&gt;), then class D will only actually inherit a single copy of A.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re reading this and going, &amp;#34;Boy, this just sounds like another reason to avoid multiple inheritance,&amp;#34; you&amp;#39;re probably right. The important thing, though, is inheriting virtually &lt;em&gt;impacts how your child classes&lt;/em&gt; will inherit. It only matters if you have child classes.&lt;/p&gt;
&lt;p&gt;Which brings us back to Mandy&amp;#39;s co-worker. He read somewhere that defaulting to virtual inheritance all the time was safer, so he did that all the time. &lt;em&gt;All. The. Time&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Including in this case:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cpp"&gt;&lt;span class="hljs-keyword"&gt;class&lt;/span&gt; &lt;span class="hljs-title class_"&gt;SomeSpecificDerivedClass&lt;/span&gt; &lt;span class="hljs-keyword"&gt;final&lt;/span&gt; : &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;virtual&lt;/span&gt; SomeBaseClass
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The class here is marked &lt;code&gt;final&lt;/code&gt;. It can&amp;#39;t be inherited from. The use of &lt;code&gt;virtual&lt;/code&gt; accomplishes nothing.&lt;/p&gt;
&lt;!-- Easy Reader Version: Now that C++ has concepts, that's a much easier way to get type safety without loads of weird inheritance trees. --&gt;&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/buildmaster-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	&lt;a href="https://inedo.com/BuildMaster?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Self_Service&amp;amp;utm_campaign=Buildmaster_Footer"&gt;BuildMaster&lt;/a&gt; allows you to create a self-service release management platform that allows different teams to manage their applications. &lt;a href="https://inedo.com/BuildMaster/download?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Self_Service&amp;amp;utm_campaign=Buildmaster_Footer"&gt;Explore how!&lt;/a&gt; 
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>28</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/a-diamond-in-the-rough</wfw:comment></item><item><dc:creator>Ellis Morning</dc:creator><title>Editor's Soapbox: Digital Mail</title><link>https://thedailywtf.com/articles/digital-mail</link><category>Editor's Soapbox</category><pubDate>Tue, 13 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/digital-mail</guid><description>&lt;p&gt;Ever get some special letter, card, or picture from a friend or loved one that you held onto, maybe even taped to your cube or office wall? Is it something you still look at fondly, something that lifts your spirits whenever you&amp;#39;re down? Certainly, a thoughtful card or letter is much nicer than a thoughtful email.&lt;/p&gt;

&lt;p&gt;Now imagine your special keepsake being scanned, censored, and converted into a digital file that you can only view from a tablet — assuming you can afford the fee to access the tablet. The original has been destroyed; it&amp;#39;s gone forever. You&amp;#39;ll never get to see or feel it in your hands.&lt;/p&gt;

&lt;p style="float:right; padding-left:10px; padding-bottom:10px;"&gt;&lt;a title="Archives Branch, USMC History Division, CC BY 2.0 &amp;lt;https://creativecommons.org/licenses/by/2.0&amp;gt;, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Birthday_Card,_30_October_1943,_page_2_of_2.jpg"&gt;&lt;img itemprop="image" width="330" alt="Birthday Card, 30 October 1943, page 2 of 2" src="https://thumb.wikimedia.org/wikipedia/commons/thumb/6/66/Birthday_Card%2C_30_October_1943%2C_page_2_of_2.jpg/330px-Birthday_Card%2C_30_October_1943%2C_page_2_of_2.jpg?utm_source=commons.wikimedia.org&amp;amp;utm_campaign=index&amp;amp;utm_content=thumbnail"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It sounds almost &lt;i&gt;too&lt;/i&gt; cruel, like something you&amp;#39;d find in a &lt;i&gt;Fallout&lt;/i&gt; game. Unfortunately, it&amp;#39;s reality for more and more people incarcerated in US prisons.&lt;/p&gt;

&lt;p&gt;I&amp;#39;ve been writing to an incarcerated person for a while now myself. I find the process incredibly rewarding; I think about my friend all the time and wish them well. Unfortunately, the scanning and processing takes absolutely forever, so in a given year we only exchange 3 letters per side. The digitized files that I receive have names censored out of them; I have no idea what&amp;#39;s removed from my letters before my friend receives them. For me, this is all too reminiscent of exchanging letters with my grandmother in Iran before she died. Agents there would straight-up open the envelope, confiscate any valuables inside, marker over anything they didn&amp;#39;t like, then re-seal the envelope and send it back on its merry way.&lt;/p&gt;

&lt;p&gt;Over 30 US states now digitize the mail passing in and out of prisons, relying on AI to judge what&amp;#39;s kosher and what isn&amp;#39;t. If you thought AI was great with resumes, just wait until you task it with threat detection! It&amp;#39;s been working so well that one nonprofit organization had to change its name: the word &lt;i&gt;fight,&lt;/i&gt; used in any context whatsoever, gets flagged.&lt;/p&gt;

&lt;p&gt;Once mail is scanned, it&amp;#39;s only accessible by tablets that have to be paid for. Incarcerated people are already nickled and dimed for a ridiculous number of things and surely don&amp;#39;t need &lt;i&gt;more&lt;/i&gt; fees.&lt;/p&gt;

&lt;p&gt;It doesn&amp;#39;t stop at mail, either. The latest tech is also being used to eliminate physical visitation. Because if there&amp;#39;s anything the pandemic taught us, it&amp;#39;s that nothing beats seeing your loved ones exclusively on a screen for years at a stretch.&lt;/p&gt;

&lt;p&gt;The states justify these egregious measures by playing the drug card. They&amp;#39;re necessary to stop drugs from entering the prisons. But these states stop short of providing evidence to show that these tech-facilitated practices are actually having the intended effect. Even if they magically solved drug trafficking forever, could &lt;i&gt;any&lt;/i&gt; result truly justify the vast harm being inflicted upon incarcerated people, their families, and their friends? Physical mail and visitation are necessary lifelines and psychological boosts for those who might otherwise have nothing and no one to hold onto during an unimaginably difficult time of their lives.&lt;/p&gt;

&lt;p&gt;Do I really have to explain the benefit of parents and children exchanging homework, letters, and pictures?&lt;/p&gt;

&lt;p&gt;I&amp;#39;m angry about this on so many levels. If you are, too, here&amp;#39;s some stuff we can do to &lt;strike&gt;fight&lt;/strike&gt; work against this together:
&lt;/p&gt;&lt;div style="margin-left:7%;"&gt;
&lt;ul style="list-style-type:disc; line-height:150%;"&gt;
	&lt;li&gt;&lt;b&gt;Support prison abolition with your time, money, and/or IT superpowers.&lt;/b&gt; Forced prison labor is slavery. The entire punitive model is cruel, biased, and far less effective than approaches like restorative and community-based justice. Moving on is long overdue and the best way to make all of this stop.&lt;/li&gt;
	&lt;li&gt;Avoid working for companies that facilitate these practices. Tell your friends not to work for them, either. If you&amp;#39;re stuck working for them for survival&amp;#39;s sake, look for ways to enact positive change from the inside.&lt;/li&gt;
	&lt;li&gt;Spread the word of what&amp;#39;s happening. Most people have no idea. Use your knowledge to educate  technical and non-technical folks. They might want to do something about this, too.&lt;/li&gt;
	&lt;li&gt;Write to incarcerated people yourself. Like Bob Ross said, &amp;#34;Everybody needs a friend.&amp;#34; Knowing there&amp;#39;s someone in your corner who cares about you makes all the difference in the world. Sites like &lt;a href="https://writeaprisoner.com/"&gt;WriteAPrisoner.com&lt;/a&gt; will match you up with a pen pal.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;A drop of water seems harmless, but get enough of those together and you carve out the Grand Canyon. If we all do something to help, however big or small, our massed effort becomes something powerful. As tech professionals, we are especially empowered to push back on these cruel and abusive practices. We must act now, before they move out of prisons and into mainstream society.&lt;/p&gt;

&lt;p&gt;Do you want your post office to start doing this?&lt;/p&gt;


&lt;p&gt;&lt;b&gt;Sources:&lt;/b&gt;
&lt;/p&gt;&lt;div style="margin-left:7%;"&gt;
&lt;ul style="list-style-type:disc; line-height:150%;"&gt;
&lt;li&gt;&lt;a href="https://scalawagmagazine.org/2026/08/abandon-all-connection-ye-who-enter-here-digitized-prison-mail-as-repression-and-surveillance/"&gt;Abandon All Connection, Ye Who Enter Here: Digitized Prison Mail as Repression and Surveillance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=S5OpFo6cfhk"&gt;WEBINAR: Fighting for families: How advocates are resisting attacks on visitation and physical mail&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/"&gt;Involuntary Servitude: How Prison Labor is Modern Day Slavery&lt;/a&gt;&lt;/li&gt;&lt;a href="https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/"&gt;
&lt;/a&gt;&lt;li&gt;&lt;a href="https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/"&gt;&lt;/a&gt;&lt;a href="https://sociologyinc.com/crime-and-punishment-why-justice-systems-dont-always-deliver/"&gt;Why Justice Systems Don&amp;#39;t Always Deliver&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;div&gt;
	[Advertisement] Picking up &lt;b&gt;NuGet&lt;/b&gt; is easy. Getting good at it takes time. &lt;a href="https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf&amp;amp;utm_medium=Footerad&amp;amp;utm_campaign=nuget"&gt;Download our guide to learn the best practice of NuGet for the Enterprise.&lt;/a&gt;

&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>66</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/digital-mail</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: A Type of Type Safety</title><link>https://thedailywtf.com/articles/a-type-of-type-safety</link><category>CodeSOD</category><pubDate>Mon, 12 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/a-type-of-type-safety</guid><description>&lt;p&gt;For some godawful reason, people like to explain object oriented concepts via analogy to biological taxonomies. I suppose it&amp;#39;s easy to understand an &amp;#34;is-a&amp;#34; relationship (a cat is a mammal), but the down side is you get a complex and increasingly leaky analogy that over-emphasizes the importance of inheritance.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s not to slight &lt;strong&gt;Alan&lt;/strong&gt;&amp;#39;s choice of using it to anoymize today&amp;#39;s code. It&amp;#39;s just a broad frustration on my part.&lt;/p&gt;
&lt;p&gt;In any case, Alan has been working in a C++ codebase that&amp;#39;s written by people who maybe don&amp;#39;t fully understand all the key object oriented concepts. That&amp;#39;s why you get code like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cpp"&gt;    &lt;span class="hljs-comment"&gt;/*
     * If possible, steal tentacle from the given animal.
     */&lt;/span&gt;
    &lt;span class="hljs-function"&gt;&lt;span class="hljs-type"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;Animal::StealTentacle&lt;/span&gt;&lt;span class="hljs-params"&gt;(Animal *animal)&lt;/span&gt; &lt;/span&gt;{
        &lt;span class="hljs-comment"&gt;// only Octopus and Squid can have tentacles&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (!&lt;span class="hljs-built_in"&gt;IS_INSTANCE_OF&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;this&lt;/span&gt;, Octopus) &amp;amp;&amp;amp; !&lt;span class="hljs-built_in"&gt;IS_INSTANCE_OF&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;this&lt;/span&gt;, Squid)) {
            &lt;span class="hljs-keyword"&gt;return&lt;/span&gt;;
        }

        Limb *limb = animal-&amp;gt;mLimbs-&amp;gt;&lt;span class="hljs-built_in"&gt;GetFirstTentacle&lt;/span&gt;();
        &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (limb) {
            limb-&amp;gt;&lt;span class="hljs-built_in"&gt;AttachToAnimal&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;this&lt;/span&gt;);
            &lt;span class="hljs-comment"&gt;// . . .&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function takes a raw pointer to an &lt;code&gt;Animal&lt;/code&gt; object. If that pointer is not an Octopus or a Squid, we bail. Otherwise, we&amp;#39;re going to take its tentacle, and do stuff with it.&lt;/p&gt;
&lt;p&gt;Now, this is a pretty clear example of the type switch anti-pattern. Instead of using the type system and polymorphism to enforce restrictions, we instead do runtime type checks.&lt;/p&gt;
&lt;p&gt;But wait a second, what&amp;#39;s going on in that &lt;code&gt;IS_INSTANCE_OF&lt;/code&gt;?&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cpp"&gt;    &lt;span class="hljs-comment"&gt;// I&amp;#39;ve noticed that dynamic_cast always returns a valid result when&lt;/span&gt;
    &lt;span class="hljs-comment"&gt;// casting an &amp;#34;objectPointer&amp;#34; of type &amp;#34;className&amp;#34;.&lt;/span&gt;
    &lt;span class="hljs-comment"&gt;// Try casting it to a [Organism *] to force it to work. (?)&lt;/span&gt;
    &lt;span class="hljs-meta"&gt;#&lt;span class="hljs-keyword"&gt;define&lt;/span&gt; IS_INSTANCE_OF(objectPointer, className)    ((bool) (dynamic_cast&lt;span class="hljs-string"&gt;&amp;lt;className *&amp;gt;&lt;/span&gt;(((Organism *) objectPointer)) != NULL))&lt;/span&gt;
    &lt;span class="hljs-meta"&gt;#&lt;span class="hljs-keyword"&gt;define&lt;/span&gt; IS_MEMBER_OF(objectPointer, className)      IS_INSTANCE_OF(objectPointer, className)    &lt;span class="hljs-comment"&gt;// temporary macro alias&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code attempts to take an &lt;code&gt;objectPointer&lt;/code&gt; and first, force it into a pointer to our base type (&lt;code&gt;Organism&lt;/code&gt;), using a C-style cast. Now, in C++, C-style casts are a shorthand, and the compiler will, based on the context, attempt to do the best cast which fits the situation, starting with a &lt;code&gt;const_cast&lt;/code&gt; (which only alters the constness of the type), and failing all the way up to a &lt;code&gt;reinterpret_cast&lt;/code&gt;- which just ignores type information entirely and assumes you know what you&amp;#39;re doing.&lt;/p&gt;
&lt;p&gt;Which this developer clearly doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;In any case, we pass the C-style cast result into the &lt;code&gt;dynamic_cast&lt;/code&gt; function, which attempts to cast that pointer into an instance of &lt;code&gt;className&lt;/code&gt;. If no such conversion is possible (because they&amp;#39;re not part of the same inheritance hiercharcy), it returns &lt;code&gt;NULL&lt;/code&gt;, which is what they&amp;#39;re checking.&lt;/p&gt;
&lt;p&gt;Their comment highlights their misunderstanding of the function; &lt;code&gt;dynamic_cast&lt;/code&gt; can be used to crosscast. In other words, &lt;code&gt;dynamic_cast&amp;lt;Dog*&amp;gt;(my_cat)&lt;/code&gt; will actually work, because (in this example) &lt;code&gt;Dog*&lt;/code&gt; and &lt;code&gt;Cat*&lt;/code&gt; share a common base.&lt;/p&gt;
&lt;p&gt;From the docs:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Otherwise, if expression points/refers to a public base class subobject of the most derived object, and the type of the most derived object has an unambiguous and public base class of type Target, the result points/refers to the Target subobject of the most derived object. In other words, dynamic_cast can be used to crosscast (or side-cast) pointers/references, between two types derived from the same base.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You shouldn&amp;#39;t be using dynamic cast to solve this problem. Hell, you sohuldn&amp;#39;t be doing any of this in the first place!&lt;/p&gt;
&lt;p&gt;In any case, in actual usage, the developers responsible do stuff like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cpp"&gt;    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (&lt;span class="hljs-built_in"&gt;IS_INSTANCE_OF&lt;/span&gt;(animal, Felid)) {
        Felid *cat = (Felid *) animal; &lt;span class="hljs-comment"&gt;// Yes another C-style cast - this time (hopefully) devolving to the same dynamic_cast hidden inside the expansion of the previous macro.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I love when a comment says &amp;#34;hopefully&amp;#34;. &amp;#34;This hopefully does what I think it should do&amp;#34;.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll let Alan summarize the problems:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Used prudently, the dynamic dispatch facility that object oriented languages provide their users can be a valuable tool for capturing the domain model in clean, elegant code.  However, as even C++&amp;#39;s designer Bjarne Stroustrup acknowledged, in &amp;#34;The Design and Evolution of C++&amp;#34;, the introduction of support for Run-Time Type Information makes it possible to spurn such assistance and write RTTI-based code for which a verdict of &amp;#34;combines the syntactic elegance of C with the run-time efficiency of Smalltalk&amp;#34; is just &amp;#34;too kind&amp;#34;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!-- Easy Reader Version: I strongly suspect a Python developer is responsible for this. Which isn't an excuse. --&gt;
&lt;style&gt;.comment { border: none; }&lt;/style&gt;&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/proget-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.&lt;a href="https://inedo.com/proget?utm_source=tdwtf&amp;amp;utm_medium=footer&amp;amp;utm_content=PlebsFooter"&gt;Learn more.&lt;/a&gt;
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>21</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/a-type-of-type-safety</wfw:comment></item><item><dc:creator>Lyle Seaman</dc:creator><title>Error'd: Fast Quick</title><link>https://thedailywtf.com/articles/fast-quick</link><category>Error'd</category><pubDate>Fri, 09 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/fast-quick</guid><description>&lt;p&gt;
&lt;strong&gt;Matias&lt;/strong&gt; shared a standard sort of flubstituted fail-merge error&amp;#39;d; not really egregious, just routine.
&amp;#34;I am {{emotionType}} to hear this.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#38cbfe9d47c3447790831d94826212c8"&gt;&lt;img itemprop="image" border="0" alt="38cbfe9d47c3447790831d94826212c8" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/38cbfe9d47c3447790831d94826212c8.jpeg"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;And another mail-not-merged from
&lt;strong&gt;Reinier B.&lt;/strong&gt;
&amp;#34;When the package from [SELLER] seemed to be lost in
the mail, I was very [EMOTIONAL_STATE] with the refund of
[AMOUNT]. I can now buy another [ITEM] instead.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#566b877339174759b96eaa3aa5b8a032"&gt;&lt;img itemprop="image" border="0" alt="566b877339174759b96eaa3aa5b8a032" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/566b877339174759b96eaa3aa5b8a032.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;
&lt;strong&gt;Dave A.&lt;/strong&gt; didn&amp;#39;t care for this mail flub, though it&amp;#39;s hardly egregious in my opinion. He suggested we just label it with
&amp;#34;A short description of snarky comments.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#6e07443194d549519ed3cff7ddfba009"&gt;&lt;img itemprop="image" border="0" alt="6e07443194d549519ed3cff7ddfba009" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/6e07443194d549519ed3cff7ddfba009.jpeg"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&amp;#34;I&amp;#39;ve_missed_you_too&amp;#34; 
&lt;strong&gt;Willy&lt;/strong&gt; wrote in response to this earnest email.
&amp;#34;Long lasting relationships with car dealers are built on the
personal touchÖ.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#7fb868d3282c4229aff2d94814247705"&gt;&lt;img itemprop="image" border="0" alt="7fb868d3282c4229aff2d94814247705" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/7fb868d3282c4229aff2d94814247705.jpeg"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;&amp;#34;This is a title&amp;#34;
&lt;strong&gt;Peter&lt;/strong&gt; said about a polyglot web page.
&amp;#34;This is a comment.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#492453f2f3c741dcbd0d0b194a4a2815"&gt;&lt;img itemprop="image" border="0" alt="492453f2f3c741dcbd0d0b194a4a2815" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/492453f2f3c741dcbd0d0b194a4a2815.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;div&gt;
	[Advertisement] &lt;b&gt;Plan Your .NET 9 Migration with Confidence&lt;/b&gt;&lt;br/&gt;Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. &lt;b&gt;&lt;a href="https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet&amp;amp;utm_source=tdwtf-footer"&gt;Download Free Guide Now!&lt;/a&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>9</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/fast-quick</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>Racing Trains</title><link>https://thedailywtf.com/articles/racing-trains</link><category>Feature Articles</category><pubDate>Thu, 08 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/racing-trains</guid><description>&lt;p&gt;&lt;strong&gt;Robert G&lt;/strong&gt; sends us a WTF from the outside, but I think we can come up with some hypotheses about what actually happened.&lt;/p&gt;
&lt;p&gt;Robert was traveling by train. For complicated train reasons, the car he was seated on was not actually scheduled to continue with the train he was booked to ride, the replacement car missed its scheduled arrival, and the result was that Robert was left at a station needing to rebook his travel.&lt;/p&gt;
&lt;p&gt;Now, given that this is in a region of the world with a fairly robust train network, this represented a hiccup of thirty minutes in a many hour trip. Not a particularly big deal. But Robert didn&amp;#39;t want to get stranded any longer than he had to, so he took out his phone, fired up the train company&amp;#39;s app, and made sure he had a reservation on the next train. He got the confirmation, and grabbed a coffee while he waited.&lt;/p&gt;
&lt;p&gt;Not quite thirty minutes later, Robert boarded the train and went towards his reserved seat. Another passenger approached from the opposite direction, and they met at the seat. &amp;#34;Excuse me,&amp;#34; Robert said, &amp;#34;but I reserved this one.&amp;#34;&lt;/p&gt;
&lt;p&gt;&amp;#34;No, &lt;em&gt;I&lt;/em&gt; reserved this one.&amp;#34;&lt;/p&gt;
&lt;p&gt;Being reasonable people, they both pulled out their phones and pulled up their apps. Sure enough, each one of them was confirmed for that seat. Since the email confirmation had more details than the app provided, they both pulled up the email. Same seat. Both confirmed. The timestamp of the reservation? The same, down to the second.&lt;/p&gt;
&lt;p&gt;&amp;#34;I don&amp;#39;t think the conductor will let us sit in each other&amp;#39;s laps,&amp;#34; the other passenger said.&lt;/p&gt;
&lt;p&gt;As it turned out, there was enough room on the train that no lap sitting was required. Everyone got a seat, even if it wasn&amp;#39;t the one they reserved.&lt;/p&gt;
&lt;p&gt;But the story stuck with Robert. A major transit provider had a reservation system that clearly had a race condition. It seemed like the most basic example of race conditions too, the kind you&amp;#39;re shown in college to explain the basic concept.&lt;/p&gt;
&lt;p&gt;&amp;#34;Check if the seat is reserved, and if it&amp;#39;s not, reserve it.&amp;#34; Because that sequence isn&amp;#39;t atomic, two different threads could do the check, see it&amp;#39;s not reserved, and then reserve it. I suppose it&amp;#39;s at least something that one reservation doesn&amp;#39;t &lt;em&gt;overwrite&lt;/em&gt; the other, which at least indicates that a reservation is its own record.&lt;/p&gt;
&lt;p&gt;The real question is this: this has to happen with some frequency, so &lt;em&gt;how has nobody fixed it&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;The real answer: they probably just don&amp;#39;t care, either because they literally don&amp;#39;t care, or because their software is such a trashfire that this doesn&amp;#39;t even rise to the top ten bugs. It&amp;#39;s likely a mix of both.&lt;/p&gt;
&lt;!-- Easy Reader Version: Look, I'm in the US, and by US standards I'm a top decile train user, in that I ride Amtrak a few times a year for trips, so I'm not going to make snarky comments about some other country's train system, what with glass houses and stones thrown. Amtrak is actually pretty nice, all things considered, but the US *hates trains* and they try and make the experience as bad as possible. --&gt;&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/proget-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.&lt;a href="https://inedo.com/proget?utm_source=tdwtf&amp;amp;utm_medium=footer&amp;amp;utm_content=PlebsFooter"&gt;Learn more.&lt;/a&gt;
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>29</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/racing-trains</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: A Tool for You</title><link>https://thedailywtf.com/articles/a-tool-for-you</link><category>CodeSOD</category><pubDate>Wed, 07 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/a-tool-for-you</guid><description>&lt;p&gt;A junior dev on the team had a simple question: in Java, how do I correctly read user input from the CLI and act on it?&lt;/p&gt;
&lt;p&gt;Now, we can wonder about a junior dev not having such basic knowledge, but maybe they&amp;#39;re new to &lt;em&gt;Java&lt;/em&gt; specifically. Who knows. But &lt;strong&gt;Robert&lt;/strong&gt;&amp;#39;s team has a senior on it who &amp;#34;likes to mentor&amp;#34;. This senior has strong opinions about how to write software, extreme confidence in those opinions, and has somehow been around the company long enough that he knows where the bodies are buried and no one will fire him.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s his sample application for reading input.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;&lt;span class="hljs-keyword"&gt;import&lt;/span&gt; java.nio.charset.StandardCharsets;
&lt;span class="hljs-keyword"&gt;import&lt;/span&gt; java.util.*;

&lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;class&lt;/span&gt; &lt;span class="hljs-title class_"&gt;ScannerTool&lt;/span&gt; {
  &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;static&lt;/span&gt; &lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title function_"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;(String[] args)&lt;/span&gt; {
    Map&amp;lt;Optional&amp;lt;Character&amp;gt;, Map.Entry&amp;lt;String, Boolean&amp;gt;&amp;gt; map = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;HashMap&lt;/span&gt;&amp;lt;&amp;gt;();
    map.put(Optional.of(&lt;span class="hljs-string"&gt;&amp;#39;A&amp;#39;&lt;/span&gt;), &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;AbstractMap&lt;/span&gt;.SimpleEntry&amp;lt;&amp;gt;(&lt;span class="hljs-string"&gt;&amp;#34;You entered A.&amp;#34;&lt;/span&gt;, &lt;span class="hljs-literal"&gt;true&lt;/span&gt;));
    map.put(Optional.of(&lt;span class="hljs-string"&gt;&amp;#39;B&amp;#39;&lt;/span&gt;), &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;AbstractMap&lt;/span&gt;.SimpleEntry&amp;lt;&amp;gt;(&lt;span class="hljs-string"&gt;&amp;#34;You entered B.&amp;#34;&lt;/span&gt;, &lt;span class="hljs-literal"&gt;true&lt;/span&gt;));
    map.put(Optional.empty(), &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;AbstractMap&lt;/span&gt;.SimpleEntry&amp;lt;&amp;gt;(&lt;span class="hljs-string"&gt;&amp;#34;You entered nothing.&amp;#34;&lt;/span&gt;, &lt;span class="hljs-literal"&gt;false&lt;/span&gt;));
    Optional&amp;lt;Character&amp;gt; input;
    &lt;span class="hljs-keyword"&gt;do&lt;/span&gt; {
      System.out.println(&lt;span class="hljs-string"&gt;&amp;#34;Please enter A or B:&amp;#34;&lt;/span&gt;);
    } &lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (!map.getOrDefault((input = nextCharacter()), &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;AbstractMap&lt;/span&gt;.SimpleEntry&amp;lt;&amp;gt;(&lt;span class="hljs-string"&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span class="hljs-literal"&gt;false&lt;/span&gt;))
        .getValue());
    System.out.println(map.get(input).getKey());
  }

  &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;static&lt;/span&gt; Optional&amp;lt;Character&amp;gt; &lt;span class="hljs-title function_"&gt;nextCharacter&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; {
    &lt;span class="hljs-type"&gt;String&lt;/span&gt; &lt;span class="hljs-variable"&gt;l&lt;/span&gt; &lt;span class="hljs-operator"&gt;=&lt;/span&gt; &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;Scanner&lt;/span&gt;(System.in, StandardCharsets.UTF_8).nextLine();
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (l != &lt;span class="hljs-literal"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; !l.isEmpty()) {
      &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; Optional.of(l.charAt(&lt;span class="hljs-number"&gt;0&lt;/span&gt;));
    }
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; Optional.empty();
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Look, I know Java is verbose, but this is entirely next level. Giving this to a junior has to constitute an attempt to drive the youth &lt;em&gt;out&lt;/em&gt; of the industry, because any sane person being told, &amp;#34;your job is to write this&amp;#34; would realize they&amp;#39;ve committed a grave error in their career choice and needs to escape now.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nextCharacter&lt;/code&gt; in this case actually returns the first character of the next line, not the next character. And if there isn&amp;#39;t one, it returns an empty optional. Which, fine, we only expect one character per line of input for this exercise, so that&amp;#39;s not &lt;em&gt;wrong&lt;/em&gt;, I just don&amp;#39;t like the name of the function.&lt;/p&gt;
&lt;p&gt;Of course, using &lt;code&gt;Scanner&lt;/code&gt; here is a wrecking ball fly swatter- that class is a full on parser for reading out common data types from a file. Worth showing to a junior, but a little out of scope of this question.&lt;/p&gt;
&lt;p&gt;But the real overengineering is the map of maps- well, a map of map &lt;em&gt;entries&lt;/em&gt;. The key to the outer map is an optional of the character that was entered by the user. The value is itself a map, the key of the map is the message we want to output, the value is whether or not the loop should continue. They&amp;#39;ve reinvented tuples using map entries. Which, in their defense, mainline Java doesn&amp;#39;t have tuples (enterprise edition seems to have them in the &lt;code&gt;javax&lt;/code&gt; namespace, but I&amp;#39;m not even certain those are meant to be general purpose tuples anyway). A quick search indicates that their absence is a perennial source of heated discussions in forums and Stack Overflow.&lt;/p&gt;
&lt;p&gt;Robert writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is remarkable in its creativity and execution and still has me in awe. When I tried to unpack it, my brain just started to pack up its things and left, haven&amp;#39;t seen it since.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Bon voyage.&lt;/p&gt;
&lt;!-- Easy Reader Version: "The street finds it own uses for things," William Gibson wrote. Then someone showed him this use of SimpleEntry types, and added, "but it really shouldn't." --&gt;&lt;div&gt;
	[Advertisement] Picking up &lt;b&gt;NuGet&lt;/b&gt; is easy. Getting good at it takes time. &lt;a href="https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf&amp;amp;utm_medium=Footerad&amp;amp;utm_campaign=nuget"&gt;Download our guide to learn the best practice of NuGet for the Enterprise.&lt;/a&gt;

&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>16</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/a-tool-for-you</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: A Random Article</title><link>https://thedailywtf.com/articles/a-random-article</link><category>CodeSOD</category><pubDate>Tue, 06 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/a-random-article</guid><description>&lt;p&gt;Many years ago, &lt;strong&gt;DJ&lt;/strong&gt; got his start doing odd web development jobs for a low hourly rate. He was only 19 when he got started, and what he lacked in experience he made up for in being cheap to hire.&lt;/p&gt;
&lt;p&gt;As I said, that was many years ago, and he has since learned a lot. But he still has some code from his very first &amp;#34;someone paid me for this&amp;#34; project. This particular function needed to pick a random bit of content from their database to display in the &amp;#34;right side&amp;#34; banner area. This is how DJ implemented it.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-php"&gt;&lt;span class="hljs-comment"&gt;// Create an array of all the ID&amp;#39;s used&lt;/span&gt;
&lt;span class="hljs-variable"&gt;$int&lt;/span&gt; = &lt;span class="hljs-keyword"&gt;array&lt;/span&gt;();
&lt;span class="hljs-variable"&gt;$query&lt;/span&gt; = &lt;span class="hljs-variable"&gt;$sql&lt;/span&gt;-&amp;gt;&lt;span class="hljs-title function_ invoke__"&gt;query&lt;/span&gt;(&lt;span class="hljs-string"&gt;&amp;#34;SELECT * FROM rightside&amp;#34;&lt;/span&gt;);
&lt;span class="hljs-keyword"&gt;while&lt;/span&gt;(&lt;span class="hljs-variable"&gt;$row&lt;/span&gt; = &lt;span class="hljs-variable"&gt;$sql&lt;/span&gt;-&amp;gt;&lt;span class="hljs-title function_ invoke__"&gt;objects&lt;/span&gt;(&lt;span class="hljs-string"&gt;&amp;#39;&amp;#39;&lt;/span&gt;,&lt;span class="hljs-variable"&gt;$query&lt;/span&gt;)) {
    &lt;span class="hljs-variable"&gt;$int&lt;/span&gt;[ &lt;span class="hljs-variable"&gt;$row&lt;/span&gt;-&amp;gt;id ] = &lt;span class="hljs-variable"&gt;$row&lt;/span&gt;-&amp;gt;id;
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (&lt;span class="hljs-variable"&gt;$row&lt;/span&gt;-&amp;gt;id &amp;gt; &lt;span class="hljs-variable"&gt;$max&lt;/span&gt;) {
        &lt;span class="hljs-variable"&gt;$max&lt;/span&gt; = &lt;span class="hljs-variable"&gt;$row&lt;/span&gt;-&amp;gt;id;
    }
}
                
&lt;span class="hljs-comment"&gt;// Find a random ID that has been used&lt;/span&gt;
&lt;span class="hljs-variable"&gt;$x&lt;/span&gt; = &lt;span class="hljs-literal"&gt;false&lt;/span&gt;;
&lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (&lt;span class="hljs-variable"&gt;$x&lt;/span&gt; == &lt;span class="hljs-literal"&gt;false&lt;/span&gt;) {
    &lt;span class="hljs-variable"&gt;$rand&lt;/span&gt; = &lt;span class="hljs-title function_ invoke__"&gt;rand&lt;/span&gt;(&lt;span class="hljs-number"&gt;0&lt;/span&gt;,&lt;span class="hljs-variable"&gt;$max&lt;/span&gt;);
    &lt;span class="hljs-keyword"&gt;foreach&lt;/span&gt; (&lt;span class="hljs-variable"&gt;$int&lt;/span&gt; &lt;span class="hljs-keyword"&gt;as&lt;/span&gt; &lt;span class="hljs-variable"&gt;$thing&lt;/span&gt;) {
         &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (&lt;span class="hljs-variable"&gt;$thing&lt;/span&gt; == &lt;span class="hljs-variable"&gt;$rand&lt;/span&gt;) {
 &lt;span class="hljs-variable"&gt;$x&lt;/span&gt; = &lt;span class="hljs-literal"&gt;true&lt;/span&gt;;
         }
    }
}

&lt;span class="hljs-variable"&gt;$query&lt;/span&gt; = &lt;span class="hljs-variable"&gt;$sql&lt;/span&gt;-&amp;gt;&lt;span class="hljs-title function_ invoke__"&gt;query&lt;/span&gt;(&lt;span class="hljs-string"&gt;&amp;#34;SELECT * FROM rightside WHERE id = &amp;#34;&lt;/span&gt;.&lt;span class="hljs-variable"&gt;$rand&lt;/span&gt;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We start by building an array. Then we query the database for all the content. We get all the rows and columns, butw e only are interested in one- the &lt;code&gt;id&lt;/code&gt;. We create a sparse array, where the index of the item is the item&amp;#39;s value. We also track the max.&lt;/p&gt;
&lt;p&gt;Once we&amp;#39;ve got that, we start a loop. Inside that loop, we generate a random number, check if it&amp;#39;s in our array by doing a foreach across the array, and if it is, we break the loop- we&amp;#39;ve found our random content. If it&amp;#39;s not, we keep trying until we score a hit.&lt;/p&gt;
&lt;p&gt;Finally, we construct our query with string concatenation and grab the content we want to display.&lt;/p&gt;
&lt;p&gt;Now, as a true confession, there&amp;#39;s an element of &lt;em&gt;caveat emptor&lt;/em&gt; here; if you&amp;#39;re hiring the kid from the local college and paying them a few bucks an hour, this is the kind of thing you get.&lt;/p&gt;
&lt;p&gt;Is the code terrible? Yes, even by early-00s PHP standards. Is it really DJ&amp;#39;s problem, though? No. I&amp;#39;d hope any of us would look back at the code we wrote when we were 19, and shudder. It means we&amp;#39;ve learned something in the interim.&lt;/p&gt;
&lt;p&gt;For this confession, I say there&amp;#39;s no need to atone. Hopefully everyone learned a lesson, especially the company trying to hire programmers on the cheap.&lt;/p&gt;
&lt;!-- Easy Reader Version: I still like TDWTF's solution, which if you hit the "random link" button in rapid succession (opening each in a new tab) you can outrun the random number generation and get the same article multiple times. --&gt;
&lt;style&gt;.comment { border: none; }&lt;/style&gt;&lt;div&gt;
	[Advertisement] Picking up &lt;b&gt;NuGet&lt;/b&gt; is easy. Getting good at it takes time. &lt;a href="https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf&amp;amp;utm_medium=Footerad&amp;amp;utm_campaign=nuget"&gt;Download our guide to learn the best practice of NuGet for the Enterprise.&lt;/a&gt;

&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;</description><slash:comments>14</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/a-random-article</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: The Date and Time and Time</title><link>https://thedailywtf.com/articles/the-date-and-time-and-time</link><category>CodeSOD</category><pubDate>Mon, 05 Oct 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/the-date-and-time-and-time</guid><description>&lt;p&gt;Today&amp;#39;s anonymous submitter sends us some legacy Java code.&lt;/p&gt;
&lt;p&gt;The task is this: check what time it is. And fortunately, even in the older Java datetime libraries that were &lt;em&gt;terrible&lt;/em&gt;, this was an easy task. You just needed to do something like &lt;code&gt;new Date()&lt;/code&gt;, which constructs a date time object set to the current time. &lt;code&gt;getTime()&lt;/code&gt; picks off just the time portion.&lt;/p&gt;
&lt;p&gt;Or, you could do this.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;&lt;span class="hljs-type"&gt;Timestamp&lt;/span&gt; &lt;span class="hljs-variable"&gt;current&lt;/span&gt; &lt;span class="hljs-operator"&gt;=&lt;/span&gt; &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;Timestamp&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;Date&lt;/span&gt;().getTime());
&lt;span class="hljs-type"&gt;Date&lt;/span&gt; &lt;span class="hljs-variable"&gt;date&lt;/span&gt; &lt;span class="hljs-operator"&gt;=&lt;/span&gt; &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;Date&lt;/span&gt;(current.getTime());
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This creates a date, picks the time off, populates a timestamp, gets the time from the timestamp, and constructs a new date object.&lt;/p&gt;
&lt;p&gt;The old Java date classes were awful, but they never needed you to do this. This is entirely home grown ugliness.&lt;/p&gt;
&lt;!-- Easy Reader Version: Though finding the docs for pre-Java 8 date time handling is actually hard now. People fled that as quickly as possible. --&gt;&lt;div&gt;
	&lt;img src="https://thedailywtf.com/images/inedo/buildmaster-icon.png" style="display:block; float: left; margin: 0 10px 10px 0;"/&gt; [Advertisement] 
	&lt;a href="https://inedo.com/BuildMaster?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Confidence&amp;amp;utm_campaign=Buildmaster_Footer"&gt;Utilize BuildMaster&lt;/a&gt; to release your software with confidence, at the pace your business demands. &lt;a href="https://inedo.com/BuildMaster/download?utm_source=tdwtf&amp;amp;utm_medium=footerad&amp;amp;utm_term=2018&amp;amp;utm_content=Confidence&amp;amp;utm_campaign=Buildmaster_Footer"&gt;Download&lt;/a&gt; today!  
&lt;/div&gt;
&lt;div style="clear: left;"&gt; &lt;/div&gt;
</description><slash:comments>9</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/the-date-and-time-and-time</wfw:comment></item></channel></rss>