[{"Id":11178,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003eToday\u0026#39;s anonymous submitter works for a large company. It\u0026#39;s one of those sorts of companies which has piles, and piles, and piles of paperwork and bureaucracy. It also means that much of their portfolio of software is basic \u003cabbr title=\"Create/Read/Update/Delete\"\u003eCRUD\u003c/abbr\u003e applications. \u0026#34;Here\u0026#39;s a database for managing invoices.\u0026#34; \u0026#34;Here\u0026#39;s a database for managing desk assignments.\u0026#34; \u0026#34;Here\u0026#39;s a pile of databases which link our legacy applications to our new ERP system.\u0026#34;\u003c/p\u003e\n\u003cp\u003eWhich brings us to our representative line. It is not a representative line of code, but a representative line of the design specification. This is the design specification for \u003cem\u003eyet another\u003c/em\u003e database-driven application.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eToday\u0026#39;s anonymous submitter works for a large company. It\u0026#39;s one of those sorts of companies which has piles, and piles, and piles of paperwork and bureaucracy. It also means that much of their portfolio of software is basic \u003cabbr title=\"Create/Read/Update/Delete\"\u003eCRUD\u003c/abbr\u003e applications. \u0026#34;Here\u0026#39;s a database for managing invoices.\u0026#34; \u0026#34;Here\u0026#39;s a database for managing desk assignments.\u0026#34; \u0026#34;Here\u0026#39;s a pile of databases which link our legacy applications to our new ERP system.\u0026#34;\u003c/p\u003e\n\u003cp\u003eWhich brings us to our representative line. It is not a representative line of code, but a representative line of the design specification. This is the design specification for \u003cem\u003eyet another\u003c/em\u003e database-driven application.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e7.7 REFERENTIAL INTEGRITY CONSTRAINTS\nReferential integrity constraints are not applicable for [REDACTED] Application.\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eUpon seeing this, our submitter predicted that they\u0026#39;d be having a lot of TDWTF submissions in their future.\u003c/p\u003e\n\u003cp\u003eThe worst part? This isn\u0026#39;t the only time this has been included in the design spec. Several database driven applications have had this line in their spec. No one is able to explain exactly \u003cem\u003ewhy\u003c/em\u003e referential integrity constraints are not applicable. At best, there are a few batch jobs that don\u0026#39;t define a schema themselves, though they need to comply with it. Maybe someone is just copying and pasting from an old design spec and hoping no one notices or cares?\u003c/p\u003e\n\u003cp\u003eGood news: it\u0026#39;s likely that no one will notice, or care. At least not until something breaks in production.\u003c/p\u003e\n\u003c!-- Easy Reader Version: All this time, I\u0027ve been designing software to work, not realizing I could have been just including in my design specs, \"this won\u0027t actually be usable\". What a fool I\u0027ve been! --\u003e","BodyAndAdHtml":"\u003cp\u003eToday\u0026#39;s anonymous submitter works for a large company. It\u0026#39;s one of those sorts of companies which has piles, and piles, and piles of paperwork and bureaucracy. It also means that much of their portfolio of software is basic \u003cabbr title=\"Create/Read/Update/Delete\"\u003eCRUD\u003c/abbr\u003e applications. \u0026#34;Here\u0026#39;s a database for managing invoices.\u0026#34; \u0026#34;Here\u0026#39;s a database for managing desk assignments.\u0026#34; \u0026#34;Here\u0026#39;s a pile of databases which link our legacy applications to our new ERP system.\u0026#34;\u003c/p\u003e\n\u003cp\u003eWhich brings us to our representative line. It is not a representative line of code, but a representative line of the design specification. This is the design specification for \u003cem\u003eyet another\u003c/em\u003e database-driven application.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e7.7 REFERENTIAL INTEGRITY CONSTRAINTS\nReferential integrity constraints are not applicable for [REDACTED] Application.\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eUpon seeing this, our submitter predicted that they\u0026#39;d be having a lot of TDWTF submissions in their future.\u003c/p\u003e\n\u003cp\u003eThe worst part? This isn\u0026#39;t the only time this has been included in the design spec. Several database driven applications have had this line in their spec. No one is able to explain exactly \u003cem\u003ewhy\u003c/em\u003e referential integrity constraints are not applicable. At best, there are a few batch jobs that don\u0026#39;t define a schema themselves, though they need to comply with it. Maybe someone is just copying and pasting from an old design spec and hoping no one notices or cares?\u003c/p\u003e\n\u003cp\u003eGood news: it\u0026#39;s likely that no one will notice, or care. At least not until something breaks in production.\u003c/p\u003e\n\u003c!-- Easy Reader Version: All this time, I\u0027ve been designing software to work, not realizing I could have been just including in my design specs, \"this won\u0027t actually be usable\". What a fool I\u0027ve been! --\u003e\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"A Solid Reference","RssTitle":"Representative Line: A Solid Reference","CachedCommentCount":8,"LastCommentDate":"\/Date(1778516175520)\/","LastCommentDateDescription":"16:16","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1778481000000)\/","ISODate":"2026-05-11","DisplayDate":"2026-05-11","Series":{"Slug":"representative-line","Title":"Representative Line","Description":"A single line of code from a large application that somehow manages to provide an almost endless insight into the pain that its maintainers face each day.","CssClass":"soapbox"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/a-solid-reference","CommentsUrl":"https://thedailywtf.com/articles/comments/a-solid-reference","Slug":"a-solid-reference","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fa-solid-reference+-+A+Solid+Reference+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fa-solid-reference\u0026t=A+Solid+Reference+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=A%20Solid%20Reference:%20https://thedailywtf.com/articles/a-solid-reference","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fa-solid-reference","PreviousArticleId":11179,"PreviousArticleTitle":"Null Null Null ","PreviousArticleSlug":"null-null-null","PreviousArticleUrl":"//thedailywtf.com/articles/null-null-null","NextArticleId":null,"NextArticleTitle":null,"NextArticleSlug":null,"NextArticleUrl":"//thedailywtf.com/articles/"},{"Id":11179,"Author":{"Name":"Lyle Seaman","FirstName":"Lyle","ShortDescription":"networking, security infra and filesystems kernel hacker turned application programmer, SRE and engineering manager, Lyle traded tilting at windmills for viking at Vikings but couldn\u0027t catch any.","DescriptionHtml":null,"Slug":"lyle-seaman","IsAdmin":true,"IsActive":true,"ImageUrl":"/images/imageslws/viking.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003e\nThe single most common category of entries for this column is failed handling  of NaN, null and undefined.  Almost exclusively from javascript in web pages, sometimes in node servers, and almost never any other languages or frameworks. They\u0026#39;re getting a bit repetitive but it\u0026#39;s our solemn duty to call out failure where we find it.  So if you send us one of these, make sure it identifies the source!\n\u003c/p\u003e\n\n\n\u003cp\u003e\n\u0026#34;If you want something you\u0026#39;ve never had, do something you\u0026#39;ve\nnever done\u0026#34; exhorted \n\u003cstrong\u003eBen\u003c/strong\u003e.\n\u003c/p\u003e\u003cblockquote\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003e\nThe single most common category of entries for this column is failed handling  of NaN, null and undefined.  Almost exclusively from javascript in web pages, sometimes in node servers, and almost never any other languages or frameworks. They\u0026#39;re getting a bit repetitive but it\u0026#39;s our solemn duty to call out failure where we find it.  So if you send us one of these, make sure it identifies the source!\n\u003c/p\u003e\n\n\n\u003cp\u003e\n\u0026#34;If you want something you\u0026#39;ve never had, do something you\u0026#39;ve\nnever done\u0026#34; exhorted \n\u003cstrong\u003eBen\u003c/strong\u003e.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#15d2acdeb1844f2fb6dcd79699dee683\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"15d2acdeb1844f2fb6dcd79699dee683\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/15d2acdeb1844f2fb6dcd79699dee683.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Dashed Hope for Jennifer Null,\u0026#34; titled an entry from \n\u003cstrong\u003esome guy\u003c/strong\u003e[sic].  \n\u0026#34;As recently linked from TDWTF article \u0026#34;Not for Nullthing\u0026#34;, not\nonly names can break computer systems, but also article content.\u0026#34;\n Stretching, but we\u0026#39;ll allow it.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#5d69cd67830c4a3789e96f556bb542bf\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"5d69cd67830c4a3789e96f556bb542bf\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/5d69cd67830c4a3789e96f556bb542bf.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;Where does Batman go on holiday?\u0026#34; asked  \n\u003cstrong\u003eMorgan\u003c/strong\u003e.\n\u0026#34;Nananananana... Nowhere!\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#15345eee6a7d4fe383cecf5cb74d1aa2\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"15345eee6a7d4fe383cecf5cb74d1aa2\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/15345eee6a7d4fe383cecf5cb74d1aa2.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;UBER is ready for driverless vehicles...\u0026#34;\n\u003cstrong\u003eBruce C.\u003c/strong\u003e\n\u0026#34;Uber is getting so big, they can\u0026#39;t even keep track\nof their driver\u0026#39;s names.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#30fbd331dde44f639735138146d97f51\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"30fbd331dde44f639735138146d97f51\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/30fbd331dde44f639735138146d97f51.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;Well at least the reason wasn\u0026#39;t null or NaN,\u0026#34; wrote\n\u003cstrong\u003eSteve W.\u003c/strong\u003e regarding CenturyLink.\n\u0026#34;I\u0026#39;ve been trying for weeks to use their web page\nto change my (incorrect billing address). Such progress.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#eb3472b715ab4124896b37d7ca47eaec\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"eb3472b715ab4124896b37d7ca47eaec\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/eb3472b715ab4124896b37d7ca47eaec.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eAdditional entries on the topic from\n\u003cbr/\u003e\u003cstrong\u003eDan\n\u003c/strong\u003e: \u0026#34;we\u0026#39;re fresh out of null\u0026#34;\n\u003cbr/\u003e\u003cstrong\u003eHenrik\n\u003c/strong\u003e: \u0026#34;What is this null music streaming service\u0026#34;\n\u003cbr/\u003e\u003cstrong\u003eMike\n\u003c/strong\u003e: \u0026#34;Name: undefined\u0026#34;\n\u003cbr/\u003e\u003cstrong\u003eLaks\n\u003c/strong\u003e: \u0026#34;In this app, every new user defaults to a nullptr.\u0026#34;\n\u003cbr/\u003e\nand\n\u003cbr/\u003e\u003cstrong\u003eJim\n\u003c/strong\u003e: \u0026#34;Think I\u0026#39;ll buy $NaCar with this refund!\u0026#34;\n\u003cbr/\u003e and many others were all appreciated and noted.\n\n\u003c/p\u003e","BodyAndAdHtml":"\u003cp\u003e\nThe single most common category of entries for this column is failed handling  of NaN, null and undefined.  Almost exclusively from javascript in web pages, sometimes in node servers, and almost never any other languages or frameworks. They\u0026#39;re getting a bit repetitive but it\u0026#39;s our solemn duty to call out failure where we find it.  So if you send us one of these, make sure it identifies the source!\n\u003c/p\u003e\n\n\n\u003cp\u003e\n\u0026#34;If you want something you\u0026#39;ve never had, do something you\u0026#39;ve\nnever done\u0026#34; exhorted \n\u003cstrong\u003eBen\u003c/strong\u003e.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#15d2acdeb1844f2fb6dcd79699dee683\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"15d2acdeb1844f2fb6dcd79699dee683\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/15d2acdeb1844f2fb6dcd79699dee683.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Dashed Hope for Jennifer Null,\u0026#34; titled an entry from \n\u003cstrong\u003esome guy\u003c/strong\u003e[sic].  \n\u0026#34;As recently linked from TDWTF article \u0026#34;Not for Nullthing\u0026#34;, not\nonly names can break computer systems, but also article content.\u0026#34;\n Stretching, but we\u0026#39;ll allow it.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#5d69cd67830c4a3789e96f556bb542bf\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"5d69cd67830c4a3789e96f556bb542bf\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/5d69cd67830c4a3789e96f556bb542bf.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;Where does Batman go on holiday?\u0026#34; asked  \n\u003cstrong\u003eMorgan\u003c/strong\u003e.\n\u0026#34;Nananananana... Nowhere!\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#15345eee6a7d4fe383cecf5cb74d1aa2\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"15345eee6a7d4fe383cecf5cb74d1aa2\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/15345eee6a7d4fe383cecf5cb74d1aa2.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;UBER is ready for driverless vehicles...\u0026#34;\n\u003cstrong\u003eBruce C.\u003c/strong\u003e\n\u0026#34;Uber is getting so big, they can\u0026#39;t even keep track\nof their driver\u0026#39;s names.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#30fbd331dde44f639735138146d97f51\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"30fbd331dde44f639735138146d97f51\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/30fbd331dde44f639735138146d97f51.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;Well at least the reason wasn\u0026#39;t null or NaN,\u0026#34; wrote\n\u003cstrong\u003eSteve W.\u003c/strong\u003e regarding CenturyLink.\n\u0026#34;I\u0026#39;ve been trying for weeks to use their web page\nto change my (incorrect billing address). Such progress.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#eb3472b715ab4124896b37d7ca47eaec\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"eb3472b715ab4124896b37d7ca47eaec\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/05/07/eb3472b715ab4124896b37d7ca47eaec.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eAdditional entries on the topic from\n\u003cbr/\u003e\u003cstrong\u003eDan\n\u003c/strong\u003e: \u0026#34;we\u0026#39;re fresh out of null\u0026#34;\n\u003cbr/\u003e\u003cstrong\u003eHenrik\n\u003c/strong\u003e: \u0026#34;What is this null music streaming service\u0026#34;\n\u003cbr/\u003e\u003cstrong\u003eMike\n\u003c/strong\u003e: \u0026#34;Name: undefined\u0026#34;\n\u003cbr/\u003e\u003cstrong\u003eLaks\n\u003c/strong\u003e: \u0026#34;In this app, every new user defaults to a nullptr.\u0026#34;\n\u003cbr/\u003e\nand\n\u003cbr/\u003e\u003cstrong\u003eJim\n\u003c/strong\u003e: \u0026#34;Think I\u0026#39;ll buy $NaCar with this refund!\u0026#34;\n\u003cbr/\u003e and many others were all appreciated and noted.\n\n\u003c/p\u003e\u003cdiv\u003e\n\t[Advertisement] Picking up \u003cb\u003eNuGet\u003c/b\u003e is easy. Getting good at it takes time. \u003ca href=\"https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf\u0026amp;utm_medium=Footerad\u0026amp;utm_campaign=nuget\"\u003eDownload our guide to learn the best practice of NuGet for the Enterprise.\u003c/a\u003e\n\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Title":"Null Null Null ","RssTitle":"Error\u0027d: Null Null Null ","CachedCommentCount":9,"LastCommentDate":"\/Date(1778335980127)\/","LastCommentDateDescription":"2026-05-09","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1778221800000)\/","ISODate":"2026-05-08","DisplayDate":"2026-05-08","Series":{"Slug":"errord","Title":"Error\u0027d","Description":"Error\u0027d features fun error messages and other visual oddities from the world of IT.","CssClass":"errord"},"FooterAdHtml":"\u003cdiv\u003e\n\t[Advertisement] Picking up \u003cb\u003eNuGet\u003c/b\u003e is easy. Getting good at it takes time. \u003ca href=\"https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf\u0026amp;utm_medium=Footerad\u0026amp;utm_campaign=nuget\"\u003eDownload our guide to learn the best practice of NuGet for the Enterprise.\u003c/a\u003e\n\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Url":"https://thedailywtf.com/articles/null-null-null","CommentsUrl":"https://thedailywtf.com/articles/comments/null-null-null","Slug":"null-null-null","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fnull-null-null+-+Null+Null+Null++-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fnull-null-null\u0026t=Null+Null+Null++-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Null%20Null%20Null%20:%20https://thedailywtf.com/articles/null-null-null","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fnull-null-null","PreviousArticleId":11177,"PreviousArticleTitle":"Failing to Fail","PreviousArticleSlug":"failing-to-fail","PreviousArticleUrl":"//thedailywtf.com/articles/failing-to-fail","NextArticleId":11178,"NextArticleTitle":"A Solid Reference","NextArticleSlug":"a-solid-reference","NextArticleUrl":"//thedailywtf.com/articles/a-solid-reference"},{"Id":11177,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003e\u003cstrong\u003eRussell F\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/modus-pwned\"\u003epreviously\u003c/a\u003e) sends us a small one today. It\u0026#39;s not just a representative line, it\u0026#39;s a representative comment. More than that, it\u0026#39;s a true confession. Russell wrote some code, you see, and the logic was confusing. So, a co-worker added a comment to explain what the code was doing:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\u0026#39;This is *supposed* to fail. If it fails to fail, it throws a failure message\n\u003c/code\u003e\u003c/pre\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eRussell F\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/modus-pwned\"\u003epreviously\u003c/a\u003e) sends us a small one today. It\u0026#39;s not just a representative line, it\u0026#39;s a representative comment. More than that, it\u0026#39;s a true confession. Russell wrote some code, you see, and the logic was confusing. So, a co-worker added a comment to explain what the code was doing:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\u0026#39;This is *supposed* to fail. If it fails to fail, it throws a failure message\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eRussell writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eI have to confess that this one is my fault. The comment was added by one of my coworkers to clarify what I was doing, and made me realize how stupid I\u0026#39;d been.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u0026#34;Failing to plan is planning to fail\u0026#34; becomes \u0026#34;failing to fail is failure message\u0026#34;.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Task failed successfully --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eRussell F\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/modus-pwned\"\u003epreviously\u003c/a\u003e) sends us a small one today. It\u0026#39;s not just a representative line, it\u0026#39;s a representative comment. More than that, it\u0026#39;s a true confession. Russell wrote some code, you see, and the logic was confusing. So, a co-worker added a comment to explain what the code was doing:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e\u0026#39;This is *supposed* to fail. If it fails to fail, it throws a failure message\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eRussell writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eI have to confess that this one is my fault. The comment was added by one of my coworkers to clarify what I was doing, and made me realize how stupid I\u0026#39;d been.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u0026#34;Failing to plan is planning to fail\u0026#34; becomes \u0026#34;failing to fail is failure message\u0026#34;.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Task failed successfully --\u003e\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/buildmaster-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\t\u003ca href=\"https://inedo.com/BuildMaster?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eUtilize BuildMaster\u003c/a\u003e to release your software with confidence, at the pace your business demands. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eDownload\u003c/a\u003e today!  \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Failing to Fail","RssTitle":"CodeSOD: Failing to Fail","CachedCommentCount":12,"LastCommentDate":"\/Date(1778178997410)\/","LastCommentDateDescription":"2026-05-07","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1778135400000)\/","ISODate":"2026-05-07","DisplayDate":"2026-05-07","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/buildmaster-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\t\u003ca href=\"https://inedo.com/BuildMaster?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eUtilize BuildMaster\u003c/a\u003e to release your software with confidence, at the pace your business demands. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eDownload\u003c/a\u003e today!  \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/failing-to-fail","CommentsUrl":"https://thedailywtf.com/articles/comments/failing-to-fail","Slug":"failing-to-fail","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2ffailing-to-fail+-+Failing+to+Fail+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2ffailing-to-fail\u0026t=Failing+to+Fail+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Failing%20to%20Fail:%20https://thedailywtf.com/articles/failing-to-fail","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2ffailing-to-fail","PreviousArticleId":11176,"PreviousArticleTitle":"Please Find, Rewind","PreviousArticleSlug":"please-find-rewind","PreviousArticleUrl":"//thedailywtf.com/articles/please-find-rewind","NextArticleId":11179,"NextArticleTitle":"Null Null Null ","NextArticleSlug":"null-null-null","NextArticleUrl":"//thedailywtf.com/articles/null-null-null"},{"Id":11176,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003eAs \u003ca href=\"https://thedailywtf.com/articles/non-cogito-ergo-c-str\"\u003epreviously discussed\u003c/a\u003e, C++ took a surprisingly long time to get a \u0026#34;starts with\u0026#34; function for strings. It took even longer to get a function called \u0026#34;contains\u0026#34;. In part, that\u0026#39;s simply because \u003ccode\u003estring::find\u003c/code\u003e solves that problem.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNancy\u003c/strong\u003e sends us a… different approach to solving this problem.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eAs \u003ca href=\"https://thedailywtf.com/articles/non-cogito-ergo-c-str\"\u003epreviously discussed\u003c/a\u003e, C++ took a surprisingly long time to get a \u0026#34;starts with\u0026#34; function for strings. It took even longer to get a function called \u0026#34;contains\u0026#34;. In part, that\u0026#39;s simply because \u003ccode\u003estring::find\u003c/code\u003e solves that problem.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNancy\u003c/strong\u003e sends us a… different approach to solving this problem.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003ebool\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003esubstringInString\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(string str, string::iterator \u0026amp;it)\u003c/span\u003e\n\u003c/span\u003e{\n  string tmp;\n  \u003cspan class=\"hljs-type\"\u003ebool\u003c/span\u003e result = \u003cspan class=\"hljs-literal\"\u003efalse\u003c/span\u003e;\n  \u003cspan class=\"hljs-type\"\u003eint\u003c/span\u003e size = str.\u003cspan class=\"hljs-built_in\"\u003elength\u003c/span\u003e();\n\n  \u003cspan class=\"hljs-type\"\u003eint\u003c/span\u003e count = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e;\n  \u003cspan class=\"hljs-keyword\"\u003ewhile\u003c/span\u003e (count \u0026lt; size)\n  {\n    tmp += *it;\n    it++;\n    count++;\n    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (tmp.\u003cspan class=\"hljs-built_in\"\u003efind\u003c/span\u003e(str) != string::npos)\n    {\n      result = \u003cspan class=\"hljs-literal\"\u003etrue\u003c/span\u003e;\n      it -= size;\n      \u003cspan class=\"hljs-keyword\"\u003ebreak\u003c/span\u003e;\n    }\n  }\n\n  \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e ( !result)\n  {\n    it -= size;\n  }\n\n  \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e result;\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis function iterates across a string, character by character. In this iteration, we copy one character at a time into \u003ccode\u003etmp\u003c/code\u003e. Then we see if \u003ccode\u003etmp\u003c/code\u003e contains our search \u003ccode\u003estr\u003c/code\u003e. If it does, we break out of the loop after rewinding the iterator. Outside of the loop, we check if we found the substring, and if we did, we rewind the iterator. Then we return true or false based on whether on not we found the substring.\u003c/p\u003e\n\u003cp\u003eSo wait a second. \u003ccode\u003estr\u003c/code\u003e is our search string. \u003ccode\u003eit\u003c/code\u003e is where we\u0026#39;re searching. And we copy from \u003ccode\u003eit\u003c/code\u003e up to our search string\u0026#39;s \u003ccode\u003elength\u003c/code\u003e into a temporary string. We then do a \u003ccode\u003efind\u003c/code\u003e in that temporary string- hey! This is just a \u003ccode\u003estartsWith\u003c/code\u003e check written in the most insane way possible.\u003c/p\u003e\n\u003cp\u003eWhy even bother with the while loop? While \u003ccode\u003etmp\u003c/code\u003e is shorter than the search string, the answer is always \u0026#34;no, we haven\u0026#39;t found it\u0026#34;. And the developers knew that- that\u0026#39;s why they always rewind \u003ccode\u003esize\u003c/code\u003e characters on the iterator. They\u0026#39;re always searching exactly that many characters. Of course, since we \u003cem\u003ealways\u003c/em\u003e rewind the same amount, we can also just move the \u003ccode\u003eit -= size\u003c/code\u003e statement out of the loop and out of the \u003ccode\u003eif\u003c/code\u003e statement and do it once.\u003c/p\u003e\n\u003cp\u003eNancy calls this \u0026#34;a little gem\u0026#34; in a \u0026#34;large codebase\u0026#34;. Yeah, \u003ca href=\"https://classicgems.net/gem_francevillite.htm\"\u003ea real gem\u003c/a\u003e.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Undoing the operation you do in the function is a *kind* of constness. --\u003e","BodyAndAdHtml":"\u003cp\u003eAs \u003ca href=\"https://thedailywtf.com/articles/non-cogito-ergo-c-str\"\u003epreviously discussed\u003c/a\u003e, C++ took a surprisingly long time to get a \u0026#34;starts with\u0026#34; function for strings. It took even longer to get a function called \u0026#34;contains\u0026#34;. In part, that\u0026#39;s simply because \u003ccode\u003estring::find\u003c/code\u003e solves that problem.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNancy\u003c/strong\u003e sends us a… different approach to solving this problem.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003ebool\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003esubstringInString\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(string str, string::iterator \u0026amp;it)\u003c/span\u003e\n\u003c/span\u003e{\n  string tmp;\n  \u003cspan class=\"hljs-type\"\u003ebool\u003c/span\u003e result = \u003cspan class=\"hljs-literal\"\u003efalse\u003c/span\u003e;\n  \u003cspan class=\"hljs-type\"\u003eint\u003c/span\u003e size = str.\u003cspan class=\"hljs-built_in\"\u003elength\u003c/span\u003e();\n\n  \u003cspan class=\"hljs-type\"\u003eint\u003c/span\u003e count = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e;\n  \u003cspan class=\"hljs-keyword\"\u003ewhile\u003c/span\u003e (count \u0026lt; size)\n  {\n    tmp += *it;\n    it++;\n    count++;\n    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (tmp.\u003cspan class=\"hljs-built_in\"\u003efind\u003c/span\u003e(str) != string::npos)\n    {\n      result = \u003cspan class=\"hljs-literal\"\u003etrue\u003c/span\u003e;\n      it -= size;\n      \u003cspan class=\"hljs-keyword\"\u003ebreak\u003c/span\u003e;\n    }\n  }\n\n  \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e ( !result)\n  {\n    it -= size;\n  }\n\n  \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e result;\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis function iterates across a string, character by character. In this iteration, we copy one character at a time into \u003ccode\u003etmp\u003c/code\u003e. Then we see if \u003ccode\u003etmp\u003c/code\u003e contains our search \u003ccode\u003estr\u003c/code\u003e. If it does, we break out of the loop after rewinding the iterator. Outside of the loop, we check if we found the substring, and if we did, we rewind the iterator. Then we return true or false based on whether on not we found the substring.\u003c/p\u003e\n\u003cp\u003eSo wait a second. \u003ccode\u003estr\u003c/code\u003e is our search string. \u003ccode\u003eit\u003c/code\u003e is where we\u0026#39;re searching. And we copy from \u003ccode\u003eit\u003c/code\u003e up to our search string\u0026#39;s \u003ccode\u003elength\u003c/code\u003e into a temporary string. We then do a \u003ccode\u003efind\u003c/code\u003e in that temporary string- hey! This is just a \u003ccode\u003estartsWith\u003c/code\u003e check written in the most insane way possible.\u003c/p\u003e\n\u003cp\u003eWhy even bother with the while loop? While \u003ccode\u003etmp\u003c/code\u003e is shorter than the search string, the answer is always \u0026#34;no, we haven\u0026#39;t found it\u0026#34;. And the developers knew that- that\u0026#39;s why they always rewind \u003ccode\u003esize\u003c/code\u003e characters on the iterator. They\u0026#39;re always searching exactly that many characters. Of course, since we \u003cem\u003ealways\u003c/em\u003e rewind the same amount, we can also just move the \u003ccode\u003eit -= size\u003c/code\u003e statement out of the loop and out of the \u003ccode\u003eif\u003c/code\u003e statement and do it once.\u003c/p\u003e\n\u003cp\u003eNancy calls this \u0026#34;a little gem\u0026#34; in a \u0026#34;large codebase\u0026#34;. Yeah, \u003ca href=\"https://classicgems.net/gem_francevillite.htm\"\u003ea real gem\u003c/a\u003e.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Undoing the operation you do in the function is a *kind* of constness. --\u003e\u003cdiv\u003e\n\t[Advertisement] \u003cb\u003ePlan Your .NET 9 Migration with Confidence\u003c/b\u003e\u003cbr/\u003eYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. \u003cb\u003e\u003ca href=\"https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet\u0026amp;utm_source=tdwtf-footer\"\u003eDownload Free Guide Now!\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Title":"Please Find, Rewind","RssTitle":"CodeSOD: Please Find, Rewind","CachedCommentCount":15,"LastCommentDate":"\/Date(1778323156913)\/","LastCommentDateDescription":"2026-05-09","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1778049000000)\/","ISODate":"2026-05-06","DisplayDate":"2026-05-06","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t[Advertisement] \u003cb\u003ePlan Your .NET 9 Migration with Confidence\u003c/b\u003e\u003cbr/\u003eYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. \u003cb\u003e\u003ca href=\"https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet\u0026amp;utm_source=tdwtf-footer\"\u003eDownload Free Guide Now!\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Url":"https://thedailywtf.com/articles/please-find-rewind","CommentsUrl":"https://thedailywtf.com/articles/comments/please-find-rewind","Slug":"please-find-rewind","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fplease-find-rewind+-+Please+Find%2c+Rewind+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fplease-find-rewind\u0026t=Please+Find%2c+Rewind+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Please%20Find,%20Rewind:%20https://thedailywtf.com/articles/please-find-rewind","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fplease-find-rewind","PreviousArticleId":11173,"PreviousArticleTitle":"Not for Nullthing","PreviousArticleSlug":"not-for-nullthing","PreviousArticleUrl":"//thedailywtf.com/articles/not-for-nullthing","NextArticleId":11177,"NextArticleTitle":"Failing to Fail","NextArticleSlug":"failing-to-fail","NextArticleUrl":"//thedailywtf.com/articles/failing-to-fail"},{"Id":11173,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003eToday\u0026#39;s anonymous submitter sends us some code that just makes your mind go… blank when you look at it.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\t\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-type\"\u003eboolean\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003eisNull\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String value)\u003c/span\u003e {\n\t\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e StringUtils.isBlank(value);\n\t}\n\u003c/code\u003e\u003c/pre\u003e\n","BodyHtml":"\u003cp\u003eToday\u0026#39;s anonymous submitter sends us some code that just makes your mind go… blank when you look at it.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\t\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-type\"\u003eboolean\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003eisNull\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String value)\u003c/span\u003e {\n\t\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e StringUtils.isBlank(value);\n\t}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ccode\u003eStringUtils.isBlank\u003c/code\u003e comes from the Apache Commons library. It\u0026#39;s a helper function for Java which returns true if a string is, well, \u003cem\u003eblank\u003c/em\u003e. \u0026#34;Blank\u0026#34; in this case is: empty, null, or only whitespace. So it\u0026#39;s important to note that \u003ccode\u003eisBlank\u003c/code\u003e may return \u003ccode\u003etrue\u003c/code\u003e on a \u003ccode\u003enull\u003c/code\u003e, but it \u003cem\u003eisn\u0026#39;t\u003c/em\u003e truly a null-check, so wrapping it in \u003ccode\u003eisNull\u003c/code\u003e is just confusing.\u003c/p\u003e\n\u003cp\u003eBut imagine I\u0026#39;ve got another problem. Let\u0026#39;s say I have a database that\u0026#39;s been poorly normalized and maintained. And so I have a bunch of fields that maybe are \u003ccode\u003enull\u003c/code\u003e, but some also maybe contain the \u003cem\u003estring\u003c/em\u003e \u003ccode\u003e\u0026#34;null\u0026#34;\u003c/code\u003e. What am I going to do then? I need another function.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\t\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-type\"\u003eboolean\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003eisNullAndNull\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String value)\u003c/span\u003e {\n\t\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e isNull(value) \u0026amp;\u0026amp; \u003cspan class=\"hljs-string\"\u003e\u0026#34;null\u0026#34;\u003c/span\u003e.equalsIgnoreCase(value);\n\t}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAh yes, \u003ccode\u003eisNullAndNull\u003c/code\u003e, the clearest and easiest name I could imagine for this. It tells me exactly what the function is checking: is it null, and is it also null? We add a second check to our \u003ccode\u003eisNull\u003c/code\u003e call- we check if the input value matches the string \u003ccode\u003e\u0026#34;null\u0026#34;\u003c/code\u003e. Except we\u0026#39;re \u003ccode\u003e\u0026amp;\u0026amp;\u003c/code\u003eing the conditions together. So this function will always return false. It can\u0026#39;t both be blank \u003cem\u003eand\u003c/em\u003e contain the string \u003ccode\u003e\u0026#34;null\u0026#34;\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eWhich means Jennifer Null, \u003ca href=\"https://www.bbc.com/future/article/20160325-the-names-that-break-computer-systems\"\u003ewho is a real person\u003c/a\u003e, can breathe easy. This version of a null check won\u0026#39;t think she\u0026#39;s nothing.\u003c/p\u003e\n\u003c!-- Easy Reader Version: isNullAndNull is some fever dream function naming. It sounds like LLM stuff, but I don\u0027t think an LLM would have made the \"\u0026\u0026\" mistake here. --\u003e","BodyAndAdHtml":"\u003cp\u003eToday\u0026#39;s anonymous submitter sends us some code that just makes your mind go… blank when you look at it.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\t\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-type\"\u003eboolean\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003eisNull\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String value)\u003c/span\u003e {\n\t\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e StringUtils.isBlank(value);\n\t}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ccode\u003eStringUtils.isBlank\u003c/code\u003e comes from the Apache Commons library. It\u0026#39;s a helper function for Java which returns true if a string is, well, \u003cem\u003eblank\u003c/em\u003e. \u0026#34;Blank\u0026#34; in this case is: empty, null, or only whitespace. So it\u0026#39;s important to note that \u003ccode\u003eisBlank\u003c/code\u003e may return \u003ccode\u003etrue\u003c/code\u003e on a \u003ccode\u003enull\u003c/code\u003e, but it \u003cem\u003eisn\u0026#39;t\u003c/em\u003e truly a null-check, so wrapping it in \u003ccode\u003eisNull\u003c/code\u003e is just confusing.\u003c/p\u003e\n\u003cp\u003eBut imagine I\u0026#39;ve got another problem. Let\u0026#39;s say I have a database that\u0026#39;s been poorly normalized and maintained. And so I have a bunch of fields that maybe are \u003ccode\u003enull\u003c/code\u003e, but some also maybe contain the \u003cem\u003estring\u003c/em\u003e \u003ccode\u003e\u0026#34;null\u0026#34;\u003c/code\u003e. What am I going to do then? I need another function.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\t\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-type\"\u003eboolean\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003eisNullAndNull\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String value)\u003c/span\u003e {\n\t\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e isNull(value) \u0026amp;\u0026amp; \u003cspan class=\"hljs-string\"\u003e\u0026#34;null\u0026#34;\u003c/span\u003e.equalsIgnoreCase(value);\n\t}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAh yes, \u003ccode\u003eisNullAndNull\u003c/code\u003e, the clearest and easiest name I could imagine for this. It tells me exactly what the function is checking: is it null, and is it also null? We add a second check to our \u003ccode\u003eisNull\u003c/code\u003e call- we check if the input value matches the string \u003ccode\u003e\u0026#34;null\u0026#34;\u003c/code\u003e. Except we\u0026#39;re \u003ccode\u003e\u0026amp;\u0026amp;\u003c/code\u003eing the conditions together. So this function will always return false. It can\u0026#39;t both be blank \u003cem\u003eand\u003c/em\u003e contain the string \u003ccode\u003e\u0026#34;null\u0026#34;\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eWhich means Jennifer Null, \u003ca href=\"https://www.bbc.com/future/article/20160325-the-names-that-break-computer-systems\"\u003ewho is a real person\u003c/a\u003e, can breathe easy. This version of a null check won\u0026#39;t think she\u0026#39;s nothing.\u003c/p\u003e\n\u003c!-- Easy Reader Version: isNullAndNull is some fever dream function naming. It sounds like LLM stuff, but I don\u0027t think an LLM would have made the \"\u0026\u0026\" mistake here. --\u003e\u003cdiv\u003e\n\t[Advertisement] Picking up \u003cb\u003eNuGet\u003c/b\u003e is easy. Getting good at it takes time. \u003ca href=\"https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf\u0026amp;utm_medium=Footerad\u0026amp;utm_campaign=nuget\"\u003eDownload our guide to learn the best practice of NuGet for the Enterprise.\u003c/a\u003e\n\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Title":"Not for Nullthing","RssTitle":"CodeSOD: Not for Nullthing","CachedCommentCount":14,"LastCommentDate":"\/Date(1778323304773)\/","LastCommentDateDescription":"2026-05-09","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1777962600000)\/","ISODate":"2026-05-05","DisplayDate":"2026-05-05","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t[Advertisement] Picking up \u003cb\u003eNuGet\u003c/b\u003e is easy. Getting good at it takes time. \u003ca href=\"https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf\u0026amp;utm_medium=Footerad\u0026amp;utm_campaign=nuget\"\u003eDownload our guide to learn the best practice of NuGet for the Enterprise.\u003c/a\u003e\n\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Url":"https://thedailywtf.com/articles/not-for-nullthing","CommentsUrl":"https://thedailywtf.com/articles/comments/not-for-nullthing","Slug":"not-for-nullthing","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fnot-for-nullthing+-+Not+for+Nullthing+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fnot-for-nullthing\u0026t=Not+for+Nullthing+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Not%20for%20Nullthing:%20https://thedailywtf.com/articles/not-for-nullthing","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fnot-for-nullthing","PreviousArticleId":11174,"PreviousArticleTitle":"Empty Pockets","PreviousArticleSlug":"empty-pockets","PreviousArticleUrl":"//thedailywtf.com/articles/empty-pockets","NextArticleId":11176,"NextArticleTitle":"Please Find, Rewind","NextArticleSlug":"please-find-rewind","NextArticleUrl":"//thedailywtf.com/articles/please-find-rewind"},{"Id":11174,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003eIf you\u0026#39;ve seen one developer recounting how their AI agent deleted production, you\u0026#39;ve seen them all. They\u0026#39;re mostly not interesting stories. It\u0026#39;s like watching someone speeding through traffic on a motorcycle without a helmet: the eventual tragedy is sad, but it\u0026#39;s unsurprising and not an interesting story to tell. It\u0026#39;s not even interesting as a warning: the kind of person who speeds on a motorcycle without a helmet isn\u0026#39;t doing so because they don\u0026#39;t understand the danger. They\u0026#39;ve just decided it doesn\u0026#39;t apply to them.\u003c/p\u003e\n\u003cp\u003eBut the founder of PocketOS, Jer, \u003ca href=\"https://x.com/lifeof_jer/status/2048103471019434248\"\u003erecently shared\u003c/a\u003e how- whoopsie!- their AI agent deleted production. There\u0026#39;s a lot of ingredients that go into this particular disaster, which I think makes it interesting, because the use of a poorly supervised AI agent is only \u003cem\u003eone\u003c/em\u003e ingredient in this absolute trainwreck of a story.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eIf you\u0026#39;ve seen one developer recounting how their AI agent deleted production, you\u0026#39;ve seen them all. They\u0026#39;re mostly not interesting stories. It\u0026#39;s like watching someone speeding through traffic on a motorcycle without a helmet: the eventual tragedy is sad, but it\u0026#39;s unsurprising and not an interesting story to tell. It\u0026#39;s not even interesting as a warning: the kind of person who speeds on a motorcycle without a helmet isn\u0026#39;t doing so because they don\u0026#39;t understand the danger. They\u0026#39;ve just decided it doesn\u0026#39;t apply to them.\u003c/p\u003e\n\u003cp\u003eBut the founder of PocketOS, Jer, \u003ca href=\"https://x.com/lifeof_jer/status/2048103471019434248\"\u003erecently shared\u003c/a\u003e how- whoopsie!- their AI agent deleted production. There\u0026#39;s a lot of ingredients that go into this particular disaster, which I think makes it interesting, because the use of a poorly supervised AI agent is only \u003cem\u003eone\u003c/em\u003e ingredient in this absolute trainwreck of a story.\u003c/p\u003e\n\u003cp\u003ePocketOS is a small company that makes software for rental companies to manage reservations. Car rentals are a big customer, but the tool is more general than that. They manage all of their infrastructure via a service called Railway. Railway is a pretty-looking GUI tool for automating your deployments and the target environments.\u003c/p\u003e\n\u003cp\u003ePocketOS \u003cem\u003ealso\u003c/em\u003e is heavily adopting Cursor wrapping around the Claude model. They\u0026#39;ve paid big bucks for the top-end model offered. Many of their components, like Railway, offer \u003cabbr title=\"Model Context Protocol\"\u003eMCP\u003c/abbr\u003e services so that their LLM can do useful things. They\u0026#39;re using the Claude LLM to automate as much as they can.\u003c/p\u003e\n\u003cp\u003eSo far, this is all a pretty typical setup. They pointed Claude at their code and gave it a \u0026#34;routine\u0026#34; task, and sent it to work. It toddled through the problem and encountered a credential issue. It \u0026#34;decided\u0026#34; that the fix for this issue was to delete a storage volume and recreate it. It scanned through the code to find a file containing an API key, found it, and then sent a \u003ccode\u003ePOST\u003c/code\u003e request via cURL to delete the volume in question.\u003c/p\u003e\n\u003cp\u003eJer writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eTo execute the deletion, the agent went looking for an API token. It found one in a file completely unrelated to the task it was working on. That token had been created for one purpose: to add and remove custom domains via the Railway CLI for our services. We had no idea — and Railway\u0026#39;s token-creation flow gave us no warning — that the same token had blanket authority across the entire Railway GraphQL API, including destructive operations like volumeDelete. Had we known a CLI token created for routine domain operations could also delete production volumes, we would never have stored it.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eWait, the tokens you create in Railway all have god-level privileges? That sounds like a terrible idea. And you were storing the token in your code? We\u0026#39;ll come back to this in a moment, but sure, this is bad, but you can just restore from backup, right?\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eThe volume was deleted. Because Railway stores volume-level backups in the same volume — a fact buried in their own documentation that says \u0026#34;wiping a volume deletes all backups\u0026#34; — those went with it. Our most recent recoverable backup was three months old.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eOh. Oh no.\u003c/p\u003e\n\u003cp\u003eNow, I don\u0026#39;t think it\u0026#39;s literally true that Railway is storing your backups \u003cem\u003eliterally\u003c/em\u003e in the same volume as the thing they\u0026#39;re backing up. I certainly hope not. But they \u003cem\u003edo\u003c/em\u003e  apparently delete your backups when you delete the volume associated with them. Which is a choice, certainly. A bad one. And one that they \u003cem\u003edocumented\u003c/em\u003e, according to Jer. It was, in his words, \u0026#34;buried\u0026#34; in the docs.\u003c/p\u003e\n\u003cp\u003eBut let\u0026#39;s go back to the tokens for a moment. I am not a Railway user, but I checked out the tool and went through the process of creating a project token. And while no, Railway does not give you big red flags warning you \u0026#34;Hey, this token can do ABSOLUTELY ANYTHING\u0026#34;, it also \u003cem\u003enever gives you an opportunity to scope the token\u003c/em\u003e. Which, I don\u0026#39;t know about you, but the first thing I do when I create an authentication entity is try and figure out how to control its authorizations, because I assume at the start \u003cem\u003eit doesn\u0026#39;t have any\u003c/em\u003e. That\u0026#39;d be sane.\u003c/p\u003e\n\u003cp\u003eThe scoping happens when you create the token, depending on what context you\u0026#39;re in when you do it. It\u0026#39;s only a handful of scopes, and no fine grained permissions on API keys at all. The lowest level is \u0026#34;Project\u0026#34; which can do anything to a single environment- which does mean that even if you, like Jer\u0026#39;s team, wanted to have a script that changed some DNS settings in production, that same key could be used to delete volumes in production. Which means you really \u003cem\u003ereally\u003c/em\u003e want to take care of that key, and you certainly don\u0026#39;t want to leave it where some junior developer or bumbling AI agent can find it.\u003c/p\u003e\n\u003cp\u003eJer also complains that Railway shouldn\u0026#39;t allow an API call to take destructive actions without more protections, like forcing someone to type in the name of the thing being deleted or sending a confirmation email, or something. This, I\u0026#39;m more skeptical of. Most cloud providers \u003cem\u003edon\u0026#39;t\u003c/em\u003e offer anything like this in their APIs, at least that I\u0026#39;ve seen, because on a certain level, if you\u0026#39;re invoking the API with the proper credentials, that\u0026#39;s a big enough hill to climb that we can assume you\u0026#39;ve intended your action. The correct way to protect against this is properly scoped keys \u003cem\u003eand keeping those keys secure and not just lying around in plain text\u003c/em\u003e. There\u0026#39;s a certain aspect of understanding that you\u0026#39;re using a potentially dangerous tool and need to take the responsibility for safety into your own hands; while a table saw can easily take some fingers off, it\u0026#39;s perfectly safe \u003cem\u003ewhen used correctly\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThis is all bad, but how can we make it worse? Well, Jer demanded that Claude \u0026#34;explain itself\u0026#34;. In a section called \u0026#34;The Agent\u0026#39;s Confession\u0026#34;, Jer highlights that the agent is able to identify the explict rules that it failed to follow.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eRead that again. The agent itself enumerates the safety rules it was given and admits to violating every one. This is not me speculating about agent failure modes. This is the agent on the record, in writing.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eNo, it is \u003cem\u003enot\u003c/em\u003e the agent on record. I see this kind of thing a lot when people talk about LLMs. An LLM cannot explain its reasoning. It cannot go on \u0026#34;the record\u0026#34;. It cannot confess to anything. While what it plops out when asked might be \u003cem\u003einteresting\u003c/em\u003e, it is not \u003cem\u003ean explanation\u003c/em\u003e. The only explanation is that it\u0026#39;s a powerful statistical model trying to create a plausible string of tokens! It\u0026#39;s simply looking at its context window and your prompt and trying to predict what it should say. It can tell you what rules it violated not because it understands the rules or knows it violated any rules, but because those rules are in its context window. If you ask it right, it\u0026#39;ll confess to killing JFK and framing Oswald for the crime.\u003c/p\u003e\n\u003cp\u003eJer then tries to ensure that Cursor takes some of the blame, pointing to Cursor\u0026#39;s \u0026#34;guardrails\u0026#34; \u003ca href=\"https://cursor.com/docs/agent/security\"\u003edocumentation\u003c/a\u003e. Except, here, the documentation is actually quite explicit about what those guardrails guarantee. If you\u0026#39;re using a first-party tool, it will prohibit unsafe operations. When using 3rd party MCPs, like Railway\u0026#39;s, the only guardrail is that it requires human approval for every action- unless you update your allowlist for that MCP. If you put them in your allowlist, \u003cem\u003ethe guardrails go away\u003c/em\u003e. Jer argues that tools should enforce more protection against LLM behaviors, but the problem with that is people- like the PocketOS team- \u003cem\u003eturn those protections off\u003c/em\u003e. And like a lot of safety mistakes, they can get away with it all the way up until the point where they can\u0026#39;t.\u003c/p\u003e\n\u003cp\u003eJer follows this by listing off a pile of other times using Cursor has caused disasters, which isn\u0026#39;t making the argument he thinks it is: yes, Cursor is dangerous, \u003cem\u003ebut those dangers are well known\u003c/em\u003e. It makes the choice to turn Cursor loose without strict supervision seem even more foolish.\u003c/p\u003e\n\u003cp\u003eJer writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eFor now I want this incident understood on its own terms: as a Cursor failure, a Railway failure, and a backup-architecture failure that all happened to one company in one Friday afternoon.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eIt\u0026#39;s \u003cem\u003ealso\u003c/em\u003e a PocketOS failure. It\u0026#39;s a failure to properly assess the tools and environments you chose to use for your product. A failure to read and understand the docs for vital features, like *backups*. A failure to employ even the most basic safeguards. A failure to put a second\u0026#39;s thought into key management- even if that key was \u003cem\u003eonly\u003c/em\u003e for DNS entries, you \u003cem\u003estill\u003c/em\u003e shouldn\u0026#39;t chuck it in source control. A failure to have a competent backup strategy. It\u0026#39;s worth noting that they \u003cem\u003edid\u003c/em\u003e restore from a three month old backup, which means \u003cem\u003ethey were at one point\u003c/em\u003e taking backups outside of Railway\u0026#39;s volume setup. That was a wise decision. That they stopped is a failure.\u003c/p\u003e\n\u003cp\u003eThe first rule of disaster retrospectives is that it\u0026#39;s never one piece that\u0026#39;s the failure. It\u0026#39;s never one person\u0026#39;s fault, one tool\u0026#39;s fault, one vendor\u0026#39;s fault. It\u0026#39;s a systemic failure. Railway\u0026#39;s keys should be finer grained. But also, you shouldn\u0026#39;t leave keys lying around. Deleting backups when you delete the volume is a terrible idea, but having only one service for backups (that\u0026#39;s also your primary site) is a terrible idea. Claude\u0026#39;s ability to enforce its own guardrails should be better, but LLMs are notoriously dangerous about this: \u003cem\u003eyou should know better\u003c/em\u003e, and by your own words \u003cem\u003eyou did\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThis is not an anti-AI post, or even a \u0026#34;get a load of this asshole\u0026#34; post. \u003c!-- okay, it\u0027s a LITTLE BIT a \"get a load of this asshole\" post --\u003e It is a \u0026#34;understand the damn tools you\u0026#39;re using\u0026#34; post. Be critical of them. Don\u0026#39;t trust them. Ever. Especially LLMs, because the worst part of an LLM is that it takes away the one thing computers used to be good at: predictable, deterministic behavior. But not just LLMs: don\u0026#39;t trust your cloud provider, don\u0026#39;t trust your infrastructure manager. Dig into them and understand how they work, and if they seem to complicated to understand, than they may be too complicated to trust.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eUpdate\u003c/strong\u003e: As pointed out in the featured comment below, Railway did finally get a backup restored. So they got their data back. Yay? From the post, Jer remains committed to making this a Railway issue and not a PocketOS issue.\u003c/p\u003e\n\u003c!-- Easy Reader Version: The really fun part is Jer complaining that the CEO of Railway hasn\u0027t so much as called him. The entitlement, man. --\u003e","BodyAndAdHtml":"\u003cp\u003eIf you\u0026#39;ve seen one developer recounting how their AI agent deleted production, you\u0026#39;ve seen them all. They\u0026#39;re mostly not interesting stories. It\u0026#39;s like watching someone speeding through traffic on a motorcycle without a helmet: the eventual tragedy is sad, but it\u0026#39;s unsurprising and not an interesting story to tell. It\u0026#39;s not even interesting as a warning: the kind of person who speeds on a motorcycle without a helmet isn\u0026#39;t doing so because they don\u0026#39;t understand the danger. They\u0026#39;ve just decided it doesn\u0026#39;t apply to them.\u003c/p\u003e\n\u003cp\u003eBut the founder of PocketOS, Jer, \u003ca href=\"https://x.com/lifeof_jer/status/2048103471019434248\"\u003erecently shared\u003c/a\u003e how- whoopsie!- their AI agent deleted production. There\u0026#39;s a lot of ingredients that go into this particular disaster, which I think makes it interesting, because the use of a poorly supervised AI agent is only \u003cem\u003eone\u003c/em\u003e ingredient in this absolute trainwreck of a story.\u003c/p\u003e\n\u003cp\u003ePocketOS is a small company that makes software for rental companies to manage reservations. Car rentals are a big customer, but the tool is more general than that. They manage all of their infrastructure via a service called Railway. Railway is a pretty-looking GUI tool for automating your deployments and the target environments.\u003c/p\u003e\n\u003cp\u003ePocketOS \u003cem\u003ealso\u003c/em\u003e is heavily adopting Cursor wrapping around the Claude model. They\u0026#39;ve paid big bucks for the top-end model offered. Many of their components, like Railway, offer \u003cabbr title=\"Model Context Protocol\"\u003eMCP\u003c/abbr\u003e services so that their LLM can do useful things. They\u0026#39;re using the Claude LLM to automate as much as they can.\u003c/p\u003e\n\u003cp\u003eSo far, this is all a pretty typical setup. They pointed Claude at their code and gave it a \u0026#34;routine\u0026#34; task, and sent it to work. It toddled through the problem and encountered a credential issue. It \u0026#34;decided\u0026#34; that the fix for this issue was to delete a storage volume and recreate it. It scanned through the code to find a file containing an API key, found it, and then sent a \u003ccode\u003ePOST\u003c/code\u003e request via cURL to delete the volume in question.\u003c/p\u003e\n\u003cp\u003eJer writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eTo execute the deletion, the agent went looking for an API token. It found one in a file completely unrelated to the task it was working on. That token had been created for one purpose: to add and remove custom domains via the Railway CLI for our services. We had no idea — and Railway\u0026#39;s token-creation flow gave us no warning — that the same token had blanket authority across the entire Railway GraphQL API, including destructive operations like volumeDelete. Had we known a CLI token created for routine domain operations could also delete production volumes, we would never have stored it.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eWait, the tokens you create in Railway all have god-level privileges? That sounds like a terrible idea. And you were storing the token in your code? We\u0026#39;ll come back to this in a moment, but sure, this is bad, but you can just restore from backup, right?\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eThe volume was deleted. Because Railway stores volume-level backups in the same volume — a fact buried in their own documentation that says \u0026#34;wiping a volume deletes all backups\u0026#34; — those went with it. Our most recent recoverable backup was three months old.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eOh. Oh no.\u003c/p\u003e\n\u003cp\u003eNow, I don\u0026#39;t think it\u0026#39;s literally true that Railway is storing your backups \u003cem\u003eliterally\u003c/em\u003e in the same volume as the thing they\u0026#39;re backing up. I certainly hope not. But they \u003cem\u003edo\u003c/em\u003e  apparently delete your backups when you delete the volume associated with them. Which is a choice, certainly. A bad one. And one that they \u003cem\u003edocumented\u003c/em\u003e, according to Jer. It was, in his words, \u0026#34;buried\u0026#34; in the docs.\u003c/p\u003e\n\u003cp\u003eBut let\u0026#39;s go back to the tokens for a moment. I am not a Railway user, but I checked out the tool and went through the process of creating a project token. And while no, Railway does not give you big red flags warning you \u0026#34;Hey, this token can do ABSOLUTELY ANYTHING\u0026#34;, it also \u003cem\u003enever gives you an opportunity to scope the token\u003c/em\u003e. Which, I don\u0026#39;t know about you, but the first thing I do when I create an authentication entity is try and figure out how to control its authorizations, because I assume at the start \u003cem\u003eit doesn\u0026#39;t have any\u003c/em\u003e. That\u0026#39;d be sane.\u003c/p\u003e\n\u003cp\u003eThe scoping happens when you create the token, depending on what context you\u0026#39;re in when you do it. It\u0026#39;s only a handful of scopes, and no fine grained permissions on API keys at all. The lowest level is \u0026#34;Project\u0026#34; which can do anything to a single environment- which does mean that even if you, like Jer\u0026#39;s team, wanted to have a script that changed some DNS settings in production, that same key could be used to delete volumes in production. Which means you really \u003cem\u003ereally\u003c/em\u003e want to take care of that key, and you certainly don\u0026#39;t want to leave it where some junior developer or bumbling AI agent can find it.\u003c/p\u003e\n\u003cp\u003eJer also complains that Railway shouldn\u0026#39;t allow an API call to take destructive actions without more protections, like forcing someone to type in the name of the thing being deleted or sending a confirmation email, or something. This, I\u0026#39;m more skeptical of. Most cloud providers \u003cem\u003edon\u0026#39;t\u003c/em\u003e offer anything like this in their APIs, at least that I\u0026#39;ve seen, because on a certain level, if you\u0026#39;re invoking the API with the proper credentials, that\u0026#39;s a big enough hill to climb that we can assume you\u0026#39;ve intended your action. The correct way to protect against this is properly scoped keys \u003cem\u003eand keeping those keys secure and not just lying around in plain text\u003c/em\u003e. There\u0026#39;s a certain aspect of understanding that you\u0026#39;re using a potentially dangerous tool and need to take the responsibility for safety into your own hands; while a table saw can easily take some fingers off, it\u0026#39;s perfectly safe \u003cem\u003ewhen used correctly\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThis is all bad, but how can we make it worse? Well, Jer demanded that Claude \u0026#34;explain itself\u0026#34;. In a section called \u0026#34;The Agent\u0026#39;s Confession\u0026#34;, Jer highlights that the agent is able to identify the explict rules that it failed to follow.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eRead that again. The agent itself enumerates the safety rules it was given and admits to violating every one. This is not me speculating about agent failure modes. This is the agent on the record, in writing.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eNo, it is \u003cem\u003enot\u003c/em\u003e the agent on record. I see this kind of thing a lot when people talk about LLMs. An LLM cannot explain its reasoning. It cannot go on \u0026#34;the record\u0026#34;. It cannot confess to anything. While what it plops out when asked might be \u003cem\u003einteresting\u003c/em\u003e, it is not \u003cem\u003ean explanation\u003c/em\u003e. The only explanation is that it\u0026#39;s a powerful statistical model trying to create a plausible string of tokens! It\u0026#39;s simply looking at its context window and your prompt and trying to predict what it should say. It can tell you what rules it violated not because it understands the rules or knows it violated any rules, but because those rules are in its context window. If you ask it right, it\u0026#39;ll confess to killing JFK and framing Oswald for the crime.\u003c/p\u003e\n\u003cp\u003eJer then tries to ensure that Cursor takes some of the blame, pointing to Cursor\u0026#39;s \u0026#34;guardrails\u0026#34; \u003ca href=\"https://cursor.com/docs/agent/security\"\u003edocumentation\u003c/a\u003e. Except, here, the documentation is actually quite explicit about what those guardrails guarantee. If you\u0026#39;re using a first-party tool, it will prohibit unsafe operations. When using 3rd party MCPs, like Railway\u0026#39;s, the only guardrail is that it requires human approval for every action- unless you update your allowlist for that MCP. If you put them in your allowlist, \u003cem\u003ethe guardrails go away\u003c/em\u003e. Jer argues that tools should enforce more protection against LLM behaviors, but the problem with that is people- like the PocketOS team- \u003cem\u003eturn those protections off\u003c/em\u003e. And like a lot of safety mistakes, they can get away with it all the way up until the point where they can\u0026#39;t.\u003c/p\u003e\n\u003cp\u003eJer follows this by listing off a pile of other times using Cursor has caused disasters, which isn\u0026#39;t making the argument he thinks it is: yes, Cursor is dangerous, \u003cem\u003ebut those dangers are well known\u003c/em\u003e. It makes the choice to turn Cursor loose without strict supervision seem even more foolish.\u003c/p\u003e\n\u003cp\u003eJer writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eFor now I want this incident understood on its own terms: as a Cursor failure, a Railway failure, and a backup-architecture failure that all happened to one company in one Friday afternoon.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eIt\u0026#39;s \u003cem\u003ealso\u003c/em\u003e a PocketOS failure. It\u0026#39;s a failure to properly assess the tools and environments you chose to use for your product. A failure to read and understand the docs for vital features, like *backups*. A failure to employ even the most basic safeguards. A failure to put a second\u0026#39;s thought into key management- even if that key was \u003cem\u003eonly\u003c/em\u003e for DNS entries, you \u003cem\u003estill\u003c/em\u003e shouldn\u0026#39;t chuck it in source control. A failure to have a competent backup strategy. It\u0026#39;s worth noting that they \u003cem\u003edid\u003c/em\u003e restore from a three month old backup, which means \u003cem\u003ethey were at one point\u003c/em\u003e taking backups outside of Railway\u0026#39;s volume setup. That was a wise decision. That they stopped is a failure.\u003c/p\u003e\n\u003cp\u003eThe first rule of disaster retrospectives is that it\u0026#39;s never one piece that\u0026#39;s the failure. It\u0026#39;s never one person\u0026#39;s fault, one tool\u0026#39;s fault, one vendor\u0026#39;s fault. It\u0026#39;s a systemic failure. Railway\u0026#39;s keys should be finer grained. But also, you shouldn\u0026#39;t leave keys lying around. Deleting backups when you delete the volume is a terrible idea, but having only one service for backups (that\u0026#39;s also your primary site) is a terrible idea. Claude\u0026#39;s ability to enforce its own guardrails should be better, but LLMs are notoriously dangerous about this: \u003cem\u003eyou should know better\u003c/em\u003e, and by your own words \u003cem\u003eyou did\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThis is not an anti-AI post, or even a \u0026#34;get a load of this asshole\u0026#34; post. \u003c!-- okay, it\u0027s a LITTLE BIT a \"get a load of this asshole\" post --\u003e It is a \u0026#34;understand the damn tools you\u0026#39;re using\u0026#34; post. Be critical of them. Don\u0026#39;t trust them. Ever. Especially LLMs, because the worst part of an LLM is that it takes away the one thing computers used to be good at: predictable, deterministic behavior. But not just LLMs: don\u0026#39;t trust your cloud provider, don\u0026#39;t trust your infrastructure manager. Dig into them and understand how they work, and if they seem to complicated to understand, than they may be too complicated to trust.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eUpdate\u003c/strong\u003e: As pointed out in the featured comment below, Railway did finally get a backup restored. So they got their data back. Yay? From the post, Jer remains committed to making this a Railway issue and not a PocketOS issue.\u003c/p\u003e\n\u003c!-- Easy Reader Version: The really fun part is Jer complaining that the CEO of Railway hasn\u0027t so much as called him. The entitlement, man. --\u003e\u003cdiv\u003e\n\t[Advertisement] Picking up \u003cb\u003eNuGet\u003c/b\u003e is easy. Getting good at it takes time. \u003ca href=\"https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf\u0026amp;utm_medium=Footerad\u0026amp;utm_campaign=nuget\"\u003eDownload our guide to learn the best practice of NuGet for the Enterprise.\u003c/a\u003e\n\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Title":"Empty Pockets","RssTitle":"Empty Pockets","CachedCommentCount":40,"LastCommentDate":"\/Date(1778257118373)\/","LastCommentDateDescription":"2026-05-08","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1777876200000)\/","ISODate":"2026-05-04","DisplayDate":"2026-05-04","Series":{"Slug":"feature-articles","Title":"Feature Articles","Description":"","CssClass":"featured"},"FooterAdHtml":"\u003cdiv\u003e\n\t[Advertisement] Picking up \u003cb\u003eNuGet\u003c/b\u003e is easy. Getting good at it takes time. \u003ca href=\"https://inedo.com/support/whitepapers/nuget-guide?utm_source=tdwtf\u0026amp;utm_medium=Footerad\u0026amp;utm_campaign=nuget\"\u003eDownload our guide to learn the best practice of NuGet for the Enterprise.\u003c/a\u003e\n\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Url":"https://thedailywtf.com/articles/empty-pockets","CommentsUrl":"https://thedailywtf.com/articles/comments/empty-pockets","Slug":"empty-pockets","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fempty-pockets+-+Empty+Pockets+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fempty-pockets\u0026t=Empty+Pockets+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Empty%20Pockets:%20https://thedailywtf.com/articles/empty-pockets","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fempty-pockets","PreviousArticleId":11175,"PreviousArticleTitle":"Parametric Projection","PreviousArticleSlug":"parametric-projection","PreviousArticleUrl":"//thedailywtf.com/articles/parametric-projection","NextArticleId":11173,"NextArticleTitle":"Not for Nullthing","NextArticleSlug":"not-for-nullthing","NextArticleUrl":"//thedailywtf.com/articles/not-for-nullthing"},{"Id":11175,"Author":{"Name":"Lyle Seaman","FirstName":"Lyle","ShortDescription":"networking, security infra and filesystems kernel hacker turned application programmer, SRE and engineering manager, Lyle traded tilting at windmills for viking at Vikings but couldn\u0027t catch any.","DescriptionHtml":null,"Slug":"lyle-seaman","IsAdmin":true,"IsActive":true,"ImageUrl":"/images/imageslws/viking.jpg"},"Status":"Published","SummaryHtml":"\u003cstrong\u003eRoger C.\u003c/strong\u003e gets on second base with an unforced error.  \u0026#34;Not only is the content too large, the error message informing us of this is also too large to fit the visible space. A layered, double WTF.\u0026#34;\n\u003cp\u003e\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#782b1790d9d549d6a8acf4045669d7a6\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"782b1790d9d549d6a8acf4045669d7a6\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/782b1790d9d549d6a8acf4045669d7a6.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cstrong\u003eRoger C.\u003c/strong\u003e gets on second base with an unforced error.  \u0026#34;Not only is the content too large, the error message informing us of this is also too large to fit the visible space. A layered, double WTF.\u0026#34;\n\u003cp\u003e\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#782b1790d9d549d6a8acf4045669d7a6\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"782b1790d9d549d6a8acf4045669d7a6\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/782b1790d9d549d6a8acf4045669d7a6.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;AWS Spellcheck Fail!\u0026#34; alerts\n\u003cstrong\u003ePeter\u003c/strong\u003e\n\u0026#34;If only someone at AWS knew the correct paramters to\nactivate the spellcheck.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#ee85e87fd7cb4cc2ac3038cb9f97ccf8\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"ee85e87fd7cb4cc2ac3038cb9f97ccf8\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/ee85e87fd7cb4cc2ac3038cb9f97ccf8.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;How long is too long for a job to be open? \u0026#34; wonders\n\u003cstrong\u003eLincoln K.\u003c/strong\u003e\n\u0026#34;I didn\u0026#39;t even know LinkedIn existed 61 years ago, let\nalone was accepting postings... Though only 81 applicants in that\ntime is hardly an impressive turn-out.\u0026#34; For a \u0026#34;Vice President Operations and Quality Control\u0026#34;, no less.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#1c3d4b06a37e4119b62dc39bad29b9a3\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"1c3d4b06a37e4119b62dc39bad29b9a3\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/1c3d4b06a37e4119b62dc39bad29b9a3.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003eAn anonymous Richard reports \n\u0026#34;This came through my door. On a card that, in order to get to my door, had my full address printed on it, including my \u003carea/\u003e.\u0026#34;\n\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#9df5e07d210846f08dc925105f19b64b\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"9df5e07d210846f08dc925105f19b64b\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/9df5e07d210846f08dc925105f19b64b.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003eOenophile Abroad\n\u003cstrong\u003eMichael R.\u003c/strong\u003e shares \n\u0026#34;My Macbook broke after being \u0026#34;exposed\u0026#34; to red wine. As\na German in London it pleases me so see that\nthe repair shop offers this time granularity.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#a9f634b888de4927babb91d7d2920579\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"a9f634b888de4927babb91d7d2920579\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/a9f634b888de4927babb91d7d2920579.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n","BodyAndAdHtml":"\u003cstrong\u003eRoger C.\u003c/strong\u003e gets on second base with an unforced error.  \u0026#34;Not only is the content too large, the error message informing us of this is also too large to fit the visible space. A layered, double WTF.\u0026#34;\n\u003cp\u003e\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#782b1790d9d549d6a8acf4045669d7a6\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"782b1790d9d549d6a8acf4045669d7a6\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/782b1790d9d549d6a8acf4045669d7a6.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;AWS Spellcheck Fail!\u0026#34; alerts\n\u003cstrong\u003ePeter\u003c/strong\u003e\n\u0026#34;If only someone at AWS knew the correct paramters to\nactivate the spellcheck.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#ee85e87fd7cb4cc2ac3038cb9f97ccf8\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"ee85e87fd7cb4cc2ac3038cb9f97ccf8\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/ee85e87fd7cb4cc2ac3038cb9f97ccf8.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;How long is too long for a job to be open? \u0026#34; wonders\n\u003cstrong\u003eLincoln K.\u003c/strong\u003e\n\u0026#34;I didn\u0026#39;t even know LinkedIn existed 61 years ago, let\nalone was accepting postings... Though only 81 applicants in that\ntime is hardly an impressive turn-out.\u0026#34; For a \u0026#34;Vice President Operations and Quality Control\u0026#34;, no less.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#1c3d4b06a37e4119b62dc39bad29b9a3\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"1c3d4b06a37e4119b62dc39bad29b9a3\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/1c3d4b06a37e4119b62dc39bad29b9a3.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003eAn anonymous Richard reports \n\u0026#34;This came through my door. On a card that, in order to get to my door, had my full address printed on it, including my \u003carea/\u003e.\u0026#34;\n\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#9df5e07d210846f08dc925105f19b64b\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"9df5e07d210846f08dc925105f19b64b\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/9df5e07d210846f08dc925105f19b64b.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003eOenophile Abroad\n\u003cstrong\u003eMichael R.\u003c/strong\u003e shares \n\u0026#34;My Macbook broke after being \u0026#34;exposed\u0026#34; to red wine. As\na German in London it pleases me so see that\nthe repair shop offers this time granularity.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#a9f634b888de4927babb91d7d2920579\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"a9f634b888de4927babb91d7d2920579\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/19/a9f634b888de4927babb91d7d2920579.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tKeep 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.\u003ca href=\"https://inedo.com/proget?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=PlebsFooter\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Parametric Projection","RssTitle":"Error\u0027d: Parametric Projection","CachedCommentCount":9,"LastCommentDate":"\/Date(1778251118577)\/","LastCommentDateDescription":"2026-05-08","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1777617000000)\/","ISODate":"2026-05-01","DisplayDate":"2026-05-01","Series":{"Slug":"errord","Title":"Error\u0027d","Description":"Error\u0027d features fun error messages and other visual oddities from the world of IT.","CssClass":"errord"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tKeep 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.\u003ca href=\"https://inedo.com/proget?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=PlebsFooter\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/parametric-projection","CommentsUrl":"https://thedailywtf.com/articles/comments/parametric-projection","Slug":"parametric-projection","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fparametric-projection+-+Parametric+Projection+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fparametric-projection\u0026t=Parametric+Projection+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Parametric%20Projection:%20https://thedailywtf.com/articles/parametric-projection","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fparametric-projection","PreviousArticleId":11172,"PreviousArticleTitle":"Cancel Catch","PreviousArticleSlug":"cancel-catch","PreviousArticleUrl":"//thedailywtf.com/articles/cancel-catch","NextArticleId":11174,"NextArticleTitle":"Empty Pockets","NextArticleSlug":"empty-pockets","NextArticleUrl":"//thedailywtf.com/articles/empty-pockets"},{"Id":11172,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003e\u0026#34;This WTF is in Matlab\u0026#34; almost feels like cheating. At one place I worked, somebody\u0026#39;s job was struggling through a mountain of Matlab code and porting it into C. \u0026#34;This Matlab code looks like it was written by an alien,\u0026#34; also doesn\u0026#39;t really get much traction- \u003cem\u003eall\u003c/em\u003e Matlab code looks like it was written by an alien. This falls into the realm of \u0026#34;Researchers use Matlab, researchers may be very smart about their domain, but generally don\u0026#39;t know the first thing about writing maintainable code, because that\u0026#39;s not their job.\u0026#34;\u003c/p\u003e\n\u003cp\u003eBut let\u0026#39;s take a look at some MatLab \u003cstrong\u003eCarl W\u003c/strong\u003e found:\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u0026#34;This WTF is in Matlab\u0026#34; almost feels like cheating. At one place I worked, somebody\u0026#39;s job was struggling through a mountain of Matlab code and porting it into C. \u0026#34;This Matlab code looks like it was written by an alien,\u0026#34; also doesn\u0026#39;t really get much traction- \u003cem\u003eall\u003c/em\u003e Matlab code looks like it was written by an alien. This falls into the realm of \u0026#34;Researchers use Matlab, researchers may be very smart about their domain, but generally don\u0026#39;t know the first thing about writing maintainable code, because that\u0026#39;s not their job.\u0026#34;\u003c/p\u003e\n\u003cp\u003eBut let\u0026#39;s take a look at some MatLab \u003cstrong\u003eCarl W\u003c/strong\u003e found:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-matlab\"\u003e    \u003cspan class=\"hljs-keyword\"\u003etry\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (~\u003cspan class=\"hljs-built_in\"\u003eisempty\u003c/span\u003e(fieldnames(bigStruct)) \u0026amp;\u0026amp; isfield(bigStruct,\u003cspan class=\"hljs-string\"\u003e\u0026#39;pathName\u0026#39;\u003c/span\u003e))\n            [FileName, PathName] = uigetfile(bigStruct.pathName);\n        \u003cspan class=\"hljs-keyword\"\u003eelse\u003c/span\u003e\n            [FileName, PathName] = uigetfile(lastPath); \u003cspan class=\"hljs-comment\"\u003e%lastPath holds previous path\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eend\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003ecatch\u003c/span\u003e\n        bigStruct = struct;\n    \u003cspan class=\"hljs-keyword\"\u003eend\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe \u003ccode\u003euigetfile\u003c/code\u003e function opens a file dialog box. When the user selects a file, \u003ccode\u003eFileName\u003c/code\u003e holds the filename, \u003ccode\u003ePathName\u003c/code\u003e holds the containing path. If the user doesn\u0026#39;t select a valid file, or clicks \u0026#34;Cancel\u0026#34;, both of those variables get set to \u003ccode\u003e0\u003c/code\u003e. It\u0026#39;s then up to the caller to check the return value and decide what happens next.\u003c/p\u003e\n\u003cp\u003eWhich is not what happens here, obviously. The developer responsible seems to believe that it maybe throws an exception? And they can just catch it? Carl\u0026#39;s best guess is that this is a \u0026#34;weird\u0026#34; way to catch the cancel button. But it does mean that \u003ccode\u003eFileName\u003c/code\u003e and \u003ccode\u003ePathName\u003c/code\u003e get set to \u003ccode\u003e0\u003c/code\u003e, and those zeros propagate until something finally tries to open those files, at which point everything blows up and the user doesn\u0026#39;t know why.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Look, I agree that index from 1 is a more \"human\" way of talking about arrays, but 0 is too ingrained in my brain and it feels wrong every time. --\u003e","BodyAndAdHtml":"\u003cp\u003e\u0026#34;This WTF is in Matlab\u0026#34; almost feels like cheating. At one place I worked, somebody\u0026#39;s job was struggling through a mountain of Matlab code and porting it into C. \u0026#34;This Matlab code looks like it was written by an alien,\u0026#34; also doesn\u0026#39;t really get much traction- \u003cem\u003eall\u003c/em\u003e Matlab code looks like it was written by an alien. This falls into the realm of \u0026#34;Researchers use Matlab, researchers may be very smart about their domain, but generally don\u0026#39;t know the first thing about writing maintainable code, because that\u0026#39;s not their job.\u0026#34;\u003c/p\u003e\n\u003cp\u003eBut let\u0026#39;s take a look at some MatLab \u003cstrong\u003eCarl W\u003c/strong\u003e found:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-matlab\"\u003e    \u003cspan class=\"hljs-keyword\"\u003etry\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (~\u003cspan class=\"hljs-built_in\"\u003eisempty\u003c/span\u003e(fieldnames(bigStruct)) \u0026amp;\u0026amp; isfield(bigStruct,\u003cspan class=\"hljs-string\"\u003e\u0026#39;pathName\u0026#39;\u003c/span\u003e))\n            [FileName, PathName] = uigetfile(bigStruct.pathName);\n        \u003cspan class=\"hljs-keyword\"\u003eelse\u003c/span\u003e\n            [FileName, PathName] = uigetfile(lastPath); \u003cspan class=\"hljs-comment\"\u003e%lastPath holds previous path\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eend\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003ecatch\u003c/span\u003e\n        bigStruct = struct;\n    \u003cspan class=\"hljs-keyword\"\u003eend\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe \u003ccode\u003euigetfile\u003c/code\u003e function opens a file dialog box. When the user selects a file, \u003ccode\u003eFileName\u003c/code\u003e holds the filename, \u003ccode\u003ePathName\u003c/code\u003e holds the containing path. If the user doesn\u0026#39;t select a valid file, or clicks \u0026#34;Cancel\u0026#34;, both of those variables get set to \u003ccode\u003e0\u003c/code\u003e. It\u0026#39;s then up to the caller to check the return value and decide what happens next.\u003c/p\u003e\n\u003cp\u003eWhich is not what happens here, obviously. The developer responsible seems to believe that it maybe throws an exception? And they can just catch it? Carl\u0026#39;s best guess is that this is a \u0026#34;weird\u0026#34; way to catch the cancel button. But it does mean that \u003ccode\u003eFileName\u003c/code\u003e and \u003ccode\u003ePathName\u003c/code\u003e get set to \u003ccode\u003e0\u003c/code\u003e, and those zeros propagate until something finally tries to open those files, at which point everything blows up and the user doesn\u0026#39;t know why.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Look, I agree that index from 1 is a more \"human\" way of talking about arrays, but 0 is too ingrained in my brain and it feels wrong every time. --\u003e\u003cdiv\u003e\n\t[Advertisement] \u003cb\u003ePlan Your .NET 9 Migration with Confidence\u003c/b\u003e\u003cbr/\u003eYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. \u003cb\u003e\u003ca href=\"https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet\u0026amp;utm_source=tdwtf-footer\"\u003eDownload Free Guide Now!\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Title":"Cancel Catch","RssTitle":"CodeSOD: Cancel Catch","CachedCommentCount":16,"LastCommentDate":"\/Date(1778099538277)\/","LastCommentDateDescription":"2026-05-06","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1777530600000)\/","ISODate":"2026-04-30","DisplayDate":"2026-04-30","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t[Advertisement] \u003cb\u003ePlan Your .NET 9 Migration with Confidence\u003c/b\u003e\u003cbr/\u003eYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. \u003cb\u003e\u003ca href=\"https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet\u0026amp;utm_source=tdwtf-footer\"\u003eDownload Free Guide Now!\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Url":"https://thedailywtf.com/articles/cancel-catch","CommentsUrl":"https://thedailywtf.com/articles/comments/cancel-catch","Slug":"cancel-catch","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fcancel-catch+-+Cancel+Catch+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fcancel-catch\u0026t=Cancel+Catch+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Cancel%20Catch:%20https://thedailywtf.com/articles/cancel-catch","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fcancel-catch","PreviousArticleId":11171,"PreviousArticleTitle":"A Whale of a Problem","PreviousArticleSlug":"a-whale-of-a-problem","PreviousArticleUrl":"//thedailywtf.com/articles/a-whale-of-a-problem","NextArticleId":11175,"NextArticleTitle":"Parametric Projection","NextArticleSlug":"parametric-projection","NextArticleUrl":"//thedailywtf.com/articles/parametric-projection"}]