<?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>Fri, 17 Apr 2026 03:21:25 GMT</lastBuildDate><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: We'll Hire Better Contractors Next Time, We Promise</title><link>https://thedailywtf.com/articles/we-ll-hire-better-contractors-next-time-we-promise</link><category>CodeSOD</category><pubDate>Thu, 16 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/we-ll-hire-better-contractors-next-time-we-promise</guid><description>&lt;p&gt;&lt;strong&gt;Nona&lt;/strong&gt; writes: &amp;#34;this is the beginning of a 2100 line function.&amp;#34;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s bad. Nona didn&amp;#39;t send us the entire JavaScript function, but sent us just the three early lines, which definitely raise concerns:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-javascript"&gt;&lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (res.&lt;span class="hljs-property"&gt;length&lt;/span&gt; &amp;gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;) {
  &lt;span class="hljs-keyword"&gt;await&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;function&lt;/span&gt; (&lt;span class="hljs-params"&gt;&lt;/span&gt;) {
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-title class_"&gt;Promise&lt;/span&gt;(&lt;span class="hljs-function"&gt;(&lt;span class="hljs-params"&gt;resolve, reject&lt;/span&gt;) =&amp;gt;&lt;/span&gt; {
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We await a synchronous function which retuns a promise, passing a function to the promise. As a general rule, you don&amp;#39;t construct promises directly, you let asynchronous code generate them and pass them around (or await them). It&amp;#39;s not a thing you &lt;em&gt;never&lt;/em&gt; do, but it&amp;#39;s certainly suspicious. It gets more problematic when Nona adds:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This function happens to contain multiple code repetition snippets, including these three lines.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That&amp;#39;s right, this little block appears multiple times in the function, &lt;em&gt;inside&lt;/em&gt; of anonymous function getting passed to the &lt;code&gt;Promise&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;No, the code does not work in its current state. It&amp;#39;s unclear what the 2100 line function was supposed to do. And yes, this was written by lowest-bidder third-party contractors.&lt;/p&gt;
&lt;p&gt;Nona adds:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am numb at this point and know I gotta fix it or we lose contracts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Management made the choice to &amp;#34;save money&amp;#34; by hiring third parties, and now Nona&amp;#39;s team gets saddled with all the crunch to fix the problems created by the &amp;#34;savings&amp;#34;.&lt;/p&gt;
&lt;!-- Easy Reader Version: "lowest bidder" plans to make as much, if not more profit, than the highest bidder- they just plan to spend way less doing it. --&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/we-ll-hire-better-contractors-next-time-we-promise</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Three Letter Acronyms, Four Letter Words</title><link>https://thedailywtf.com/articles/three-letter-acronyms-four-letter-words</link><category>CodeSOD</category><pubDate>Wed, 15 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/three-letter-acronyms-four-letter-words</guid><description>&lt;p&gt;&lt;strong&gt;Candice&lt;/strong&gt; (&lt;a href="https://thedailywtf.com/articles/negative-creep"&gt;previously&lt;/a&gt;) has another WTF to share for us.&lt;/p&gt;
&lt;p&gt;We&amp;#39;re going to start by just looking at one fragment of a class defined in this C++ code: &lt;code&gt;TLAflaList&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Every type and variable has a three-letter-acronym buried in its name. The specific meaning of most of the acronyms are mostly lost to time, so &amp;#34;TLA&amp;#34; is as good as any other three random letters. No one knows what &amp;#34;fla&amp;#34; is.&lt;/p&gt;
&lt;p&gt;What drew Candice&amp;#39;s attention was that there was a type called &amp;#34;list&amp;#34;, which implies they&amp;#39;re maybe not using the standard library and have reinvented a wheel. Another data point arguing in favor of that is that the class had a method called &lt;code&gt;getNumElements&lt;/code&gt;, instead of something more conventional like &lt;code&gt;size&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s look at that function:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cpp"&gt;&lt;span class="hljs-function"&gt;&lt;span class="hljs-type"&gt;size_t&lt;/span&gt; &lt;span class="hljs-title"&gt;TLAflaList::getNumElements&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt;
&lt;/span&gt;{
	&lt;span class="hljs-keyword"&gt;return&lt;/span&gt; mv_FLAarray.&lt;span class="hljs-built_in"&gt;size&lt;/span&gt;();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In addition to the meaningless three-letter-acronyms which start every type and variable, we&amp;#39;re also adding on a lovely bit of hungarian notation, throwing &lt;code&gt;mv_&lt;/code&gt; on the front for a member variable. The variable is called &amp;#34;array&amp;#34;, but &lt;em&gt;is&lt;/em&gt; it? Let&amp;#39;s look at that definition.&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;TLAflaList&lt;/span&gt;
{
	…
	&lt;span class="hljs-keyword"&gt;private&lt;/span&gt;:
		TLAflaArray_t mv_FLAarray;
		…
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Okay, that gives me a lot more nonsense letters but I still have no idea what that variable is. Where&amp;#39;s that type defined? The good news, it&amp;#39;s in the same header.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cpp"&gt;&lt;span class="hljs-keyword"&gt;typedef&lt;/span&gt; std::vector&amp;lt;INtabCRMprdinvusage_t*&amp;gt; TLAflaArray_t;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So it&amp;#39;s not a list or an array, it&amp;#39;s a vector. A vector of bare pointers, which definitely makes me worry about inevitable use-after-free errors or memory leaks. Who owns the memory that those pointers are referencing?&lt;/p&gt;
&lt;p&gt;&amp;#34;IN&amp;#34; in the type name is an old company, good ol&amp;#39; Initrode, which got acquired a decade ago. &amp;#34;tab&amp;#34; tells us that it&amp;#39;s meant to be a database table. We can guess at the rest.&lt;/p&gt;
&lt;p&gt;This isn&amp;#39;t a codebase, it&amp;#39;s a bad Scrabble hand. It&amp;#39;s also a trainwreck. Confusing, disorganized, and all of that made worse by piles of &lt;code&gt;typedef&lt;/code&gt;s that hide what you&amp;#39;re actually doing and endless acronyms that make it impossible to read.&lt;/p&gt;
&lt;p&gt;One last detail, which I&amp;#39;ll let Candice explain:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I started scrolling down the class definition - it took longer than it should have, given that the company coding style is to double-space the overwhelming majority of lines.  (Seriously; I&amp;#39;ve seen single character braces sandwiched by two lines of nothing.)  On the upside, this was one of the classes with just one public block and one private block - some classes like to ping-pong back and forth a half-dozen times.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!-- ERV: WTFBBQ TMAMCUAIR? --&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>18</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/three-letter-acronyms-four-letter-words</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>A Hole in Your Plan</title><link>https://thedailywtf.com/articles/a-hole-in-your-plan</link><category>Feature Articles</category><pubDate>Tue, 14 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/a-hole-in-your-plan</guid><description>&lt;p&gt;&lt;strong&gt;Theresa&lt;/strong&gt; works for a company that handles a fair bit of personally identifiable information that can be tied to health care data, so for them, security matters. They need to comply with security practices laid out by a variety of standards bodies and be able to demonstrate that compliance.&lt;/p&gt;
&lt;p&gt;There&amp;#39;s a dirty secret about standards compliance, though. Most of these standards are trying to avoid being overly technically prescriptive. So frequently, they may have something like, &amp;#34;a process must exist for securely destroying storage devices before they are disposed of.&amp;#34; Maybe it will include some examples of what you could do to meet this standard, but the important thing is that you have to have a &lt;em&gt;process&lt;/em&gt;. This means that if you whip up a Word document called &amp;#34;Secure Data Destruction Process&amp;#34; and tell people they should follow it, you can check off that box on your compliance. Sometimes, you need to validate the process; sometimes you need to have other processes which ensure this process is being followed. What you need to do and to what complexity depends on the compliance structure you&amp;#39;re beholden to. Some of them are surprisingly flexible, which is a polite way of saying &amp;#34;mostly meaningless&amp;#34;.&lt;/p&gt;
&lt;p&gt;Theresa&amp;#39;s company has a process for safely destroying hard drives. They even validated it, shortly after its introduction. They even have someone who checks that the process has been followed. The process is this: in the basement, someone set up a cheap drill press, and attached a wooden jig to it. You slap the hard drive in the jig, turn on the drill, and brrrrzzzzzz- poke a hole through the platters making the drive unreadable.&lt;/p&gt;
&lt;p&gt;There&amp;#39;s just one problem with that process: the company recently switched to using SSDs. The SSDs are in a carrier which makes them share the same form factor as old-style spinning disk drives, but that&amp;#39;s just a thin plastic shell. The actual electronics package where the data is stored is quite small. Small enough, and located in a position where the little jig attached to the drill guarantees that the drill won&amp;#39;t even touch the SSD at all.&lt;/p&gt;
&lt;p&gt;For months now, whenever a drive got decommissioned, the IT drone responsible for punching a hole through it has just been drilling through plastic, and nothing else. An unknown quantity of hard drives have been sent out for recycling with PII and health data on them. But it&amp;#39;s okay, because &lt;em&gt;the process was followed&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The compliance team at the company will update the process, probably after six months of meetings and planning and approvals from all of the stakeholders. Though it may take longer to glue together a new jig for the SSDs.&lt;/p&gt;
&lt;!-- Easy Reader Version: On the flip side, some standards are weirdly prescriptive, like requiring a hardware firewall between sections of the network, down to the specific brands allowed. --&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>39</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/a-hole-in-your-plan</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Non-cogito Ergo c_str</title><link>https://thedailywtf.com/articles/non-cogito-ergo-c-str</link><category>CodeSOD</category><pubDate>Mon, 13 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/non-cogito-ergo-c-str</guid><description>&lt;p&gt;&lt;strong&gt;Tim&lt;/strong&gt; (&lt;a href="https://thedailywtf.com/articles/expressing-a-leak"&gt;previously&lt;/a&gt;) supports a relatively ancient C++ application. And that creates some interesting conundrums, as the way you wrote C++ in 2003 is not the way you would write it even a few years later. The standard matured quickly.&lt;/p&gt;
&lt;p&gt;Way back in 2003, it was still common to use C-style strings, instead of the C++ &lt;code&gt;std::string&lt;/code&gt; type. It seems silly, but people had Strong Opinions™ about using standard library types, and much of your C++ code was probably interacting with C libraries, so yeah, C-strings stuck around for a long time.&lt;/p&gt;
&lt;p&gt;For Tim&amp;#39;s company, however, the migration away from C-strings was in 2007.&lt;/p&gt;
&lt;p&gt;So they wrote 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;strncmp&lt;/span&gt;( pdf-&amp;gt;&lt;span class="hljs-built_in"&gt;symTabName&lt;/span&gt;().&lt;span class="hljs-built_in"&gt;c_str&lt;/span&gt;(), prefix.&lt;span class="hljs-built_in"&gt;c_str&lt;/span&gt;(), &lt;span class="hljs-built_in"&gt;strlen&lt;/span&gt;( prefix.&lt;span class="hljs-built_in"&gt;c_str&lt;/span&gt;() ) ) ) {
    &lt;span class="hljs-comment"&gt;// do stuff&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is doing a &amp;#34;starts with&amp;#34; check. &lt;code&gt;strncmp&lt;/code&gt;, &lt;code&gt;strlen&lt;/code&gt; are both functions which operate on C-strings. So we compare the &lt;code&gt;symTabName&lt;/code&gt; against the &lt;code&gt;prefix&lt;/code&gt;, but only look at as many characters as are in the prefix. As is common, &lt;code&gt;strncmp&lt;/code&gt; returns 0 if the two strings are equal, so we negate that to say &amp;#34;if the &lt;code&gt;symTabName&lt;/code&gt; starts with &lt;code&gt;prefix&lt;/code&gt;, do stuff&amp;#34;.&lt;/p&gt;
&lt;p&gt;In C code, this is very much how you would do this, though you might contemplate turning it into a function. Though maybe not.&lt;/p&gt;
&lt;p&gt;In C++, in 2007, you &lt;em&gt;do not&lt;/em&gt; have a built-in &lt;code&gt;starts_with&lt;/code&gt; function- you have to wait until the C++20 standard for that- but you have some string handling functions which could make this more clear. As Tim points out, the &amp;#34;correct&amp;#34; answer is: &lt;code&gt;if(pdf-&amp;gt;symTabName().find(prefix) != 0UL)&lt;/code&gt;. It&amp;#39;s more readable, it doesn&amp;#39;t involve poking around with &lt;code&gt;char*&lt;/code&gt;s, and also isn&amp;#39;t spamming that extra whitespace between every parenthesis and operator.&lt;/p&gt;
&lt;p&gt;Tim writes: &amp;#34;String handling in C++ is pretty terrible, but it doesn&amp;#39;t have to be this terrible.&amp;#34;&lt;/p&gt;
&lt;!-- Easy Reader Version: Strings were a mistake. We shouldn't use text to communicate anymore. Let LLMs do that, we can just use pure numbers and mathematics. --&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>23</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/non-cogito-ergo-c-str</wfw:comment></item><item><dc:creator>Lyle Seaman</dc:creator><title>Error'd: Youth is Wasted on the Junge</title><link>https://thedailywtf.com/articles/youth-is-wasted-on-the-junge</link><category>Error'd</category><pubDate>Fri, 10 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/youth-is-wasted-on-the-junge</guid><description>&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;#34;My thoughts exactly&amp;#34; muttered 
&lt;strong&gt;Jason H.&lt;/strong&gt;
&amp;#34;I was in a system that avoids check constraints and
the developers never seemed to agree to a T/F or
Y/N or 1/0 for indicator columns. All data in a
column will use the same pattern but different columns in
the same table will use different patterns so I&amp;#39;m not
sure why I was surprised when I came across the
attached. Sort the data descending and you have the shorthand
for what I uttered.&amp;#34; How are these all unique?
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#4af53c55b8564b34a6f12916571c92fd"&gt;&lt;img itemprop="image" border="0" alt="4af53c55b8564b34a6f12916571c92fd" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/4af53c55b8564b34a6f12916571c92fd.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;
&amp;#34;I&amp;#39;d better act quickly!&amp;#34;
&lt;strong&gt;Hugh Scenic&lt;/strong&gt; almost panicked.
&amp;#34;This Microsoft Rewards offer might
expire (in just under 74 years)!&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#50a5533b37f54e6ebbfc460136507205"&gt;&lt;img itemprop="image" border="0" alt="50a5533b37f54e6ebbfc460136507205" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/50a5533b37f54e6ebbfc460136507205.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;#34;Copy-copy-copy&amp;#34; repeated 
&lt;strong&gt;Gordon&lt;/strong&gt;.
&amp;#34;Not sure I want the team to be in touch
- my query might be best left unanswered.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#617f1082b64f442aa146e47115c5b6fa"&gt;&lt;img itemprop="image" border="0" alt="617f1082b64f442aa146e47115c5b6fa" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/617f1082b64f442aa146e47115c5b6fa.jpeg"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;
&amp;#34;Was Comcast&amp;#39;s episode guide data hacked by MAGA?&amp;#34;
&lt;strong&gt;Barry M.&lt;/strong&gt;
wondered. &amp;#34;This is
not the usual generic description of Real Time.&amp;#34; 
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#6af551a6d02e417eb4d0fb3470f8fbb1"&gt;&lt;img itemprop="image" border="0" alt="6af551a6d02e417eb4d0fb3470f8fbb1" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/6af551a6d02e417eb4d0fb3470f8fbb1.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;#34;&lt;strong&gt;Holiday Workshop for Children&lt;/strong&gt;
learning how to write web pages, apparently,&amp;#34; notes self-named 
&lt;strong&gt;Youth P.&lt;/strong&gt;
&amp;#34;You need a new category - because it is no
error to involve young people in a
web design workshop during their holidays. A little bit of
a surprise was that it will happen in a local
museum, and that children between 8 and 12 are the
target audience - should they really already think about their
work future?&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#c3cced1e818d499ea652a80a7d1cbc71"&gt;&lt;img itemprop="image" border="0" alt="c3cced1e818d499ea652a80a7d1cbc71" src="https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/c3cced1e818d499ea652a80a7d1cbc71.jpeg"/&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/youth-is-wasted-on-the-junge</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Take a Percentage</title><link>https://thedailywtf.com/articles/take-a-percentage</link><category>CodeSOD</category><pubDate>Thu, 09 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/take-a-percentage</guid><description>&lt;p&gt;When looking at the source of a major news site, today&amp;#39;s anonymous submitter sends us this very, very mild, but also very funny WTF:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-html"&gt;	&lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-name"&gt;div&lt;/span&gt; &lt;span class="hljs-attr"&gt;class&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;g-vhs g-videotape g-cinemagraph&amp;#34;&lt;/span&gt; &lt;span class="hljs-attr"&gt;id&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;g-video-178_article_slug-640w&amp;#34;&lt;/span&gt;
		 &lt;span class="hljs-attr"&gt;data-type&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;videotape&amp;#34;&lt;/span&gt; &lt;span class="hljs-attr"&gt;data-asset&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;https://somesite.com/videos/file.mp4&amp;#34;&lt;/span&gt; &lt;span class="hljs-attr"&gt;data-cinemagraph&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;true&amp;#34;&lt;/span&gt; &lt;span class="hljs-attr"&gt;data-allow-multiple-players&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;true&amp;#34;&lt;/span&gt;
		 &lt;span class="hljs-attr"&gt;data-vhs-options&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#39;{&amp;#34;ratio&amp;#34;:&amp;#34;560:320&amp;#34;}&amp;#39;&lt;/span&gt;
		 &lt;span class="hljs-attr"&gt;style&lt;/span&gt;=&lt;span class="hljs-string"&gt;&amp;#34;padding-bottom: 57.14285714285714%&amp;#34;&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Look, I know that percentage was calculated by JavaScript, or maybe the backend, or maybe calculated by a CSS pre-processor. No human typed that. There&amp;#39;s nothing to gain by adding a rounding operation. There&amp;#39;s nothing truly &lt;em&gt;wrong&lt;/em&gt; with that line of code.&lt;/p&gt;
&lt;p&gt;But I can&amp;#39;t help but think about the comedic value in controlling your page layout down to sub-sub-sub-sub-sub-sub-sub-sub-pixel precision. This code will continue to have pixel accuracy out to screens with quadrillions of pixels, making it incredibly future proof.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s made extra funny by calling the video player &lt;code&gt;VHS&lt;/code&gt; and suggesting the appropriate ratio is 560 pixels by 320- which is not &lt;em&gt;quite&lt;/em&gt; 16:9, but is a frequent letterbox ratio on DVD prints of movies.&lt;/p&gt;
&lt;p&gt;In any case, I eagerly await a 20-zetta-pixel displays, so I can read the news in its intended glory.&lt;/p&gt;
&lt;!-- Easy Reader Version: I bet the person responsible has memorized all the digits of pi --&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>19</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/take-a-percentage</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Two Conversions</title><link>https://thedailywtf.com/articles/two-conversions</link><category>CodeSOD</category><pubDate>Wed, 08 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/two-conversions</guid><description>&lt;p&gt;The father of the &amp;#34;billion dollar mistake&amp;#34; &lt;a href="https://en.wikipedia.org/wiki/Tony_Hoare"&gt;left us&lt;/a&gt; last month. His pointer is finally null. Speaking of null handling, &lt;strong&gt;Randy&lt;/strong&gt; says he was &amp;#34;spelunking&amp;#34; through his codebase and found this pair of functions, which handles null.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;&lt;span class="hljs-keyword"&gt;public&lt;/span&gt; String &lt;span class="hljs-title function_"&gt;getDataString&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; {
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (dataString == &lt;span class="hljs-literal"&gt;null&lt;/span&gt;) {
        &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; Constants.NOT_AVAILABLE;
    }
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; asUnicode(dataString);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I assume &lt;code&gt;Constants.NOT_AVAILABLE&lt;/code&gt; is an empty string, or something similar. It&amp;#39;s reasonable to convert a null into something like that. I don&amp;#39;t know where this fits in the overall stack; I&amp;#39;m of the mind that you should retain the null until you absolutely can&amp;#39;t anymore; like it or not, a &lt;code&gt;null&lt;/code&gt; means something different than an empty string. Or, if we&amp;#39;re going that far, we should be talking about using &lt;code&gt;Optional&lt;/code&gt; or nullable types.&lt;/p&gt;
&lt;p&gt;But that call to &lt;code&gt;asUnicode&lt;/code&gt; seems curious. What&amp;#39;s happening in there?&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;&lt;span class="hljs-keyword"&gt;private&lt;/span&gt; String &lt;span class="hljs-title function_"&gt;asUnicode&lt;/span&gt;&lt;span class="hljs-params"&gt;(String rawValue)&lt;/span&gt; {
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (rawValue != &lt;span class="hljs-literal"&gt;null&lt;/span&gt;) {
        &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; HtmlUtils.htmlUnescape(rawValue);
    }
    &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; {
        &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; rawValue;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function, which is only called from &lt;code&gt;getDataString&lt;/code&gt;, checks for a null. Which we know it won&amp;#39;t get, but it checks anyway. If it isn&amp;#39;t null, we unescape it. If it is null, we return that null.&lt;/p&gt;
&lt;p&gt;Well, I suppose that fits my rule of &amp;#34;retaining the null&amp;#34;, but like, in the worst way you could do it. It honestly feels like, if the &amp;#34;swap the null for an empty string&amp;#34; happens anywhere, it should happen &lt;em&gt;here&lt;/em&gt;. If I ask for the unescaped version of a null string, an empty string is a reasonable return. That makes more sense that doing it in a property getter.&lt;/p&gt;
&lt;p&gt;This code isn&amp;#39;t a trainwreck, but it makes things confusing. Maybe it&amp;#39;s because I&amp;#39;ve been doing a &lt;em&gt;lot&lt;/em&gt; of refactoring lately, but confusing code with unclear boundaries between functions is a raw nerve for me right now, and this particular example is stepping on that nerve.&lt;/p&gt;
&lt;p&gt;While we&amp;#39;re talking about unclear boundaries, I object to the idea that this class is storing &lt;code&gt;dataString&lt;/code&gt; as an HTML escaped string that we unescape any time we want to look at it. It implies that there&amp;#39;s some confusion about which representation is the canonical one: unescaped or escaped. We should store &lt;em&gt;the canonical&lt;/em&gt; one, which I think is unescaped. We should only escape it at the point where we&amp;#39;re sending it into an HTML document (or similar). Convert &lt;em&gt;at the module boundary&lt;/em&gt;, not just any time you want to look at a string.&lt;/p&gt;
&lt;!-- Easy Reader Version: "convert at module boundaries" seems like too tall a demand for a lot of developers --&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>15</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/two-conversions</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Proper Property Validation</title><link>https://thedailywtf.com/articles/proper-property-validation</link><category>CodeSOD</category><pubDate>Tue, 07 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/proper-property-validation</guid><description>&lt;p&gt;&lt;strong&gt;Tim H&lt;/strong&gt; inherited some code which has objects that have many, many properties properties on them. Which is bad. That clearly has no cohesion. But it&amp;#39;s okay, there&amp;#39;s a validator function which confirms that object is properly populated.&lt;/p&gt;
&lt;p&gt;The conditions and body of the conditionals have been removed, so we can see what the flow of the code looks like.&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-keyword"&gt;if&lt;/span&gt; (...) {

    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {

    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    } &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; (...) {
        
    }
} &lt;span class="hljs-keyword"&gt;else&lt;/span&gt; {
  &lt;span class="hljs-comment"&gt;// default&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It&amp;#39;s important to note that this conditional doesn&amp;#39;t validate &lt;em&gt;every&lt;/em&gt; property on the object. Just most of them.&lt;/p&gt;
&lt;p&gt;Even with autocomplete I feel like this is going to make you wear out your &amp;#34;{&amp;#34; key.&lt;/p&gt;
&lt;!-- Easy Reader Version: Too many properties --&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>26</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/proper-property-validation</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: The Update Route</title><link>https://thedailywtf.com/articles/the-update-route</link><category>CodeSOD</category><pubDate>Mon, 06 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/the-update-route</guid><description>&lt;p&gt;Today&amp;#39;s anonymous submission is one of the entries where I look at it and go, &amp;#34;Wait, that&amp;#39;s totally wrong, that could have never worked.&amp;#34; And then I realize, that&amp;#39;s &lt;em&gt;why&lt;/em&gt; it was submitted: it was absolutely broken code which got to production, &lt;em&gt;somehow&lt;/em&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-javascript"&gt;&lt;span class="hljs-title class_"&gt;Collection&lt;/span&gt;.&lt;span class="hljs-title function_"&gt;updateOne&lt;/span&gt;(query, update, &lt;span class="hljs-keyword"&gt;function&lt;/span&gt;(&lt;span class="hljs-params"&gt;err, result, next&lt;/span&gt;)=&amp;gt;{
&lt;span class="hljs-keyword"&gt;if&lt;/span&gt;(err) &lt;span class="hljs-title function_"&gt;next&lt;/span&gt;(err)
...
})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, &lt;code&gt;Collection.updateOne&lt;/code&gt; is an API method for MongoDB. It takes three parameters: a filter to find the document, an update to perform on the document, and then an object containing other parameters to control how that update is done.&lt;/p&gt;
&lt;p&gt;So this code is simply &lt;em&gt;wrong&lt;/em&gt;. But it&amp;#39;s worse than that, because it&amp;#39;s wrong in a stupid way.&lt;/p&gt;
&lt;p&gt;When creating routes using ExpressJS, you define a route and a callback to handle the route. The callback takes a few parameters: the request the browser sent, the result we&amp;#39;re sending back, and a next function, which lets you have multiple callbacks attached to the same route. By invoking &lt;code&gt;next()&lt;/code&gt; you&amp;#39;re passing control to the &lt;em&gt;next&lt;/em&gt; callback in the chain.&lt;/p&gt;
&lt;p&gt;So what we have here is either an absolute brain fart, or more likely, a find-and-replace failure. A route handling callback got mixed in with database operations (which, as an aside, if your route handling code is anywhere near database code, you&amp;#39;ve also made a &lt;em&gt;horrible&lt;/em&gt; mistake). The result is a line of code that doesn&amp;#39;t work. And then someone released this non-working code into production.&lt;/p&gt;
&lt;p&gt;Our submiter writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This blew up our logs today, has been in the code since 2019. I removed it in a handful of other places too.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which raises the other question: why didn&amp;#39;t this blow up the logs &lt;em&gt;earlier&lt;/em&gt;?&lt;/p&gt;
&lt;!-- Easy Reader Version: Obviously diseased code released in 2019. Is this where COVID came from? --&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>8</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/the-update-route</wfw:comment></item><item><dc:creator>Lyle Seaman</dc:creator><title>Error'd: Clever domain name here</title><link>https://thedailywtf.com/articles/clever-domain-name-here</link><category>Error'd</category><pubDate>Fri, 03 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/clever-domain-name-here</guid><description>&lt;p&gt;
&lt;/p&gt;

&lt;p&gt;An anonymous cable-puller wrote 
&amp;#34;Reading a long specification manual.
The words &amp;#34;shall&amp;#34; and &amp;#34;shall not&amp;#34; have specific meaning,
and throughout the document are in bold italic. Looks
like someone got a bit shall-ow with their search-and-replace
skills.&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#2"&gt;&lt;img itemprop="image" border="0" alt="2" src="https://d3hvi6t161kfmf.cloudfront.net/images/24/q1/318/search_and_replace1.png"/&gt;
&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Picki 
&lt;strong&gt;jeffphi
&lt;/strong&gt; attends to details.
&amp;#34;Apparently this recruiter doesn&amp;#39;t have a goal or metric
around proper brace selection and matching.&amp;#34; You&amp;#39;re hired.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#0"&gt;&lt;img itemprop="image" border="0" alt="0" src="https://d3hvi6t161kfmf.cloudfront.net/images/24/q1/318/recruitingbraces1.png"/&gt;
&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;
&lt;strong&gt;UGG.LI admins
&lt;/strong&gt; highlighted
&amp;#34;even KFC hat Breakpoints deployed in Prod now ...&amp;#34;
I wanted to say something funny about Herren Admins&amp;#39; Handle
but reminded myself of John Scalzi&amp;#39;s quote about the
failure case of smartass so I refrained. You might be funnier than I.
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#1"&gt;&lt;img itemprop="image" border="0" alt="1" src="https://d3hvi6t161kfmf.cloudfront.net/images/24/q1/318/kfs_creakpoinrt1.jpeg"/&gt;
&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Smarter still,
&lt;strong&gt;Steve
&lt;/strong&gt; says 
&amp;#34;A big company like Google surely has a huge QA staff and AI bots to make sure embarrassing typos don&amp;#39;t slip through, right? You wouldn&amp;#39;t want to damage you reputation...&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#3"&gt;&lt;img itemprop="image" border="0" alt="3" src="https://d3hvi6t161kfmf.cloudfront.net/images/24/q1/318/yougoogle1.jpeg"/&gt;
&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I&amp;#39;ll bet 
&lt;strong&gt;Pascal
&lt;/strong&gt; didn&amp;#39;t expect this, eh?
&amp;#34;Delivered, but On the way, Searching for a driver, but Asdrubal&amp;#34;
&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="#4"&gt;&lt;img itemprop="image" border="0" alt="4" src="https://d3hvi6t161kfmf.cloudfront.net/images/24/q1/318/202603151b1.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>11</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/clever-domain-name-here</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: One Case</title><link>https://thedailywtf.com/articles/one-case</link><category>CodeSOD</category><pubDate>Thu, 02 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/one-case</guid><description>&lt;p&gt;I feel like we&amp;#39;ve gotten a few SQL case statement abuses recently, but a properly bad one continues to tickle me. &lt;strong&gt;Ken C&lt;/strong&gt; sends us one that, well:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-sql"&gt;&lt;span class="hljs-keyword"&gt;SELECT&lt;/span&gt; &lt;span class="hljs-keyword"&gt;CASE&lt;/span&gt; h.DOCUMENTTYPE
        &lt;span class="hljs-keyword"&gt;WHEN&lt;/span&gt; &lt;span class="hljs-number"&gt;2&lt;/span&gt; &lt;span class="hljs-keyword"&gt;THEN&lt;/span&gt; &lt;span class="hljs-number"&gt;3&lt;/span&gt; &lt;span class="hljs-keyword"&gt;WHEN&lt;/span&gt; &lt;span class="hljs-number"&gt;3&lt;/span&gt; &lt;span class="hljs-keyword"&gt;THEN&lt;/span&gt; &lt;span class="hljs-number"&gt;4&lt;/span&gt; &lt;span class="hljs-keyword"&gt;WHEN&lt;/span&gt; &lt;span class="hljs-number"&gt;4&lt;/span&gt; &lt;span class="hljs-keyword"&gt;THEN&lt;/span&gt; &lt;span class="hljs-number"&gt;5&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;WHEN&lt;/span&gt; &lt;span class="hljs-number"&gt;5&lt;/span&gt; &lt;span class="hljs-keyword"&gt;THEN&lt;/span&gt; &lt;span class="hljs-number"&gt;6&lt;/span&gt; &lt;span class="hljs-keyword"&gt;WHEN&lt;/span&gt; &lt;span class="hljs-number"&gt;6&lt;/span&gt; &lt;span class="hljs-keyword"&gt;THEN&lt;/span&gt; &lt;span class="hljs-number"&gt;7&lt;/span&gt; &lt;span class="hljs-keyword"&gt;WHEN&lt;/span&gt; &lt;span class="hljs-number"&gt;7&lt;/span&gt; &lt;span class="hljs-keyword"&gt;THEN&lt;/span&gt; &lt;span class="hljs-number"&gt;8&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;ELSE&lt;/span&gt; h.DOCUMENTTYPE
    &lt;span class="hljs-keyword"&gt;END&lt;/span&gt; &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; DocumentType,
    h.DOCNMBR &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; DocNmbr,
    h.FULLPOLICY &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; FullPolicy,
    h.BATCHID &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; BatchId,
    h.OrigBatchId,
    h.UPDATEDDATE &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; UpdatedDate,
    h.CUSTOMERNO &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; CustomerNo,
    h.PROJECTID &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; ProjectID,
    h.AMOUNT &lt;span class="hljs-keyword"&gt;AS&lt;/span&gt; Amount
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On one hand, I can&amp;#39;t say &amp;#34;just add one&amp;#34;, because clearly sometimes they don&amp;#39;t want to add one. On the other hand, there&amp;#39;s an element of looking at this and knowing: well, something absolutely stupid has happened here. Maybe it was two disjoint databases getting merged. Maybe it was just once upon a time, when this database was a spreadsheet, the user responsible did a weird thing. Maybe some directive changed the document type numbering. Hell, maybe that &lt;code&gt;ELSE&lt;/code&gt; clause never gets triggered, and we actually could just do arithmetic.&lt;/p&gt;
&lt;!-- Easy Reader Version: I don't know, isn't this kinda close to how Russell derived integers from sets? IDK, I didn't actually read Russell. --&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>31</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/one-case</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>Corporate Language Compliance Generator</title><link>https://thedailywtf.com/articles/corporate-language-compliance-generator</link><category>Feature Articles</category><pubDate>Wed, 01 Apr 2026 08:00:00 GMT</pubDate><guid>https://thedailywtf.com/articles/corporate-language-compliance-generator</guid><description>&lt;p&gt;You&amp;#39;ve already &lt;a href="https://thedailywtf.com/articles/corporate-language-compliance"&gt;read the longer&lt;/a&gt; version. You need a quick phrase of corpo-speak to distract and confuse your rivals. Here&amp;#39;s the generator for doing that: &lt;/p&gt;

&lt;div style="border: 1px solid black; text-align: center"&gt;
        &lt;h3 id="generated"&gt;&lt;/h3&gt;
        &lt;button id="generate"&gt;Generate&lt;/button&gt;
    &lt;/div&gt;
    &lt;script&gt;
        class Replacement
{
    constructor(text)
    {
        this.tokens = text.split(" ");
    }
}

class Rule
{
    constructor()
    {
        this.replacements = [];
    }

    addReplacement(text)
    {
        const opts = text.split("|");
        opts.forEach((o) =&gt; this.replacements.push(new Replacement(o)));
    }

    choose()
    {
        return this.replacements[Math.floor(Math.random()*this.replacements.length)];
    }
}

class Grammar
{
    constructor()
    {
        this.rules = {};
    }

    setStart(token)
    {
        this.start = token;
    }

    addRule(token,text) 
    {
        if (!this.rules[token])
        {
            this.rules[token] = new Rule();
        }
        this.rules[token].addReplacement(text);
        return this;
    }

    addRules(token,sepText)
    {
        sepText.split("|").forEach(text =&gt; {
            this.addRule(token, text);
        });
    }

    generate(token)
    {
        if (this.rules[token])
        {
            const nextVal = this.rules[token].choose();
            let res = [];
            nextVal.tokens.forEach(token =&gt; {
                res = res.concat(this.generate(token));
            });
            return res;
        }
        return [token];
    }

    phrase()
    {
        return this.generate(this.start);
    }
}
class UI
{
    constructor(grammar)
    {
        this.button = document.getElementById("generate");
        this.content = document.getElementById("generated");
        const callback = () =&gt; {
            const text = grammar.phrase();
            let joined = text.join(" ");
            joined = joined.replace(/ ,/g, ",");
            this.content.innerHTML = joined;
        }
        this.button.addEventListener("click", callback);
        callback();
    }
}
    &lt;/script&gt;
    &lt;script&gt;
        let g = new Grammar();
        g
            .addRule("!mission", "Our goal|Our objective|Our stance|Our culture|Our mission|Our ethos|Our call to arms|Our essence|Our scent")
            .addRule("!missions", "!mission|!mission and !submission")
            .addRule("!visions", "vision|perspective|orientation|clear-sight|foresight|over-the-horizon planning|clear-eyed self-assessments")
            .addRule("!submission", "raison 'd etre|purpose|customer-focused soul|!withs powered !visions")
            .addRule("!is_that", "is that by|is by|demands that|expands over our")
            .addRule("!prep", "in|with|onto|into|without")
            .addRule("!bleeding", "technology|values|timelines|commitment|redundancy|credentialing")
            .addRule("!withs", "AI|creativity|the ubermensch|prestige|the latest technology|user-enabling|bleeding edge !bleeding|blockchain|NFTs")
            .addRule("!action", "leveraging|powering|working|engaging|bandwidth-widening|agentifying|vision questing|covering all the bases|solving|absorbing|communing|joining")
            .addRule("!action", "actioning|emoting|crafting|forging|manifesting|demonstrating|advocating|willing|engaging Nietzschean will-to-powering")
            .addRule("!action", "pressure testing|getting in the tent|saving|drumming our own beat|enabling|blue-skying")
            .addRule("!target", "core competencies|synergies|cross-collateralization|blue-sky thinking|best practices|vision|impact|target|low hanging fruit")
            .addRule("!target", "foundation|ideation|idea generation|lead generation|pull|bank accounts|shareholder-value|new domains|the whales")
            .addRule("!target_mods", "cradle-to-grave|balanced|cross back|high-value|high-impact|maximalizing|throughput-maxxing|reinvented|collaborational|optimized")
            .addRule("!target_mods", "withholding|full-ecosystem|cross-functional|network-oriented|cross-paradigm|growth-hacking|disruption|appropriate|gravitational")
            .addRule("!targets", "!target|!adjective !target|!target_mods !target|!target and !targets")
            .addRule("!adjective", "open|wide|smart|enabled|agentic|AI-first|AI-forward|fifth-sigma|forward looking|future-proof|optimized|four-quadrant")
            .addRule("!adjective", "vast|moatified|inverted|AI-enabled|LLM-driven|agent-driven|paradigmatic|pragmatic|blue-sky|open doored|window-oriented|maximizing")
            .addRule("!adverb", "markedly|vastly|smartly|synergistically|agentically|cooly|vapidly|rapidly|overwhelmingly|abstractly|inherently|value-balancingly")
            .addRule("!adverb", "disruptively")
            .addRule("!actions", "!action|!adverb !action")
            .addRule("!objects", "the world|the economy|the market|society|best practices|the info-sphere|cyberspace|the dating scene|high-value market segments|the eschaton|anime consumers|the poorly hydrated|Warhammer fanatics|executive assistants|stake holders|investor value|the median consumer")
            .addRule("!objects", "future generations|high quality sandwiches|thought-leaders|visionaries|the reckless ones|Big Brother|paradigms")
            .addRule("!objects", "the infodome|the terror dome|gorgeous lights|city-pop albums|heart transplants|financial envelope")
            .addRule("!by_phrase", "By !actions !targets we are !actions !prep !objects")
            .addRule("!by_phrase", "By !actions !prep !targets we are !actions !objects")
            .addRule("!by_phrase", "By !actions !prep !targets with !withs we are !actions !objects")
            .addRule("!miss_phrase", "!missions !is_that !action !prep !targets !adverb !action !target")
            .addRule("!miss_phrase", "!missions is !action !objects by !actions !targets")
            .addRule("!with_phrase", "With !withs , we are !actions !objects to !action !targets")
            .addRule("!with_phrase", "!missions !is_that with !withs we are !actions !objects")
            .addRule("!are_phrase", "We are !objects !action !targets|We are !actions !prep !objects|We are !withs !prep !targets")
            .addRule("!phrase", "!by_phrase|!miss_phrase|!with_phrase|!are_phrase")
        g.setStart("!phrase");
        let ui = new UI(g);
    &lt;/script&gt;
&lt;p&gt;Now, admittedly, this generator may &lt;em&gt;use&lt;/em&gt; a grammar for generating phrases, but it&amp;#39;s not an English grammar, and the result is that sometimes it has problems with verb agreement and other prosaic English rules. I say, lean into it. Let someone challenge your bad grammar, and then look down your nose at them, and say: &amp;#34;I&amp;#39;m blue-skying the infosphere across new domains, you wouldn&amp;#39;t get it.&amp;#34;&lt;/p&gt;
&lt;!-- Easy Reader Version: Yes, I slapped the JavaScript into the page itself, and the API is stuffed into a global variable you can access via the dev tools. I trust you to abuse the heck out of that. --&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 the plebs out of prod. Restrict NuGet feed privileges with ProGet. &lt;a href="https://inedo.com/proget/private-nuget-server?utm_source=tdwtf&amp;amp;utm_medium=footer&amp;amp;utm_content=PlebsFooter&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>16</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/corporate-language-compliance-generator</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>Corporate Language Compliance</title><link>https://thedailywtf.com/articles/corporate-language-compliance</link><category>Feature Articles</category><pubDate>Wed, 01 Apr 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/corporate-language-compliance</guid><description>&lt;p&gt;As we all know, there are two basic kinds of scientific studies. The first is a ground-breaking paper that changes the way we view the world, and forces us to confront our presuppositions and biases about how we think the world works, and change our perspective. The other tells us what we already know to be true, and makes us feel good. The second kind, of course, is what we&amp;#39;d call &amp;#34;good science&amp;#34;.&lt;/p&gt;
&lt;p&gt;Or, if you want to &lt;a href="#generate"&gt;skip past this straight to the generator at the bottom.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For example, what if I told you that people who are impressed by hyperbolic corporate jargon are dumber than you or I? It&amp;#39;s probably something you already believe is true, but wouldn&amp;#39;t you like a scientist to tell you that it&amp;#39;s true?&lt;/p&gt;
&lt;p&gt;Well, have I got good news for you. If you&amp;#39;re tired of hearing about &amp;#34;growth-hacking paradigms&amp;#34; &lt;a href="https://news.cornell.edu/stories/2026/03/workers-who-love-synergizing-paradigms-might-be-bad-their-jobs"&gt;researchers at Cornell&lt;/a&gt; found that people who are impressed by semantically empty phrases are also bad at making decisions.&lt;/p&gt;
&lt;p&gt;The entire &lt;a href="https://www.researchgate.net/publication/400597536_The_Corporate_Bullshit_Receptivity_Scale_Development_validation_and_associations_with_workplace_outcomes"&gt;paper&lt;/a&gt; is available, if you like charts.&lt;/p&gt;
&lt;p&gt;There are a few key highlights worth reading, though. The paper spends a fair bit of time distinguishing between &amp;#34;jargon&amp;#34; and &amp;#34;bullshit&amp;#34;. Jargon is domain specific language that is impenetrable to &amp;#34;out-group&amp;#34; individuals, while bullshit may be just as impenetrable, but also is &amp;#34;semantically empty and confusing&amp;#34;.&lt;/p&gt;
&lt;p&gt;It also has some ideas about why we drift from useful jargon to bullshit. It starts, potentially, as a way to navigate socially difficult situations by blunting our speech: I can&amp;#39;t say that I think you&amp;#39;re terrible at your job, but I can say you need to actualize the domain more than you currently are. But also, it&amp;#39;s largely attempts to fluff ourselves up, whether it&amp;#39;s trying to contribute to a meeting when we haven&amp;#39;t an idea what we&amp;#39;re talking about, or trying to just sound impressive or noble in public messaging. It seems that the backbone of bullshit is the people who didn&amp;#39;t do the reading for Literature class but insist on holding forth during the classroom discussion, confident they can bullshit their way through.&lt;/p&gt;
&lt;p&gt;Of course, bullshit doesn&amp;#39;t thrive unless you have people willing to fall for it. And when it comes to that, it&amp;#39;s worth quoting the paper directly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bullshit receptivity is linked to a lower analytic thinking, insight, verbal ability, general knowledge, metacognition, and intelligence (Littrell &amp;amp; Fugelsang, 2024; Littrell et al., 2021b; Pennycook et al., 2015; Salvi et al., 2023). It also predicts certain types of poor decision-making and a greater proclivity to both endorse and spread fake news, conspiracy theories, and other epistemically-suspect claims (Čavojová et al., 2019; Iacobucci &amp;amp; De Cicco, 2022; Littrell et al., 2024; Pennycook &amp;amp; Rand, 2020).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The paper cites a study that indicates there&amp;#39;s an aspect of education to this. If you take a bunch of undergrads to an art gallery and present them with fluffed up descriptions of artist intent, they&amp;#39;re more likely to see the works as profound. But if you do the same thing with people who routinely go to art galleries, the bullshit has little effect on them. It also indicates that our susceptibility to bullshit is highly context dependent, and anyone could potentially fall for bullshit in a domain they don&amp;#39;t know enough about.&lt;/p&gt;
&lt;p&gt;Wait, I thought this was about talking about a paper that confirms my biases and makes me feel good? I don&amp;#39;t want to think about how I could succumb to bullshit. That&amp;#39;s terrifying.&lt;/p&gt;
&lt;p&gt;The backbone of the paper is the actual methodology, the analyses of their results, and their carefully crafted bullshit phrases used for the study, which are pretty goddamn great. Or terrible, depending on your perspective.&lt;/p&gt;
&lt;style&gt;
ul { 
   list-style-type: disc; 
   list-style-position: inside; 
   margin-top: 1.5rem;
}
&lt;/style&gt;
&lt;ul&gt;
&lt;li&gt;Our goal is to engage our capabilities by focusing our efforts on executing the
current transmission of our empowerment, driving an innovative growth-
mindset with our change drivers, and coaching energetic frameworks to our
resonating focus.&lt;/li&gt;
&lt;li&gt;Our goal is to engage our conversations by focusing our efforts on
architecting the current vector of our balanced scorecard.&lt;/li&gt;
&lt;li&gt;Working at the intersection of cross-collateralization and blue-sky thinking,
we will actualize a renewed level of cradle-to-grave credentialing and end-
state vision in a world defined by architecting to potentiate on a vertical
landscape.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are a few other key things the paper notes. First, unchecked bullshit can turn an environment toxic and drive away competent employees who need to escape it. It also could potentially impact hiring: a bullshit laden workplace may seek out bullshit friendly employees, making the situation worse. What the study does show is that bullshit-receptive employees are more likely to fertilize the field themselves. And there&amp;#39;s also the sad truth: bullshit &lt;em&gt;works&lt;/em&gt;. If you&amp;#39;re looking to fluff yourself up, impress your superiors, and climb the ladder, the careful application of bullshit may get you where you want to go.&lt;/p&gt;
&lt;p&gt;And it&amp;#39;s that last point that brings us to the real point of this article. If you&amp;#39;re here, you&amp;#39;re likely not the most bullshit friendly employee. Clearly, you&amp;#39;re smarter and make better decisions than that. (This is that good science I was talking about- you&amp;#39;re probably more attractive than those people too, though there&amp;#39;s no study to that effect yet.)&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re not using bullshit, you&amp;#39;re leaving powerful tools for self-promotion on the table. But it&amp;#39;s hard to come up with suitably impressive and semantically vacant phrases. Fear not, we&amp;#39;re here to help! Here&amp;#39;s a phrase generator for you, that will come up with endless phrases that you can use in meetings and mission statements to sound far more impressive.&lt;/p&gt;&lt;div style="border: 1px solid black; text-align: center"&gt;
        &lt;h3 id="generated"&gt;&lt;/h3&gt;
        &lt;button id="generate"&gt;Generate&lt;/button&gt;
    &lt;/div&gt;
    &lt;script&gt;
        class Replacement
{
    constructor(text)
    {
        this.tokens = text.split(" ");
    }
}

class Rule
{
    constructor()
    {
        this.replacements = [];
    }

    addReplacement(text)
    {
        const opts = text.split("|");
        opts.forEach((o) =&gt; this.replacements.push(new Replacement(o)));
    }

    choose()
    {
        return this.replacements[Math.floor(Math.random()*this.replacements.length)];
    }
}

class Grammar
{
    constructor()
    {
        this.rules = {};
    }

    setStart(token)
    {
        this.start = token;
    }

    addRule(token,text) 
    {
        if (!this.rules[token])
        {
            this.rules[token] = new Rule();
        }
        this.rules[token].addReplacement(text);
        return this;
    }

    addRules(token,sepText)
    {
        sepText.split("|").forEach(text =&gt; {
            this.addRule(token, text);
        });
    }

    generate(token)
    {
        if (this.rules[token])
        {
            const nextVal = this.rules[token].choose();
            let res = [];
            nextVal.tokens.forEach(token =&gt; {
                res = res.concat(this.generate(token));
            });
            return res;
        }
        return [token];
    }

    phrase()
    {
        return this.generate(this.start);
    }
}
class UI
{
    constructor(grammar)
    {
        this.button = document.getElementById("generate");
        this.content = document.getElementById("generated");
        const callback = () =&gt; {
            const text = grammar.phrase();
            let joined = text.join(" ");
            joined = joined.replace(/ ,/g, ",");
            this.content.innerHTML = joined;
        }
        this.button.addEventListener("click", callback);
        callback();
    }
}
    &lt;/script&gt;
    &lt;script&gt;
        let g = new Grammar();
        g
            .addRule("!mission", "Our goal|Our objective|Our stance|Our culture|Our mission|Our ethos|Our call to arms|Our essence|Our scent")
            .addRule("!missions", "!mission|!mission and !submission")
            .addRule("!visions", "vision|perspective|orientation|clear-sight|foresight|over-the-horizon planning|clear-eyed self-assessments")
            .addRule("!submission", "raison 'd etre|purpose|customer-focused soul|!withs powered !visions")
            .addRule("!is_that", "is that by|is by|demands that|expands over our")
            .addRule("!prep", "in|with|onto|into|without")
            .addRule("!bleeding", "technology|values|timelines|commitment|redundancy|credentialing")
            .addRule("!withs", "AI|creativity|the ubermensch|prestige|the latest technology|user-enabling|bleeding edge !bleeding|blockchain|NFTs")
            .addRule("!action", "leveraging|powering|working|engaging|bandwidth-widening|agentifying|vision questing|covering all the bases|solving|absorbing|communing|joining")
            .addRule("!action", "actioning|emoting|crafting|forging|manifesting|demonstrating|advocating|willing|engaging Nietzschean will-to-powering")
            .addRule("!action", "pressure testing|getting in the tent|saving|drumming our own beat|enabling|blue-skying")
            .addRule("!target", "core competencies|synergies|cross-collateralization|blue-sky thinking|best practices|vision|impact|target|low hanging fruit")
            .addRule("!target", "foundation|ideation|idea generation|lead generation|pull|bank accounts|shareholder-value|new domains|the whales")
            .addRule("!target_mods", "cradle-to-grave|balanced|cross back|high-value|high-impact|maximalizing|throughput-maxxing|reinvented|collaborational|optimized")
            .addRule("!target_mods", "withholding|full-ecosystem|cross-functional|network-oriented|cross-paradigm|growth-hacking|disruption|appropriate|gravitational")
            .addRule("!targets", "!target|!adjective !target|!target_mods !target|!target and !targets")
            .addRule("!adjective", "open|wide|smart|enabled|agentic|AI-first|AI-forward|fifth-sigma|forward looking|future-proof|optimized|four-quadrant")
            .addRule("!adjective", "vast|moatified|inverted|AI-enabled|LLM-driven|agent-driven|paradigmatic|pragmatic|blue-sky|open doored|window-oriented|maximizing")
            .addRule("!adverb", "markedly|vastly|smartly|synergistically|agentically|cooly|vapidly|rapidly|overwhelmingly|abstractly|inherently|value-balancingly")
            .addRule("!adverb", "disruptively")
            .addRule("!actions", "!action|!adverb !action")
            .addRule("!objects", "the world|the economy|the market|society|best practices|the info-sphere|cyberspace|the dating scene|high-value market segments|the eschaton|anime consumers|the poorly hydrated|Warhammer fanatics|executive assistants|stake holders|investor value|the median consumer")
            .addRule("!objects", "future generations|high quality sandwiches|thought-leaders|visionaries|the reckless ones|Big Brother|paradigms")
            .addRule("!objects", "the infodome|the terror dome|gorgeous lights|city-pop albums|heart transplants|financial envelope")
            .addRule("!by_phrase", "By !actions !targets we are !actions !prep !objects")
            .addRule("!by_phrase", "By !actions !prep !targets we are !actions !objects")
            .addRule("!by_phrase", "By !actions !prep !targets with !withs we are !actions !objects")
            .addRule("!miss_phrase", "!missions !is_that !action !prep !targets !adverb !action !target")
            .addRule("!miss_phrase", "!missions is !action !objects by !actions !targets")
            .addRule("!with_phrase", "With !withs , we are !actions !objects to !action !targets")
            .addRule("!with_phrase", "!missions !is_that with !withs we are !actions !objects")
            .addRule("!are_phrase", "We are !objects !action !targets|We are !actions !prep !objects|We are !withs !prep !targets")
            .addRule("!phrase", "!by_phrase|!miss_phrase|!with_phrase|!are_phrase")
        g.setStart("!phrase");
        let ui = new UI(g);
    &lt;/script&gt;
&lt;p&gt;Now, admittedly, this generator may &lt;em&gt;use&lt;/em&gt; a grammar for generating phrases, but it&amp;#39;s not an English grammar, and the result is that sometimes it has problems with verb agreement and other prosaic English rules. I say, lean into it. Let someone challenge your bad grammar, and then look down your nose at them, and say: &amp;#34;I&amp;#39;m blue-skying the infosphere across new domains, you wouldn&amp;#39;t get it.&amp;#34;&lt;/p&gt;
&lt;!-- Easy Reader Version: Yes, I slapped the JavaScript into the page itself, and the API is stuffed into a global variable you can access via the dev tools. I trust you to abuse the heck out of that. --&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>26</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/corporate-language-compliance</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Joined Up</title><link>https://thedailywtf.com/articles/joined-up</link><category>CodeSOD</category><pubDate>Tue, 31 Mar 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/joined-up</guid><description>&lt;p&gt;&lt;strong&gt;Sandra&lt;/strong&gt; from InitAg (&lt;a href="https://thedailywtf.com/articles/brillant-python-programmers"&gt;previously&lt;/a&gt;) works with Bjørn, and Bjørn has some ideas about how database schemas should be organized.&lt;/p&gt;
&lt;p&gt;First, users should never see an auto-incrementing ID. That means you need to use UUIDs. But UUIDs are large and expensive, so they should never be your primary key, use an auto-incrementing ID for that.&lt;/p&gt;
&lt;p&gt;This is not, in and of itself, a radical or ridiculous statement. I&amp;#39;ve worked on many a database that followed similar rules. I&amp;#39;ve also seen &amp;#34;just use a UUID all the time&amp;#34; become increasingly common, especially on distributed databases, where incrementing counters is expensive.&lt;/p&gt;
&lt;p&gt;One can have opinions and disagreements about how we handle IDs in a database, but I wouldn&amp;#39;t call anything a WTF there.&lt;/p&gt;
&lt;p&gt;No, the WTF is how Bjørn would design his cross-reference tables. You know, the tables which exist to permit many-to-many relationships between two other tables? Tables that should just be &lt;code&gt;tableA.id&lt;/code&gt; and &lt;code&gt;tableB.id&lt;/code&gt;?&lt;/p&gt;
&lt;pre&gt;                                     Table &amp;#34;public.foo_bar&amp;#34;
  Column   |          Type          | Collation | Nullable |              Default               
-----------+------------------------+-----------+----------+------------------------------------
 id        | integer                |           | not null | nextval(&amp;#39;foo_bar_id_seq&amp;#39;::regclass)
 foo_id    | integer                |           | not null | 
 bar_id    | integer                |           | not null | 
 uuid      | character varying(128) |           | not null | 
&lt;/pre&gt;
&lt;p&gt;Yes, every row in this table has an ID, which isn&amp;#39;t itself a terrible choice, &lt;em&gt;and&lt;/em&gt; a UUID, despite the fact that the ID of these rows should never end up in output anyway. It exists only to facilitate queries, not store any actual data.&lt;/p&gt;
&lt;p&gt;I guess, what&amp;#39;s the point of having a rule if you don&amp;#39;t follow it unthinkingly at all times?&lt;/p&gt;
&lt;!-- Easy Reader Version: Blind following of rules is like 90% of succeeding in corporate politics. The line between malicious compliance and just regular compliance is really just… do you have malice in your heart when you do it? --&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>18</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/joined-up</wfw:comment></item><item><dc:creator>Remy Porter</dc:creator><title>CodeSOD: Three Minutes</title><link>https://thedailywtf.com/articles/three-minutes</link><category>CodeSOD</category><pubDate>Mon, 30 Mar 2026 06:30:00 GMT</pubDate><guid>https://thedailywtf.com/articles/three-minutes</guid><description>&lt;p&gt;&lt;strong&gt;Angela&lt;/strong&gt;&amp;#39;s team hired someone who was &amp;#34;good&amp;#34; at SQL. When this person started, the team had some regular jobs which ran in the mornings. The jobs were fairly time consuming, and did a lot of database IO. When their current database person left for another job, they hired someone who had a &amp;#34;good grasp&amp;#34; on SQL. We&amp;#39;ll call him Barry.&lt;/p&gt;
&lt;p&gt;Barry started out by checking the morning jobs every day. And over time, the morning jobs started getting slower and slower. That was a concern, but Barry swore he had it under control. Barry did not share that a handful of slow queries- queries which took three or so minutes to run- had suddenly started taking 75+ minutes to run. Barry didn&amp;#39;t think about the fact that a little time with the query planner and some indexes could have probably gotten performance back to where it should have been. Barry saw this problem and decided: &amp;#34;I&amp;#39;ll write a Python script&amp;#34;.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-python"&gt;&lt;span class="hljs-keyword"&gt;import&lt;/span&gt; time
&lt;span class="hljs-keyword"&gt;from&lt;/span&gt; datetime &lt;span class="hljs-keyword"&gt;import&lt;/span&gt; datetime, timedelta
&lt;span class="hljs-keyword"&gt;import&lt;/span&gt; pytz   &lt;span class="hljs-comment"&gt;# for time zone&lt;/span&gt;

current_date = datetime.now()
day_number = current_date.weekday()  &lt;span class="hljs-comment"&gt;# integer value: 0 is Monday&lt;/span&gt;
hub_1_ready = &lt;span class="hljs-literal"&gt;False&lt;/span&gt;
hub_2_ready = &lt;span class="hljs-literal"&gt;False&lt;/span&gt;
hub_1_results = []
hub_2_results = []
job_ran_later = &lt;span class="hljs-literal"&gt;False&lt;/span&gt; &lt;span class="hljs-comment"&gt;# If this job is manually run later in the day, avoid sending a &amp;#34;both hubs failed&amp;#34; email&lt;/span&gt;



&lt;span class="hljs-comment"&gt;# Monday (day_number 0) runs later than the other 6 days&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;if&lt;/span&gt; day_number == &lt;span class="hljs-number"&gt;0&lt;/span&gt;:  
    end_time = datetime.strptime(&lt;span class="hljs-string"&gt;&amp;#34;08:30&amp;#34;&lt;/span&gt;, &lt;span class="hljs-string"&gt;&amp;#34;%H:%M&amp;#34;&lt;/span&gt;) 
    end_time = end_time.time() &lt;span class="hljs-comment"&gt;# get just the time portion&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;else&lt;/span&gt;:
    end_time = datetime.strptime(&lt;span class="hljs-string"&gt;&amp;#34;07:30&amp;#34;&lt;/span&gt;, &lt;span class="hljs-string"&gt;&amp;#34;%H:%M&amp;#34;&lt;/span&gt;)  
    end_time = end_time.time() &lt;span class="hljs-comment"&gt;# get just the time portion&lt;/span&gt;

&lt;span class="hljs-comment"&gt;# If this job is run later in the day than the normaolly scheduled time&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;if&lt;/span&gt; datetime.now(pytz.timezone(&lt;span class="hljs-string"&gt;&amp;#39;US/Central&amp;#39;&lt;/span&gt;)).time() &amp;gt; end_time:
    job_ran_later = &lt;span class="hljs-literal"&gt;True&lt;/span&gt; 


&lt;span class="hljs-comment"&gt;# Starting when Morning jobs are scheduled to kick off, check for completion of both hubs every 3 minutes until end_time. If both hubs are not a Success by end_time, an email is sent&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;while&lt;/span&gt; datetime.now(pytz.timezone(&lt;span class="hljs-string"&gt;&amp;#39;US/Central&amp;#39;&lt;/span&gt;)).time() &amp;lt; end_time:
    h1 = session.sql(&lt;span class="hljs-string"&gt;&amp;#34;SELECT LOG_STATUS FROM PROD_CTRL.CTRL.DRB_EXECUTION_LOG WHERE LOG_PROJECT = &amp;#39;SRC_PROD_1&amp;#39; AND date(log_start_date) = current_date AND date(LOG_END_DATE) = current_date&amp;#34;&lt;/span&gt;).take(&lt;span class="hljs-number"&gt;1&lt;/span&gt;)
    hub_1_results = []
    hub_1_results.append(h1)
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; &lt;span class="hljs-built_in"&gt;str&lt;/span&gt;(hub_1_results[&lt;span class="hljs-number"&gt;0&lt;/span&gt;]) == &lt;span class="hljs-string"&gt;&amp;#34;[Row(LOG_STATUS=&amp;#39;SUCCESS&amp;#39;)]&amp;#34;&lt;/span&gt;:
        hub_1_ready = &lt;span class="hljs-literal"&gt;True&lt;/span&gt; 
    

    h2 = session.sql(&lt;span class="hljs-string"&gt;&amp;#34;SELECT LOG_STATUS FROM PROD_CTRL.CTRL.SRC_EXECUTION_LOG WHERE LOG_PROJECT = &amp;#39;SRC_PROD_2&amp;#39; AND date(log_start_date) = current_date AND date(LOG_END_DATE) = current_date&amp;#34;&lt;/span&gt;).take(&lt;span class="hljs-number"&gt;1&lt;/span&gt;)
    hub_2_results = []
    hub_2_results.append(h2)
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; &lt;span class="hljs-built_in"&gt;str&lt;/span&gt;(hub_2_results[&lt;span class="hljs-number"&gt;0&lt;/span&gt;]) == &lt;span class="hljs-string"&gt;&amp;#34;[Row(LOG_STATUS=&amp;#39;SUCCESS&amp;#39;)]&amp;#34;&lt;/span&gt;:
        hub_2_ready = &lt;span class="hljs-literal"&gt;True&lt;/span&gt; 
    
    
    &lt;span class="hljs-comment"&gt;# If both hubs are Success, then break out of while loop, even if it&amp;#39;s not end_time yet&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt; hub_1_ready == &lt;span class="hljs-literal"&gt;True&lt;/span&gt; &lt;span class="hljs-keyword"&gt;and&lt;/span&gt; hub_2_ready == &lt;span class="hljs-literal"&gt;True&lt;/span&gt;:
        &lt;span class="hljs-keyword"&gt;break&lt;/span&gt;

    time.sleep(&lt;span class="hljs-number"&gt;180&lt;/span&gt;) &lt;span class="hljs-comment"&gt;# Sleep for 3 minutes before trying again&lt;/span&gt;

    


&lt;span class="hljs-keyword"&gt;if&lt;/span&gt;  &lt;span class="hljs-keyword"&gt;not&lt;/span&gt; hub_1_ready &lt;span class="hljs-keyword"&gt;and&lt;/span&gt; &lt;span class="hljs-keyword"&gt;not&lt;/span&gt; hub_2_ready &lt;span class="hljs-keyword"&gt;and&lt;/span&gt; job_ran_later == &lt;span class="hljs-literal"&gt;False&lt;/span&gt;:
    message = &lt;span class="hljs-string"&gt;&amp;#34;Neither Hub_1 nor Hub_2 finished in time for Morning jobs.&amp;#34;&lt;/span&gt;
    context.updateVariable(&lt;span class="hljs-string"&gt;&amp;#39;METL_MESSAGE&amp;#39;&lt;/span&gt;, message)
    &lt;span class="hljs-keyword"&gt;raise&lt;/span&gt; ValueError(&lt;span class="hljs-string"&gt;&amp;#34;send email: &amp;#34;&lt;/span&gt;+message)
&lt;span class="hljs-keyword"&gt;elif&lt;/span&gt; hub_1_ready == &lt;span class="hljs-literal"&gt;False&lt;/span&gt; &lt;span class="hljs-keyword"&gt;and&lt;/span&gt; hub_2_ready == &lt;span class="hljs-literal"&gt;True&lt;/span&gt;:
    message = &lt;span class="hljs-string"&gt;&amp;#34;Hub_1 did not finish in time for Morning jobs.&amp;#34;&lt;/span&gt;
    context.updateVariable(&lt;span class="hljs-string"&gt;&amp;#39;METL_MESSAGE&amp;#39;&lt;/span&gt;, message)
    &lt;span class="hljs-keyword"&gt;raise&lt;/span&gt; ValueError(&lt;span class="hljs-string"&gt;&amp;#34;send email: &amp;#34;&lt;/span&gt;+message)
&lt;span class="hljs-keyword"&gt;elif&lt;/span&gt; hub_1_ready == &lt;span class="hljs-literal"&gt;True&lt;/span&gt; &lt;span class="hljs-keyword"&gt;and&lt;/span&gt; hub_2_ready == &lt;span class="hljs-literal"&gt;False&lt;/span&gt;:
    message = &lt;span class="hljs-string"&gt;&amp;#34;Hub_2 did not finish in time for Morning jobs&amp;#34;&lt;/span&gt;
    context.updateVariable(&lt;span class="hljs-string"&gt;&amp;#39;METL_MESSAGE&amp;#39;&lt;/span&gt;, message)
    &lt;span class="hljs-keyword"&gt;raise&lt;/span&gt; ValueError(&lt;span class="hljs-string"&gt;&amp;#34;send email: &amp;#34;&lt;/span&gt;+message)
&lt;span class="hljs-keyword"&gt;elif&lt;/span&gt; job_ran_later == &lt;span class="hljs-literal"&gt;True&lt;/span&gt;:
    message = &lt;span class="hljs-string"&gt;&amp;#34;This job was run manually later in the day. Check that both Source hubs have completed. If you did not run this job, you can probably ignore this email.&amp;#34;&lt;/span&gt;
    context.updateVariable(&lt;span class="hljs-string"&gt;&amp;#39;METL_MESSAGE&amp;#39;&lt;/span&gt;, message)
    &lt;span class="hljs-keyword"&gt;raise&lt;/span&gt; ValueError(&lt;span class="hljs-string"&gt;&amp;#34;send email: &amp;#34;&lt;/span&gt;+message)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don&amp;#39;t particularly like any of this. Some of it is just little ugliness, like the fact that &lt;code&gt;job_ran_later&lt;/code&gt; and the closing &lt;code&gt;if&lt;/code&gt; statements could be written to be much more clear. Or the way that, after our main &lt;code&gt;while&lt;/code&gt; loop, which we&amp;#39;ll come back to, we compare boolean variables against boolean literals.&lt;/p&gt;
&lt;p&gt;The core of it is the &lt;code&gt;while&lt;/code&gt; loop, which checks the current time, and while it&amp;#39;s before the target end time, it runs a pair of queries. For each query it runs, it empties an array, then append the results (which we know is only one value, because they &lt;code&gt;take(1)&lt;/code&gt;) to the array. Then they check the first element of the array against an expected string.&lt;/p&gt;
&lt;p&gt;Why the arrays? Who knows. Perhaps at one point they thought they&amp;#39;d keep the results from multiple iterations, then decided against it. Why do the check against the string in the Python code and not the query? No idea, but maybe I don&amp;#39;t have a &amp;#34;good grasp&amp;#34; of SQL. That said, with my bad grasp, I&amp;#39;m pretty sure I could figure out how to do all that in &lt;em&gt;one single query&lt;/em&gt; and not two that are almost identical.&lt;/p&gt;
&lt;p&gt;In any case, if we don&amp;#39;t see what we want in the database, we sleep for three minutes, then try again.&lt;/p&gt;
&lt;p&gt;At the end of the process, we check what happened and output messages and raise exceptions based on what we did see in the database.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s also worth noting that Angela&amp;#39;s team used a pretty reasonable job management system. All of their other scripts doing similar jobs didn&amp;#39;t include retry logic inside themselves- they just failed. That let the job runner decide whether or not to retry, and that allowed all sorts of valuable configuration options that are more fine grained than &amp;#34;sleep for 3 minutes&amp;#34;.&lt;/p&gt;
&lt;!-- Easy Reader Version: The `ValueError("send email: " + message)` worries me: does that preamble to the error trigger logic to send emails? God, I hope not. What a terrible way to pass error messages up the chain. --&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>19</slash:comments><wfw:comment>https://thedailywtf.com/articles/comments/three-minutes</wfw:comment></item></channel></rss>