[{"Id":11297,"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\u003c/p\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eDr. Doom...scroller\u003c/strong\u003e titled this one \u0026#34;Scrollbar-ception\u0026#34;.  Said he\n\u0026#34;Screenshot of the TikTok webpage (i.e. in a desktop browser)\nwhile not logged in. I swear this wasn\u0026#39;t a NSFW\nTikTok video, instead it was a montage of some live\nshow from some singer. Anyway... Back on the topic of\nthe actual publishable snarky comments: Social media is known for\ndoom-scrolling. Well, these are scrollbars of doom. Or doom-scrollbars.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003e\u003c/p\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eDr. Doom...scroller\u003c/strong\u003e titled this one \u0026#34;Scrollbar-ception\u0026#34;.  Said he\n\u0026#34;Screenshot of the TikTok webpage (i.e. in a desktop browser)\nwhile not logged in. I swear this wasn\u0026#39;t a NSFW\nTikTok video, instead it was a montage of some live\nshow from some singer. Anyway... Back on the topic of\nthe actual publishable snarky comments: Social media is known for\ndoom-scrolling. Well, these are scrollbars of doom. Or doom-scrollbars.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d6711f9e7fb94f9ab616977c242562b2\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d6711f9e7fb94f9ab616977c242562b2\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/d6711f9e7fb94f9ab616977c242562b2.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eAn anonymous reader clarified \n\u0026#34;I was reorganizing the document by drag-and-dropping a bunch of\ntable cells a bit too far for Word\u0026#39;s comfort and\nit\u0026#39;s telling me what I did wrong.\u0026#34; Clearly.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#01270f373b754d9f8cb520b5cd8ef856\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"01270f373b754d9f8cb520b5cd8ef856\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/01270f373b754d9f8cb520b5cd8ef856.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eB.J. H.\u003c/strong\u003e reported a crisis.\n\u0026#34;First Southwest made me question the existence of my bags:\nI saw them scanned but the bag tracking system said\nthere were no scans. Then the next page made me\nquestion my own existence as well.\u0026#34;  B.J. who? \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#08e657a929724b46b1f2c7289a928800\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"08e657a929724b46b1f2c7289a928800\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/08e657a929724b46b1f2c7289a928800.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eAdam R.\u003c/strong\u003e reported a new way of formatting numbers.\n\u0026#34;Stripe has decided \u0026#34;You know what, I\u0026#39;ll put the +/-\nsign for the transaction amount on the *previous* line instead\nof the same line, just for funsies.\u0026#34; Less snarkily: line\nbreak algorithms are fickle, and they forgot to put a\nnon-breaking space in there.\u0026#34; \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#2ec536ec73504cc8bc237ef60664ed37\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"2ec536ec73504cc8bc237ef60664ed37\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/2ec536ec73504cc8bc237ef60664ed37.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003ePeter S.\u003c/strong\u003e proposed\n\u0026#34;I was trying to sell my Peleton equipment on their\nofficial \u0026#34;Repowered\u0026#34; site, and I was shown this nice list\nof yes/no buttons. I am not sure if I feel\nlike gambling today with these answers.\u0026#34; I want to know if Peter is unloading all his equipment because he reached his goals, or if he just gave up.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#a40614615c714000846db94564b7e877\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"a40614615c714000846db94564b7e877\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/a40614615c714000846db94564b7e877.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n","BodyAndAdHtml":"\u003cp\u003e\u003c/p\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eDr. Doom...scroller\u003c/strong\u003e titled this one \u0026#34;Scrollbar-ception\u0026#34;.  Said he\n\u0026#34;Screenshot of the TikTok webpage (i.e. in a desktop browser)\nwhile not logged in. I swear this wasn\u0026#39;t a NSFW\nTikTok video, instead it was a montage of some live\nshow from some singer. Anyway... Back on the topic of\nthe actual publishable snarky comments: Social media is known for\ndoom-scrolling. Well, these are scrollbars of doom. Or doom-scrollbars.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d6711f9e7fb94f9ab616977c242562b2\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d6711f9e7fb94f9ab616977c242562b2\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/d6711f9e7fb94f9ab616977c242562b2.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eAn anonymous reader clarified \n\u0026#34;I was reorganizing the document by drag-and-dropping a bunch of\ntable cells a bit too far for Word\u0026#39;s comfort and\nit\u0026#39;s telling me what I did wrong.\u0026#34; Clearly.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#01270f373b754d9f8cb520b5cd8ef856\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"01270f373b754d9f8cb520b5cd8ef856\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/01270f373b754d9f8cb520b5cd8ef856.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eB.J. H.\u003c/strong\u003e reported a crisis.\n\u0026#34;First Southwest made me question the existence of my bags:\nI saw them scanned but the bag tracking system said\nthere were no scans. Then the next page made me\nquestion my own existence as well.\u0026#34;  B.J. who? \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#08e657a929724b46b1f2c7289a928800\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"08e657a929724b46b1f2c7289a928800\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/08e657a929724b46b1f2c7289a928800.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eAdam R.\u003c/strong\u003e reported a new way of formatting numbers.\n\u0026#34;Stripe has decided \u0026#34;You know what, I\u0026#39;ll put the +/-\nsign for the transaction amount on the *previous* line instead\nof the same line, just for funsies.\u0026#34; Less snarkily: line\nbreak algorithms are fickle, and they forgot to put a\nnon-breaking space in there.\u0026#34; \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#2ec536ec73504cc8bc237ef60664ed37\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"2ec536ec73504cc8bc237ef60664ed37\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/2ec536ec73504cc8bc237ef60664ed37.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003ePeter S.\u003c/strong\u003e proposed\n\u0026#34;I was trying to sell my Peleton equipment on their\nofficial \u0026#34;Repowered\u0026#34; site, and I was shown this nice list\nof yes/no buttons. I am not sure if I feel\nlike gambling today with these answers.\u0026#34; I want to know if Peter is unloading all his equipment because he reached his goals, or if he just gave up.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#a40614615c714000846db94564b7e877\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"a40614615c714000846db94564b7e877\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/15/a40614615c714000846db94564b7e877.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/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=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eBuildMaster\u003c/a\u003e allows you to create a self-service release management platform that allows different teams to manage their applications. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eExplore how!\u003c/a\u003e \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Scrollpocalypse","RssTitle":"Error\u0027d: Scrollpocalypse","CachedCommentCount":9,"LastCommentDate":"\/Date(1792173206020)\/","LastCommentDateDescription":"17:53","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1792132200000)\/","ISODate":"2026-10-16","DisplayDate":"2026-10-16","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/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=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eBuildMaster\u003c/a\u003e allows you to create a self-service release management platform that allows different teams to manage their applications. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eExplore how!\u003c/a\u003e \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/scrollpocalypse","CommentsUrl":"https://thedailywtf.com/articles/comments/scrollpocalypse","Slug":"scrollpocalypse","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fscrollpocalypse+-+Scrollpocalypse+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fscrollpocalypse\u0026t=Scrollpocalypse+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Scrollpocalypse:%20https://thedailywtf.com/articles/scrollpocalypse","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fscrollpocalypse","PreviousArticleId":11296,"PreviousArticleTitle":"The Frist Line of Defense","PreviousArticleSlug":"the-frist-line-of-defense","PreviousArticleUrl":"//thedailywtf.com/articles/the-frist-line-of-defense","NextArticleId":null,"NextArticleTitle":null,"NextArticleSlug":null,"NextArticleUrl":"//thedailywtf.com/articles/"},{"Id":11296,"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\u003eWe don\u0026#39;t cover a lot of security issues here, simply because they\u0026#39;re not usually \u003cem\u003efunny\u003c/em\u003e. But sometimes, they are. So here\u0026#39;s a quick hit about some recent ones.\u003c/p\u003e\n\u003cp\u003eWe start with a very bad month for the Danish social security system, the Central Register of Persons (CPR). Last week, they detected a breach \u003ca href=\"https://www.theregister.com/security/2026/10/06/denmarks-id-register-spills-more-peoples-details-than-the-country-has-residents/5301307\"\u003ewhich exposed the personal details of 8.8m people\u003c/a\u003e. Per the Register article, a cybersecurity specialist correctly pointed out that treating your ID number as if it were a secret was a terrible idea in the first place, but unfortunately, so many systems have grown up around the idea that full knowledge of your state issued ID number as proof of identity, that the security expert is screaming into the wind. They\u0026#39;re right, but it\u0026#39;s going to take a lot to change.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eWe don\u0026#39;t cover a lot of security issues here, simply because they\u0026#39;re not usually \u003cem\u003efunny\u003c/em\u003e. But sometimes, they are. So here\u0026#39;s a quick hit about some recent ones.\u003c/p\u003e\n\u003cp\u003eWe start with a very bad month for the Danish social security system, the Central Register of Persons (CPR). Last week, they detected a breach \u003ca href=\"https://www.theregister.com/security/2026/10/06/denmarks-id-register-spills-more-peoples-details-than-the-country-has-residents/5301307\"\u003ewhich exposed the personal details of 8.8m people\u003c/a\u003e. Per the Register article, a cybersecurity specialist correctly pointed out that treating your ID number as if it were a secret was a terrible idea in the first place, but unfortunately, so many systems have grown up around the idea that full knowledge of your state issued ID number as proof of identity, that the security expert is screaming into the wind. They\u0026#39;re right, but it\u0026#39;s going to take a lot to change.\u003c/p\u003e\n\u003cp\u003eOkay, Denmark\u0026#39;s social security service was hacked. What\u0026#39;s so funny about that?\u003c/p\u003e\n\u003cp\u003eWell, the mechanism of the hack appears to go thusly. First, third party companies have access to the database, which they can use to send notifications to their customers via CPR. That connection is secured with a password, and one of those third parties secured their account with the kind of password you\u0026#39;d use to protect the precious air of the planet Druidia. Also known as the kind of \u003ca href=\"https://www.youtube.com/watch?v=a6iW-8xPw3k\u0026amp;pp=ygUocGFzc3dvcmQgc29tZSBpZGlvdCBoYXMgb24gdGhlaXIgbHVnZ2FnZQ%3D%3D\"\u003epassword some idiot would put on their luggage\u003c/a\u003e: \u0026#34;123456\u0026#34;. (\u003ca href=\"https://politiken.dk/danmark/art11016363/%C2%BBOh-my-god%C2%AB-Fynsk-virksomhed-havde-mindst-tre-profiler-med-adgangskoden-123456\"\u003epaywalled, Danish article\u003c/a\u003e).\u003c/p\u003e\n\u003cp\u003eThe hacker accessed the system on September 10th, and spent ten days searching through the system. The intrusion wasn\u0026#39;t detected until October 2nd, when CPR went to send an invoice to the third party company and noticed, \u0026#34;Boy, that\u0026#39;s more searches than they have customers.\u0026#34; Now, obviously, CPR should have never even allowed such a low complexity password, but also, the third party company shouldn\u0026#39;t have \u003cem\u003eused\u003c/em\u003e such a low security password.\u003c/p\u003e\n\u003cp\u003eNow, if you\u0026#39;ll excuse me, I have to change the combination on my luggage. \u003c!-- I jest, in America, you aren\u0027t legally allowed to put a secure lock on your luggage, every lock you travel with has to be openable by the TSA, which is one of the reasons why I never check a bag if I can help it. --\u003e\u003c/p\u003e\n\u003cp\u003eIn other news, I\u0026#39;m not particularly fond of blockchain stuff. Mostly, the whole distributed ledger seems like a solution in search of problems, and \u0026#34;trading tokens as if they\u0026#39;re money\u0026#34; is the best thing anybody\u0026#39;s been able to come up with. Back in my consulting days, when blockchains were all over the news, I was consulting with a large retailer, and they were exploring using blockchain in their supply chain. \u0026#34;How does that work?\u0026#34; I asked innocently. \u0026#34;It\u0026#39;ll have blockchain in it.\u0026#34; \u0026#34;Sure, but what does the blockchain get you?\u0026#34; \u0026#34;We\u0026#39;ll be using blockchain. If there\u0026#39;s like, an e. coli outbreak, we can trace where it came from.\u0026#34; \u0026#34;Couldn\u0026#39;t you get that out of a regular database?\u0026#34; \u0026#34;But this\u0026#39;ll have blockchain.\u0026#34;\u003c/p\u003e\n\u003cp\u003eIn any case, blockchain companies getting hacked and having all their users\u0026#39; assets stolen is practically a daily occurrence. Not really notable. But a recent hack \u003ca href=\"https://www.bleepingcomputer.com/news/security/ledger-confirms-hardware-wallet-spy-implant-behind-crypto-thefts/\"\u003eis legitimately interesting\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eA company, called Ledger, sells \u0026#34;hardware wallets\u0026#34;. Instead of storing your keys on some third party\u0026#39;s servers (where it\u0026#39;ll get hacked and you\u0026#39;ll lose all your \u0026#34;money\u0026#34;), you store them on a hardware device that you put in a safe. It\u0026#39;s not connected to the internet, and thus is unhackable. Or so you\u0026#39;d \u003cem\u003ethink\u003c/em\u003e. But if enough people are buying those devices, a supply chain attack becomes potentially very lucrative. And that\u0026#39;s exactly what happened. \u003cem\u003eSomeone\u003c/em\u003e in the \u003ca href=\"https://www.coindesk.com/tech/2026/10/12/ledger-says-unauthorized-implant-found-in-at-least-one-device-sold-by-cryptobilis\"\u003esupply chain\u003c/a\u003e cracked a bunch of these devices open, and inserted new hardware. They attached a microcontroller to the screen leads, that allowed it to read what was on the screen (and thus detect when the screen was displaying a recovery code that could be used to access the wallet), and a cellular modem that allowed it to literally phone home with that information.\u003c/p\u003e\n\u003cp\u003eIn total, these hackers walked away with the equivalent of nearly $100M in cryptocurrency.\u003c/p\u003e\n\u003cp\u003eAll the devices passed through Ledger, where they were inspected before being sold. Presumably, they were sealed with tamper-resistant packaging. It\u0026#39;s plausible that the tamperer was downstream from here and the customers didn\u0026#39;t fully inspect the packaging. Even your most savvy user generally doesn\u0026#39;t check that kind of thing, and I suspect a lot of these customers aren\u0026#39;t actually all that savvy. But also, companies in the crypto space tend to be... we\u0026#39;ll say, \u003cem\u003emore eager than cautious\u003c/em\u003e, so I wouldn\u0026#39;t be surprised if the tampering happened upstream and didn\u0026#39;t get caught by their inspection process.\u003c/p\u003e\n\u003cp\u003eSecurity is hard in the best case. It\u0026#39;s much harder when you\u0026#39;re putting the final onus of security on end users who may have thousands or even millions of dollars locked behind a single key. Or when passwords are hard, so you pick an easy one to remember.\u003c/p\u003e\n\u003c!-- Easy Reader Version: in an objective sense, Spaceballs is one of Mel Brooks\u0027 lesser contributions to the parody genre. On the other hand, if you\u0027re seven years old when you watch it, and are a child obsessed with Star Wars, it\u0027ll leave a mark in your brain that you can\u0027t escape. --\u003e","BodyAndAdHtml":"\u003cp\u003eWe don\u0026#39;t cover a lot of security issues here, simply because they\u0026#39;re not usually \u003cem\u003efunny\u003c/em\u003e. But sometimes, they are. So here\u0026#39;s a quick hit about some recent ones.\u003c/p\u003e\n\u003cp\u003eWe start with a very bad month for the Danish social security system, the Central Register of Persons (CPR). Last week, they detected a breach \u003ca href=\"https://www.theregister.com/security/2026/10/06/denmarks-id-register-spills-more-peoples-details-than-the-country-has-residents/5301307\"\u003ewhich exposed the personal details of 8.8m people\u003c/a\u003e. Per the Register article, a cybersecurity specialist correctly pointed out that treating your ID number as if it were a secret was a terrible idea in the first place, but unfortunately, so many systems have grown up around the idea that full knowledge of your state issued ID number as proof of identity, that the security expert is screaming into the wind. They\u0026#39;re right, but it\u0026#39;s going to take a lot to change.\u003c/p\u003e\n\u003cp\u003eOkay, Denmark\u0026#39;s social security service was hacked. What\u0026#39;s so funny about that?\u003c/p\u003e\n\u003cp\u003eWell, the mechanism of the hack appears to go thusly. First, third party companies have access to the database, which they can use to send notifications to their customers via CPR. That connection is secured with a password, and one of those third parties secured their account with the kind of password you\u0026#39;d use to protect the precious air of the planet Druidia. Also known as the kind of \u003ca href=\"https://www.youtube.com/watch?v=a6iW-8xPw3k\u0026amp;pp=ygUocGFzc3dvcmQgc29tZSBpZGlvdCBoYXMgb24gdGhlaXIgbHVnZ2FnZQ%3D%3D\"\u003epassword some idiot would put on their luggage\u003c/a\u003e: \u0026#34;123456\u0026#34;. (\u003ca href=\"https://politiken.dk/danmark/art11016363/%C2%BBOh-my-god%C2%AB-Fynsk-virksomhed-havde-mindst-tre-profiler-med-adgangskoden-123456\"\u003epaywalled, Danish article\u003c/a\u003e).\u003c/p\u003e\n\u003cp\u003eThe hacker accessed the system on September 10th, and spent ten days searching through the system. The intrusion wasn\u0026#39;t detected until October 2nd, when CPR went to send an invoice to the third party company and noticed, \u0026#34;Boy, that\u0026#39;s more searches than they have customers.\u0026#34; Now, obviously, CPR should have never even allowed such a low complexity password, but also, the third party company shouldn\u0026#39;t have \u003cem\u003eused\u003c/em\u003e such a low security password.\u003c/p\u003e\n\u003cp\u003eNow, if you\u0026#39;ll excuse me, I have to change the combination on my luggage. \u003c!-- I jest, in America, you aren\u0027t legally allowed to put a secure lock on your luggage, every lock you travel with has to be openable by the TSA, which is one of the reasons why I never check a bag if I can help it. --\u003e\u003c/p\u003e\n\u003cp\u003eIn other news, I\u0026#39;m not particularly fond of blockchain stuff. Mostly, the whole distributed ledger seems like a solution in search of problems, and \u0026#34;trading tokens as if they\u0026#39;re money\u0026#34; is the best thing anybody\u0026#39;s been able to come up with. Back in my consulting days, when blockchains were all over the news, I was consulting with a large retailer, and they were exploring using blockchain in their supply chain. \u0026#34;How does that work?\u0026#34; I asked innocently. \u0026#34;It\u0026#39;ll have blockchain in it.\u0026#34; \u0026#34;Sure, but what does the blockchain get you?\u0026#34; \u0026#34;We\u0026#39;ll be using blockchain. If there\u0026#39;s like, an e. coli outbreak, we can trace where it came from.\u0026#34; \u0026#34;Couldn\u0026#39;t you get that out of a regular database?\u0026#34; \u0026#34;But this\u0026#39;ll have blockchain.\u0026#34;\u003c/p\u003e\n\u003cp\u003eIn any case, blockchain companies getting hacked and having all their users\u0026#39; assets stolen is practically a daily occurrence. Not really notable. But a recent hack \u003ca href=\"https://www.bleepingcomputer.com/news/security/ledger-confirms-hardware-wallet-spy-implant-behind-crypto-thefts/\"\u003eis legitimately interesting\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eA company, called Ledger, sells \u0026#34;hardware wallets\u0026#34;. Instead of storing your keys on some third party\u0026#39;s servers (where it\u0026#39;ll get hacked and you\u0026#39;ll lose all your \u0026#34;money\u0026#34;), you store them on a hardware device that you put in a safe. It\u0026#39;s not connected to the internet, and thus is unhackable. Or so you\u0026#39;d \u003cem\u003ethink\u003c/em\u003e. But if enough people are buying those devices, a supply chain attack becomes potentially very lucrative. And that\u0026#39;s exactly what happened. \u003cem\u003eSomeone\u003c/em\u003e in the \u003ca href=\"https://www.coindesk.com/tech/2026/10/12/ledger-says-unauthorized-implant-found-in-at-least-one-device-sold-by-cryptobilis\"\u003esupply chain\u003c/a\u003e cracked a bunch of these devices open, and inserted new hardware. They attached a microcontroller to the screen leads, that allowed it to read what was on the screen (and thus detect when the screen was displaying a recovery code that could be used to access the wallet), and a cellular modem that allowed it to literally phone home with that information.\u003c/p\u003e\n\u003cp\u003eIn total, these hackers walked away with the equivalent of nearly $100M in cryptocurrency.\u003c/p\u003e\n\u003cp\u003eAll the devices passed through Ledger, where they were inspected before being sold. Presumably, they were sealed with tamper-resistant packaging. It\u0026#39;s plausible that the tamperer was downstream from here and the customers didn\u0026#39;t fully inspect the packaging. Even your most savvy user generally doesn\u0026#39;t check that kind of thing, and I suspect a lot of these customers aren\u0026#39;t actually all that savvy. But also, companies in the crypto space tend to be... we\u0026#39;ll say, \u003cem\u003emore eager than cautious\u003c/em\u003e, so I wouldn\u0026#39;t be surprised if the tampering happened upstream and didn\u0026#39;t get caught by their inspection process.\u003c/p\u003e\n\u003cp\u003eSecurity is hard in the best case. It\u0026#39;s much harder when you\u0026#39;re putting the final onus of security on end users who may have thousands or even millions of dollars locked behind a single key. Or when passwords are hard, so you pick an easy one to remember.\u003c/p\u003e\n\u003c!-- Easy Reader Version: in an objective sense, Spaceballs is one of Mel Brooks\u0027 lesser contributions to the parody genre. On the other hand, if you\u0027re seven years old when you watch it, and are a child obsessed with Star Wars, it\u0027ll leave a mark in your brain that you can\u0027t escape. --\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":"The Frist Line of Defense","RssTitle":"The Frist Line of Defense","CachedCommentCount":13,"LastCommentDate":"\/Date(1792140696120)\/","LastCommentDateDescription":"08:51","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1792045800000)\/","ISODate":"2026-10-15","DisplayDate":"2026-10-15","Series":{"Slug":"feature-articles","Title":"Feature Articles","Description":"","CssClass":"featured"},"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/the-frist-line-of-defense","CommentsUrl":"https://thedailywtf.com/articles/comments/the-frist-line-of-defense","Slug":"the-frist-line-of-defense","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fthe-frist-line-of-defense+-+The+Frist+Line+of+Defense+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fthe-frist-line-of-defense\u0026t=The+Frist+Line+of+Defense+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=The%20Frist%20Line%20of%20Defense:%20https://thedailywtf.com/articles/the-frist-line-of-defense","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fthe-frist-line-of-defense","PreviousArticleId":11295,"PreviousArticleTitle":"A Diamond in the Rough","PreviousArticleSlug":"a-diamond-in-the-rough","PreviousArticleUrl":"//thedailywtf.com/articles/a-diamond-in-the-rough","NextArticleId":11297,"NextArticleTitle":"Scrollpocalypse","NextArticleSlug":"scrollpocalypse","NextArticleUrl":"//thedailywtf.com/articles/scrollpocalypse"},{"Id":11295,"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\u003eMandy\u003c/strong\u003e\u0026#39;s co-worker recently learned about virtual inheritance in C++. It\u0026#39;s become their new favorite button to push, and they \u003cem\u003eonly\u003c/em\u003e use virtual inheritance.\u003c/p\u003e\n\u003cp\u003eVirtual inheritance is one workaround for the \u0026#34;\u003ca href=\"https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem\"\u003ediamond problem\u003c/a\u003e\u0026#34;, where you have an inheritance tree that \u0026#34;recombines\u0026#34; via multiple inheritance: when a child class has a Hapsburg-esque parentage, it\u0026#39;s hard to decide which inherited methods are being invoked or overridden.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eMandy\u003c/strong\u003e\u0026#39;s co-worker recently learned about virtual inheritance in C++. It\u0026#39;s become their new favorite button to push, and they \u003cem\u003eonly\u003c/em\u003e use virtual inheritance.\u003c/p\u003e\n\u003cp\u003eVirtual inheritance is one workaround for the \u0026#34;\u003ca href=\"https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem\"\u003ediamond problem\u003c/a\u003e\u0026#34;, where you have an inheritance tree that \u0026#34;recombines\u0026#34; via multiple inheritance: when a child class has a Hapsburg-esque parentage, it\u0026#39;s hard to decide which inherited methods are being invoked or overridden.\u003c/p\u003e\n\u003cp\u003eIn C++, imagine you have class A, which gets derived into classes B and C. Class D then uses multiple inheritance to inherit from B and C. In practice, this means that D inherits from A twice, and would have two internal copies of all of A\u0026#39;s members.\u003c/p\u003e\n\u003cp\u003eIf, on the other hand, you have B and C inherit \u003cem\u003evirtually\u003c/em\u003e (\u003ccode\u003eclass B : public virtual A\u003c/code\u003e), then class D will only actually inherit a single copy of A.\u003c/p\u003e\n\u003cp\u003eIf you\u0026#39;re reading this and going, \u0026#34;Boy, this just sounds like another reason to avoid multiple inheritance,\u0026#34; you\u0026#39;re probably right. The important thing, though, is inheriting virtually \u003cem\u003eimpacts how your child classes\u003c/em\u003e will inherit. It only matters if you have child classes.\u003c/p\u003e\n\u003cp\u003eWhich brings us back to Mandy\u0026#39;s co-worker. He read somewhere that defaulting to virtual inheritance all the time was safer, so he did that all the time. \u003cem\u003eAll. The. Time\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eIncluding in this case:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-keyword\"\u003eclass\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eSomeSpecificDerivedClass\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003efinal\u003c/span\u003e : \u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003evirtual\u003c/span\u003e SomeBaseClass\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe class here is marked \u003ccode\u003efinal\u003c/code\u003e. It can\u0026#39;t be inherited from. The use of \u003ccode\u003evirtual\u003c/code\u003e accomplishes nothing.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Now that C++ has concepts, that\u0027s a much easier way to get type safety without loads of weird inheritance trees. --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eMandy\u003c/strong\u003e\u0026#39;s co-worker recently learned about virtual inheritance in C++. It\u0026#39;s become their new favorite button to push, and they \u003cem\u003eonly\u003c/em\u003e use virtual inheritance.\u003c/p\u003e\n\u003cp\u003eVirtual inheritance is one workaround for the \u0026#34;\u003ca href=\"https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem\"\u003ediamond problem\u003c/a\u003e\u0026#34;, where you have an inheritance tree that \u0026#34;recombines\u0026#34; via multiple inheritance: when a child class has a Hapsburg-esque parentage, it\u0026#39;s hard to decide which inherited methods are being invoked or overridden.\u003c/p\u003e\n\u003cp\u003eIn C++, imagine you have class A, which gets derived into classes B and C. Class D then uses multiple inheritance to inherit from B and C. In practice, this means that D inherits from A twice, and would have two internal copies of all of A\u0026#39;s members.\u003c/p\u003e\n\u003cp\u003eIf, on the other hand, you have B and C inherit \u003cem\u003evirtually\u003c/em\u003e (\u003ccode\u003eclass B : public virtual A\u003c/code\u003e), then class D will only actually inherit a single copy of A.\u003c/p\u003e\n\u003cp\u003eIf you\u0026#39;re reading this and going, \u0026#34;Boy, this just sounds like another reason to avoid multiple inheritance,\u0026#34; you\u0026#39;re probably right. The important thing, though, is inheriting virtually \u003cem\u003eimpacts how your child classes\u003c/em\u003e will inherit. It only matters if you have child classes.\u003c/p\u003e\n\u003cp\u003eWhich brings us back to Mandy\u0026#39;s co-worker. He read somewhere that defaulting to virtual inheritance all the time was safer, so he did that all the time. \u003cem\u003eAll. The. Time\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eIncluding in this case:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-keyword\"\u003eclass\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eSomeSpecificDerivedClass\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003efinal\u003c/span\u003e : \u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003evirtual\u003c/span\u003e SomeBaseClass\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe class here is marked \u003ccode\u003efinal\u003c/code\u003e. It can\u0026#39;t be inherited from. The use of \u003ccode\u003evirtual\u003c/code\u003e accomplishes nothing.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Now that C++ has concepts, that\u0027s a much easier way to get type safety without loads of weird inheritance trees. --\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=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eBuildMaster\u003c/a\u003e allows you to create a self-service release management platform that allows different teams to manage their applications. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eExplore how!\u003c/a\u003e \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"A Diamond in the Rough","RssTitle":"Representative Line: A Diamond in the Rough","CachedCommentCount":26,"LastCommentDate":"\/Date(1792175389873)\/","LastCommentDateDescription":"18:29","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1791959400000)\/","ISODate":"2026-10-14","DisplayDate":"2026-10-14","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/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=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eBuildMaster\u003c/a\u003e allows you to create a self-service release management platform that allows different teams to manage their applications. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Self_Service\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eExplore how!\u003c/a\u003e \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/a-diamond-in-the-rough","CommentsUrl":"https://thedailywtf.com/articles/comments/a-diamond-in-the-rough","Slug":"a-diamond-in-the-rough","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fa-diamond-in-the-rough+-+A+Diamond+in+the+Rough+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fa-diamond-in-the-rough\u0026t=A+Diamond+in+the+Rough+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=A%20Diamond%20in%20the%20Rough:%20https://thedailywtf.com/articles/a-diamond-in-the-rough","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fa-diamond-in-the-rough","PreviousArticleId":11294,"PreviousArticleTitle":"Digital Mail","PreviousArticleSlug":"digital-mail","PreviousArticleUrl":"//thedailywtf.com/articles/digital-mail","NextArticleId":11296,"NextArticleTitle":"The Frist Line of Defense","NextArticleSlug":"the-frist-line-of-defense","NextArticleUrl":"//thedailywtf.com/articles/the-frist-line-of-defense"},{"Id":11294,"Author":{"Name":"Ellis Morning","FirstName":"Ellis","ShortDescription":null,"DescriptionHtml":"\u003cb\u003eEllis Morning\u003c/b\u003e is a Computer Science graduate who fought in the trenches of Tech Support, occasionally crossing enemy lines into the Business Analyst and Project Management spheres of war. She\u0027s now a freelance writer and technical writer. Check out her highly-rated \u003ca href=\"https://swordandstarship.com/\" target=\"_blank\"\u003esci-fi/fantasy novels\u003c/a\u003e and find more humor, fiction, and blog posts at her \u003ca href=\"https://www.ellismorning.com\" target=\"_blank\"\u003ewebsite\u003c/a\u003e.","Slug":"ellis-morning","IsAdmin":true,"IsActive":true,"ImageUrl":"https://ellismorning.com/img/ellis2.jpeg"},"Status":"Published","SummaryHtml":"\u003cp\u003eEver get some special letter, card, or picture from a friend or loved one that you held onto, maybe even taped to your cube or office wall? Is it something you still look at fondly, something that lifts your spirits whenever you\u0026#39;re down? Certainly, a thoughtful card or letter is much nicer than a thoughtful email.\u003c/p\u003e\n\n\u003cp\u003eNow imagine your special keepsake being scanned, censored, and converted into a digital file that you can only view from a tablet — assuming you can afford the fee to access the tablet. The original has been destroyed; it\u0026#39;s gone forever. You\u0026#39;ll never get to see or feel it in your hands.\u003c/p\u003e\n\n","BodyHtml":"\u003cp\u003eEver get some special letter, card, or picture from a friend or loved one that you held onto, maybe even taped to your cube or office wall? Is it something you still look at fondly, something that lifts your spirits whenever you\u0026#39;re down? Certainly, a thoughtful card or letter is much nicer than a thoughtful email.\u003c/p\u003e\n\n\u003cp\u003eNow imagine your special keepsake being scanned, censored, and converted into a digital file that you can only view from a tablet — assuming you can afford the fee to access the tablet. The original has been destroyed; it\u0026#39;s gone forever. You\u0026#39;ll never get to see or feel it in your hands.\u003c/p\u003e\n\n\u003cp style=\"float:right; padding-left:10px; padding-bottom:10px;\"\u003e\u003ca title=\"Archives Branch, USMC History Division, CC BY 2.0 \u0026lt;https://creativecommons.org/licenses/by/2.0\u0026gt;, via Wikimedia Commons\" href=\"https://commons.wikimedia.org/wiki/File:Birthday_Card,_30_October_1943,_page_2_of_2.jpg\"\u003e\u003cimg itemprop=\"image\" width=\"330\" alt=\"Birthday Card, 30 October 1943, page 2 of 2\" src=\"https://thumb.wikimedia.org/wikipedia/commons/thumb/6/66/Birthday_Card%2C_30_October_1943%2C_page_2_of_2.jpg/330px-Birthday_Card%2C_30_October_1943%2C_page_2_of_2.jpg?utm_source=commons.wikimedia.org\u0026amp;utm_campaign=index\u0026amp;utm_content=thumbnail\"/\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp\u003eIt sounds almost \u003ci\u003etoo\u003c/i\u003e cruel, like something you\u0026#39;d find in a \u003ci\u003eFallout\u003c/i\u003e game. Unfortunately, it\u0026#39;s reality for more and more people incarcerated in US prisons.\u003c/p\u003e\n\n\u003cp\u003eI\u0026#39;ve been writing to an incarcerated person for a while now myself. I find the process incredibly rewarding; I think about my friend all the time and wish them well. Unfortunately, the scanning and processing takes absolutely forever, so in a given year we only exchange 3 letters per side. The digitized files that I receive have names censored out of them; I have no idea what\u0026#39;s removed from my letters before my friend receives them. For me, this is all too reminiscent of exchanging letters with my grandmother in Iran before she died. Agents there would straight-up open the envelope, confiscate any valuables inside, marker over anything they didn\u0026#39;t like, then re-seal the envelope and send it back on its merry way.\u003c/p\u003e\n\n\u003cp\u003eOver 30 US states now digitize the mail passing in and out of prisons, relying on AI to judge what\u0026#39;s kosher and what isn\u0026#39;t. If you thought AI was great with resumes, just wait until you task it with threat detection! It\u0026#39;s been working so well that one nonprofit organization had to change its name: the word \u003ci\u003efight,\u003c/i\u003e used in any context whatsoever, gets flagged.\u003c/p\u003e\n\n\u003cp\u003eOnce mail is scanned, it\u0026#39;s only accessible by tablets that have to be paid for. Incarcerated people are already nickled and dimed for a ridiculous number of things and surely don\u0026#39;t need \u003ci\u003emore\u003c/i\u003e fees.\u003c/p\u003e\n\n\u003cp\u003eIt doesn\u0026#39;t stop at mail, either. The latest tech is also being used to eliminate physical visitation. Because if there\u0026#39;s anything the pandemic taught us, it\u0026#39;s that nothing beats seeing your loved ones exclusively on a screen for years at a stretch.\u003c/p\u003e\n\n\u003cp\u003eThe states justify these egregious measures by playing the drug card. They\u0026#39;re necessary to stop drugs from entering the prisons. But these states stop short of providing evidence to show that these tech-facilitated practices are actually having the intended effect. Even if they magically solved drug trafficking forever, could \u003ci\u003eany\u003c/i\u003e result truly justify the vast harm being inflicted upon incarcerated people, their families, and their friends? Physical mail and visitation are necessary lifelines and psychological boosts for those who might otherwise have nothing and no one to hold onto during an unimaginably difficult time of their lives.\u003c/p\u003e\n\n\u003cp\u003eDo I really have to explain the benefit of parents and children exchanging homework, letters, and pictures?\u003c/p\u003e\n\n\u003cp\u003eI\u0026#39;m angry about this on so many levels. If you are, too, here\u0026#39;s some stuff we can do to \u003cstrike\u003efight\u003c/strike\u003e work against this together:\n\u003c/p\u003e\u003cdiv style=\"margin-left:7%;\"\u003e\n\u003cul style=\"list-style-type:disc; line-height:150%;\"\u003e\n\t\u003cli\u003e\u003cb\u003eSupport prison abolition with your time, money, and/or IT superpowers.\u003c/b\u003e Forced prison labor is slavery. The entire punitive model is cruel, biased, and far less effective than approaches like restorative and community-based justice. Moving on is long overdue and the best way to make all of this stop.\u003c/li\u003e\n\t\u003cli\u003eAvoid working for companies that facilitate these practices. Tell your friends not to work for them, either. If you\u0026#39;re stuck working for them for survival\u0026#39;s sake, look for ways to enact positive change from the inside.\u003c/li\u003e\n\t\u003cli\u003eSpread the word of what\u0026#39;s happening. Most people have no idea. Use your knowledge to educate  technical and non-technical folks. They might want to do something about this, too.\u003c/li\u003e\n\t\u003cli\u003eWrite to incarcerated people yourself. Like Bob Ross said, \u0026#34;Everybody needs a friend.\u0026#34; Knowing there\u0026#39;s someone in your corner who cares about you makes all the difference in the world. Sites like \u003ca href=\"https://writeaprisoner.com/\"\u003eWriteAPrisoner.com\u003c/a\u003e will match you up with a pen pal.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003c/p\u003e\n\n\u003cp\u003eA drop of water seems harmless, but get enough of those together and you carve out the Grand Canyon. If we all do something to help, however big or small, our massed effort becomes something powerful. As tech professionals, we are especially empowered to push back on these cruel and abusive practices. We must act now, before they move out of prisons and into mainstream society.\u003c/p\u003e\n\n\u003cp\u003eDo you want your post office to start doing this?\u003c/p\u003e\n\n\n\u003cp\u003e\u003cb\u003eSources:\u003c/b\u003e\n\u003c/p\u003e\u003cdiv style=\"margin-left:7%;\"\u003e\n\u003cul style=\"list-style-type:disc; line-height:150%;\"\u003e\n\u003cli\u003e\u003ca href=\"https://scalawagmagazine.org/2026/08/abandon-all-connection-ye-who-enter-here-digitized-prison-mail-as-repression-and-surveillance/\"\u003eAbandon All Connection, Ye Who Enter Here: Digitized Prison Mail as Repression and Surveillance\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.youtube.com/watch?v=S5OpFo6cfhk\"\u003eWEBINAR: Fighting for families: How advocates are resisting attacks on visitation and physical mail\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/\"\u003eInvoluntary Servitude: How Prison Labor is Modern Day Slavery\u003c/a\u003e\u003c/li\u003e\u003ca href=\"https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/\"\u003e\n\u003c/a\u003e\u003cli\u003e\u003ca href=\"https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/\"\u003e\u003c/a\u003e\u003ca href=\"https://sociologyinc.com/crime-and-punishment-why-justice-systems-dont-always-deliver/\"\u003eWhy Justice Systems Don\u0026#39;t Always Deliver\u003c/a\u003e\n\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003c/p\u003e","BodyAndAdHtml":"\u003cp\u003eEver get some special letter, card, or picture from a friend or loved one that you held onto, maybe even taped to your cube or office wall? Is it something you still look at fondly, something that lifts your spirits whenever you\u0026#39;re down? Certainly, a thoughtful card or letter is much nicer than a thoughtful email.\u003c/p\u003e\n\n\u003cp\u003eNow imagine your special keepsake being scanned, censored, and converted into a digital file that you can only view from a tablet — assuming you can afford the fee to access the tablet. The original has been destroyed; it\u0026#39;s gone forever. You\u0026#39;ll never get to see or feel it in your hands.\u003c/p\u003e\n\n\u003cp style=\"float:right; padding-left:10px; padding-bottom:10px;\"\u003e\u003ca title=\"Archives Branch, USMC History Division, CC BY 2.0 \u0026lt;https://creativecommons.org/licenses/by/2.0\u0026gt;, via Wikimedia Commons\" href=\"https://commons.wikimedia.org/wiki/File:Birthday_Card,_30_October_1943,_page_2_of_2.jpg\"\u003e\u003cimg itemprop=\"image\" width=\"330\" alt=\"Birthday Card, 30 October 1943, page 2 of 2\" src=\"https://thumb.wikimedia.org/wikipedia/commons/thumb/6/66/Birthday_Card%2C_30_October_1943%2C_page_2_of_2.jpg/330px-Birthday_Card%2C_30_October_1943%2C_page_2_of_2.jpg?utm_source=commons.wikimedia.org\u0026amp;utm_campaign=index\u0026amp;utm_content=thumbnail\"/\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp\u003eIt sounds almost \u003ci\u003etoo\u003c/i\u003e cruel, like something you\u0026#39;d find in a \u003ci\u003eFallout\u003c/i\u003e game. Unfortunately, it\u0026#39;s reality for more and more people incarcerated in US prisons.\u003c/p\u003e\n\n\u003cp\u003eI\u0026#39;ve been writing to an incarcerated person for a while now myself. I find the process incredibly rewarding; I think about my friend all the time and wish them well. Unfortunately, the scanning and processing takes absolutely forever, so in a given year we only exchange 3 letters per side. The digitized files that I receive have names censored out of them; I have no idea what\u0026#39;s removed from my letters before my friend receives them. For me, this is all too reminiscent of exchanging letters with my grandmother in Iran before she died. Agents there would straight-up open the envelope, confiscate any valuables inside, marker over anything they didn\u0026#39;t like, then re-seal the envelope and send it back on its merry way.\u003c/p\u003e\n\n\u003cp\u003eOver 30 US states now digitize the mail passing in and out of prisons, relying on AI to judge what\u0026#39;s kosher and what isn\u0026#39;t. If you thought AI was great with resumes, just wait until you task it with threat detection! It\u0026#39;s been working so well that one nonprofit organization had to change its name: the word \u003ci\u003efight,\u003c/i\u003e used in any context whatsoever, gets flagged.\u003c/p\u003e\n\n\u003cp\u003eOnce mail is scanned, it\u0026#39;s only accessible by tablets that have to be paid for. Incarcerated people are already nickled and dimed for a ridiculous number of things and surely don\u0026#39;t need \u003ci\u003emore\u003c/i\u003e fees.\u003c/p\u003e\n\n\u003cp\u003eIt doesn\u0026#39;t stop at mail, either. The latest tech is also being used to eliminate physical visitation. Because if there\u0026#39;s anything the pandemic taught us, it\u0026#39;s that nothing beats seeing your loved ones exclusively on a screen for years at a stretch.\u003c/p\u003e\n\n\u003cp\u003eThe states justify these egregious measures by playing the drug card. They\u0026#39;re necessary to stop drugs from entering the prisons. But these states stop short of providing evidence to show that these tech-facilitated practices are actually having the intended effect. Even if they magically solved drug trafficking forever, could \u003ci\u003eany\u003c/i\u003e result truly justify the vast harm being inflicted upon incarcerated people, their families, and their friends? Physical mail and visitation are necessary lifelines and psychological boosts for those who might otherwise have nothing and no one to hold onto during an unimaginably difficult time of their lives.\u003c/p\u003e\n\n\u003cp\u003eDo I really have to explain the benefit of parents and children exchanging homework, letters, and pictures?\u003c/p\u003e\n\n\u003cp\u003eI\u0026#39;m angry about this on so many levels. If you are, too, here\u0026#39;s some stuff we can do to \u003cstrike\u003efight\u003c/strike\u003e work against this together:\n\u003c/p\u003e\u003cdiv style=\"margin-left:7%;\"\u003e\n\u003cul style=\"list-style-type:disc; line-height:150%;\"\u003e\n\t\u003cli\u003e\u003cb\u003eSupport prison abolition with your time, money, and/or IT superpowers.\u003c/b\u003e Forced prison labor is slavery. The entire punitive model is cruel, biased, and far less effective than approaches like restorative and community-based justice. Moving on is long overdue and the best way to make all of this stop.\u003c/li\u003e\n\t\u003cli\u003eAvoid working for companies that facilitate these practices. Tell your friends not to work for them, either. If you\u0026#39;re stuck working for them for survival\u0026#39;s sake, look for ways to enact positive change from the inside.\u003c/li\u003e\n\t\u003cli\u003eSpread the word of what\u0026#39;s happening. Most people have no idea. Use your knowledge to educate  technical and non-technical folks. They might want to do something about this, too.\u003c/li\u003e\n\t\u003cli\u003eWrite to incarcerated people yourself. Like Bob Ross said, \u0026#34;Everybody needs a friend.\u0026#34; Knowing there\u0026#39;s someone in your corner who cares about you makes all the difference in the world. Sites like \u003ca href=\"https://writeaprisoner.com/\"\u003eWriteAPrisoner.com\u003c/a\u003e will match you up with a pen pal.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003cp\u003e\u003c/p\u003e\n\n\u003cp\u003eA drop of water seems harmless, but get enough of those together and you carve out the Grand Canyon. If we all do something to help, however big or small, our massed effort becomes something powerful. As tech professionals, we are especially empowered to push back on these cruel and abusive practices. We must act now, before they move out of prisons and into mainstream society.\u003c/p\u003e\n\n\u003cp\u003eDo you want your post office to start doing this?\u003c/p\u003e\n\n\n\u003cp\u003e\u003cb\u003eSources:\u003c/b\u003e\n\u003c/p\u003e\u003cdiv style=\"margin-left:7%;\"\u003e\n\u003cul style=\"list-style-type:disc; line-height:150%;\"\u003e\n\u003cli\u003e\u003ca href=\"https://scalawagmagazine.org/2026/08/abandon-all-connection-ye-who-enter-here-digitized-prison-mail-as-repression-and-surveillance/\"\u003eAbandon All Connection, Ye Who Enter Here: Digitized Prison Mail as Repression and Surveillance\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.youtube.com/watch?v=S5OpFo6cfhk\"\u003eWEBINAR: Fighting for families: How advocates are resisting attacks on visitation and physical mail\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/\"\u003eInvoluntary Servitude: How Prison Labor is Modern Day Slavery\u003c/a\u003e\u003c/li\u003e\u003ca href=\"https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/\"\u003e\n\u003c/a\u003e\u003cli\u003e\u003ca href=\"https://harvardpolitics.com/involuntary-servitude-how-prison-labor-is-modern-day-slavery/\"\u003e\u003c/a\u003e\u003ca href=\"https://sociologyinc.com/crime-and-punishment-why-justice-systems-dont-always-deliver/\"\u003eWhy Justice Systems Don\u0026#39;t Always Deliver\u003c/a\u003e\n\u003c/li\u003e\u003c/ul\u003e\n\u003c/div\u003e\n\u003cp\u003e\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":"Digital Mail","RssTitle":"Editor\u0027s Soapbox: Digital Mail","CachedCommentCount":56,"LastCommentDate":"\/Date(1792173978013)\/","LastCommentDateDescription":"18:06","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1791873000000)\/","ISODate":"2026-10-13","DisplayDate":"2026-10-13","Series":{"Slug":"soapbox","Title":"Editor\u0027s Soapbox","Description":"Alex is the grand-pappy of TDWTF, and his soap-box is not our soap-box. Every one of our editors gets to share this one.","CssClass":"soapbox"},"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/digital-mail","CommentsUrl":"https://thedailywtf.com/articles/comments/digital-mail","Slug":"digital-mail","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fdigital-mail+-+Digital+Mail+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fdigital-mail\u0026t=Digital+Mail+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Digital%20Mail:%20https://thedailywtf.com/articles/digital-mail","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fdigital-mail","PreviousArticleId":11293,"PreviousArticleTitle":"A Type of Type Safety","PreviousArticleSlug":"a-type-of-type-safety","PreviousArticleUrl":"//thedailywtf.com/articles/a-type-of-type-safety","NextArticleId":11295,"NextArticleTitle":"A Diamond in the Rough","NextArticleSlug":"a-diamond-in-the-rough","NextArticleUrl":"//thedailywtf.com/articles/a-diamond-in-the-rough"},{"Id":11293,"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\u003eFor some godawful reason, people like to explain object oriented concepts via analogy to biological taxonomies. I suppose it\u0026#39;s easy to understand an \u0026#34;is-a\u0026#34; relationship (a cat is a mammal), but the down side is you get a complex and increasingly leaky analogy that over-emphasizes the importance of inheritance.\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s not to slight \u003cstrong\u003eAlan\u003c/strong\u003e\u0026#39;s choice of using it to anoymize today\u0026#39;s code. It\u0026#39;s just a broad frustration on my part.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eFor some godawful reason, people like to explain object oriented concepts via analogy to biological taxonomies. I suppose it\u0026#39;s easy to understand an \u0026#34;is-a\u0026#34; relationship (a cat is a mammal), but the down side is you get a complex and increasingly leaky analogy that over-emphasizes the importance of inheritance.\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s not to slight \u003cstrong\u003eAlan\u003c/strong\u003e\u0026#39;s choice of using it to anoymize today\u0026#39;s code. It\u0026#39;s just a broad frustration on my part.\u003c/p\u003e\n\u003cp\u003eIn any case, Alan has been working in a C++ codebase that\u0026#39;s written by people who maybe don\u0026#39;t fully understand all the key object oriented concepts. That\u0026#39;s why you get code like this:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e    \u003cspan class=\"hljs-comment\"\u003e/*\n     * If possible, steal tentacle from the given animal.\n     */\u003c/span\u003e\n    \u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003evoid\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003eAnimal::StealTentacle\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(Animal *animal)\u003c/span\u003e \u003c/span\u003e{\n        \u003cspan class=\"hljs-comment\"\u003e// only Octopus and Squid can have tentacles\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (!\u003cspan class=\"hljs-built_in\"\u003eIS_INSTANCE_OF\u003c/span\u003e(\u003cspan class=\"hljs-keyword\"\u003ethis\u003c/span\u003e, Octopus) \u0026amp;\u0026amp; !\u003cspan class=\"hljs-built_in\"\u003eIS_INSTANCE_OF\u003c/span\u003e(\u003cspan class=\"hljs-keyword\"\u003ethis\u003c/span\u003e, Squid)) {\n            \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e;\n        }\n\n        Limb *limb = animal-\u0026gt;mLimbs-\u0026gt;\u003cspan class=\"hljs-built_in\"\u003eGetFirstTentacle\u003c/span\u003e();\n        \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (limb) {\n            limb-\u0026gt;\u003cspan class=\"hljs-built_in\"\u003eAttachToAnimal\u003c/span\u003e(\u003cspan class=\"hljs-keyword\"\u003ethis\u003c/span\u003e);\n            \u003cspan class=\"hljs-comment\"\u003e// . . .\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis function takes a raw pointer to an \u003ccode\u003eAnimal\u003c/code\u003e object. If that pointer is not an Octopus or a Squid, we bail. Otherwise, we\u0026#39;re going to take its tentacle, and do stuff with it.\u003c/p\u003e\n\u003cp\u003eNow, this is a pretty clear example of the type switch anti-pattern. Instead of using the type system and polymorphism to enforce restrictions, we instead do runtime type checks.\u003c/p\u003e\n\u003cp\u003eBut wait a second, what\u0026#39;s going on in that \u003ccode\u003eIS_INSTANCE_OF\u003c/code\u003e?\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e    \u003cspan class=\"hljs-comment\"\u003e// I\u0026#39;ve noticed that dynamic_cast always returns a valid result when\u003c/span\u003e\n    \u003cspan class=\"hljs-comment\"\u003e// casting an \u0026#34;objectPointer\u0026#34; of type \u0026#34;className\u0026#34;.\u003c/span\u003e\n    \u003cspan class=\"hljs-comment\"\u003e// Try casting it to a [Organism *] to force it to work. (?)\u003c/span\u003e\n    \u003cspan class=\"hljs-meta\"\u003e#\u003cspan class=\"hljs-keyword\"\u003edefine\u003c/span\u003e IS_INSTANCE_OF(objectPointer, className)    ((bool) (dynamic_cast\u003cspan class=\"hljs-string\"\u003e\u0026lt;className *\u0026gt;\u003c/span\u003e(((Organism *) objectPointer)) != NULL))\u003c/span\u003e\n    \u003cspan class=\"hljs-meta\"\u003e#\u003cspan class=\"hljs-keyword\"\u003edefine\u003c/span\u003e IS_MEMBER_OF(objectPointer, className)      IS_INSTANCE_OF(objectPointer, className)    \u003cspan class=\"hljs-comment\"\u003e// temporary macro alias\u003c/span\u003e\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis code attempts to take an \u003ccode\u003eobjectPointer\u003c/code\u003e and first, force it into a pointer to our base type (\u003ccode\u003eOrganism\u003c/code\u003e), using a C-style cast. Now, in C++, C-style casts are a shorthand, and the compiler will, based on the context, attempt to do the best cast which fits the situation, starting with a \u003ccode\u003econst_cast\u003c/code\u003e (which only alters the constness of the type), and failing all the way up to a \u003ccode\u003ereinterpret_cast\u003c/code\u003e- which just ignores type information entirely and assumes you know what you\u0026#39;re doing.\u003c/p\u003e\n\u003cp\u003eWhich this developer clearly doesn\u0026#39;t.\u003c/p\u003e\n\u003cp\u003eIn any case, we pass the C-style cast result into the \u003ccode\u003edynamic_cast\u003c/code\u003e function, which attempts to cast that pointer into an instance of \u003ccode\u003eclassName\u003c/code\u003e. If no such conversion is possible (because they\u0026#39;re not part of the same inheritance hiercharcy), it returns \u003ccode\u003eNULL\u003c/code\u003e, which is what they\u0026#39;re checking.\u003c/p\u003e\n\u003cp\u003eTheir comment highlights their misunderstanding of the function; \u003ccode\u003edynamic_cast\u003c/code\u003e can be used to crosscast. In other words, \u003ccode\u003edynamic_cast\u0026lt;Dog*\u0026gt;(my_cat)\u003c/code\u003e will actually work, because (in this example) \u003ccode\u003eDog*\u003c/code\u003e and \u003ccode\u003eCat*\u003c/code\u003e share a common base.\u003c/p\u003e\n\u003cp\u003eFrom the docs:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eOtherwise, if expression points/refers to a public base class subobject of the most derived object, and the type of the most derived object has an unambiguous and public base class of type Target, the result points/refers to the Target subobject of the most derived object. In other words, dynamic_cast can be used to crosscast (or side-cast) pointers/references, between two types derived from the same base.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eYou shouldn\u0026#39;t be using dynamic cast to solve this problem. Hell, you sohuldn\u0026#39;t be doing any of this in the first place!\u003c/p\u003e\n\u003cp\u003eIn any case, in actual usage, the developers responsible do stuff like this:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (\u003cspan class=\"hljs-built_in\"\u003eIS_INSTANCE_OF\u003c/span\u003e(animal, Felid)) {\n        Felid *cat = (Felid *) animal; \u003cspan class=\"hljs-comment\"\u003e// Yes another C-style cast - this time (hopefully) devolving to the same dynamic_cast hidden inside the expansion of the previous macro.\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eI love when a comment says \u0026#34;hopefully\u0026#34;. \u0026#34;This hopefully does what I think it should do\u0026#34;.\u003c/p\u003e\n\u003cp\u003eI\u0026#39;ll let Alan summarize the problems:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eUsed prudently, the dynamic dispatch facility that object oriented languages provide their users can be a valuable tool for capturing the domain model in clean, elegant code.  However, as even C++\u0026#39;s designer Bjarne Stroustrup acknowledged, in \u0026#34;The Design and Evolution of C++\u0026#34;, the introduction of support for Run-Time Type Information makes it possible to spurn such assistance and write RTTI-based code for which a verdict of \u0026#34;combines the syntactic elegance of C with the run-time efficiency of Smalltalk\u0026#34; is just \u0026#34;too kind\u0026#34;.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c!-- Easy Reader Version: I strongly suspect a Python developer is responsible for this. Which isn\u0027t an excuse. --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\u003e","BodyAndAdHtml":"\u003cp\u003eFor some godawful reason, people like to explain object oriented concepts via analogy to biological taxonomies. I suppose it\u0026#39;s easy to understand an \u0026#34;is-a\u0026#34; relationship (a cat is a mammal), but the down side is you get a complex and increasingly leaky analogy that over-emphasizes the importance of inheritance.\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s not to slight \u003cstrong\u003eAlan\u003c/strong\u003e\u0026#39;s choice of using it to anoymize today\u0026#39;s code. It\u0026#39;s just a broad frustration on my part.\u003c/p\u003e\n\u003cp\u003eIn any case, Alan has been working in a C++ codebase that\u0026#39;s written by people who maybe don\u0026#39;t fully understand all the key object oriented concepts. That\u0026#39;s why you get code like this:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e    \u003cspan class=\"hljs-comment\"\u003e/*\n     * If possible, steal tentacle from the given animal.\n     */\u003c/span\u003e\n    \u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003evoid\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003eAnimal::StealTentacle\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(Animal *animal)\u003c/span\u003e \u003c/span\u003e{\n        \u003cspan class=\"hljs-comment\"\u003e// only Octopus and Squid can have tentacles\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (!\u003cspan class=\"hljs-built_in\"\u003eIS_INSTANCE_OF\u003c/span\u003e(\u003cspan class=\"hljs-keyword\"\u003ethis\u003c/span\u003e, Octopus) \u0026amp;\u0026amp; !\u003cspan class=\"hljs-built_in\"\u003eIS_INSTANCE_OF\u003c/span\u003e(\u003cspan class=\"hljs-keyword\"\u003ethis\u003c/span\u003e, Squid)) {\n            \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e;\n        }\n\n        Limb *limb = animal-\u0026gt;mLimbs-\u0026gt;\u003cspan class=\"hljs-built_in\"\u003eGetFirstTentacle\u003c/span\u003e();\n        \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (limb) {\n            limb-\u0026gt;\u003cspan class=\"hljs-built_in\"\u003eAttachToAnimal\u003c/span\u003e(\u003cspan class=\"hljs-keyword\"\u003ethis\u003c/span\u003e);\n            \u003cspan class=\"hljs-comment\"\u003e// . . .\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis function takes a raw pointer to an \u003ccode\u003eAnimal\u003c/code\u003e object. If that pointer is not an Octopus or a Squid, we bail. Otherwise, we\u0026#39;re going to take its tentacle, and do stuff with it.\u003c/p\u003e\n\u003cp\u003eNow, this is a pretty clear example of the type switch anti-pattern. Instead of using the type system and polymorphism to enforce restrictions, we instead do runtime type checks.\u003c/p\u003e\n\u003cp\u003eBut wait a second, what\u0026#39;s going on in that \u003ccode\u003eIS_INSTANCE_OF\u003c/code\u003e?\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e    \u003cspan class=\"hljs-comment\"\u003e// I\u0026#39;ve noticed that dynamic_cast always returns a valid result when\u003c/span\u003e\n    \u003cspan class=\"hljs-comment\"\u003e// casting an \u0026#34;objectPointer\u0026#34; of type \u0026#34;className\u0026#34;.\u003c/span\u003e\n    \u003cspan class=\"hljs-comment\"\u003e// Try casting it to a [Organism *] to force it to work. (?)\u003c/span\u003e\n    \u003cspan class=\"hljs-meta\"\u003e#\u003cspan class=\"hljs-keyword\"\u003edefine\u003c/span\u003e IS_INSTANCE_OF(objectPointer, className)    ((bool) (dynamic_cast\u003cspan class=\"hljs-string\"\u003e\u0026lt;className *\u0026gt;\u003c/span\u003e(((Organism *) objectPointer)) != NULL))\u003c/span\u003e\n    \u003cspan class=\"hljs-meta\"\u003e#\u003cspan class=\"hljs-keyword\"\u003edefine\u003c/span\u003e IS_MEMBER_OF(objectPointer, className)      IS_INSTANCE_OF(objectPointer, className)    \u003cspan class=\"hljs-comment\"\u003e// temporary macro alias\u003c/span\u003e\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis code attempts to take an \u003ccode\u003eobjectPointer\u003c/code\u003e and first, force it into a pointer to our base type (\u003ccode\u003eOrganism\u003c/code\u003e), using a C-style cast. Now, in C++, C-style casts are a shorthand, and the compiler will, based on the context, attempt to do the best cast which fits the situation, starting with a \u003ccode\u003econst_cast\u003c/code\u003e (which only alters the constness of the type), and failing all the way up to a \u003ccode\u003ereinterpret_cast\u003c/code\u003e- which just ignores type information entirely and assumes you know what you\u0026#39;re doing.\u003c/p\u003e\n\u003cp\u003eWhich this developer clearly doesn\u0026#39;t.\u003c/p\u003e\n\u003cp\u003eIn any case, we pass the C-style cast result into the \u003ccode\u003edynamic_cast\u003c/code\u003e function, which attempts to cast that pointer into an instance of \u003ccode\u003eclassName\u003c/code\u003e. If no such conversion is possible (because they\u0026#39;re not part of the same inheritance hiercharcy), it returns \u003ccode\u003eNULL\u003c/code\u003e, which is what they\u0026#39;re checking.\u003c/p\u003e\n\u003cp\u003eTheir comment highlights their misunderstanding of the function; \u003ccode\u003edynamic_cast\u003c/code\u003e can be used to crosscast. In other words, \u003ccode\u003edynamic_cast\u0026lt;Dog*\u0026gt;(my_cat)\u003c/code\u003e will actually work, because (in this example) \u003ccode\u003eDog*\u003c/code\u003e and \u003ccode\u003eCat*\u003c/code\u003e share a common base.\u003c/p\u003e\n\u003cp\u003eFrom the docs:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eOtherwise, if expression points/refers to a public base class subobject of the most derived object, and the type of the most derived object has an unambiguous and public base class of type Target, the result points/refers to the Target subobject of the most derived object. In other words, dynamic_cast can be used to crosscast (or side-cast) pointers/references, between two types derived from the same base.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eYou shouldn\u0026#39;t be using dynamic cast to solve this problem. Hell, you sohuldn\u0026#39;t be doing any of this in the first place!\u003c/p\u003e\n\u003cp\u003eIn any case, in actual usage, the developers responsible do stuff like this:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (\u003cspan class=\"hljs-built_in\"\u003eIS_INSTANCE_OF\u003c/span\u003e(animal, Felid)) {\n        Felid *cat = (Felid *) animal; \u003cspan class=\"hljs-comment\"\u003e// Yes another C-style cast - this time (hopefully) devolving to the same dynamic_cast hidden inside the expansion of the previous macro.\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eI love when a comment says \u0026#34;hopefully\u0026#34;. \u0026#34;This hopefully does what I think it should do\u0026#34;.\u003c/p\u003e\n\u003cp\u003eI\u0026#39;ll let Alan summarize the problems:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eUsed prudently, the dynamic dispatch facility that object oriented languages provide their users can be a valuable tool for capturing the domain model in clean, elegant code.  However, as even C++\u0026#39;s designer Bjarne Stroustrup acknowledged, in \u0026#34;The Design and Evolution of C++\u0026#34;, the introduction of support for Run-Time Type Information makes it possible to spurn such assistance and write RTTI-based code for which a verdict of \u0026#34;combines the syntactic elegance of C with the run-time efficiency of Smalltalk\u0026#34; is just \u0026#34;too kind\u0026#34;.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c!-- Easy Reader Version: I strongly suspect a Python developer is responsible for this. Which isn\u0027t an excuse. --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\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\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":"A Type of Type Safety","RssTitle":"CodeSOD: A Type of Type Safety","CachedCommentCount":21,"LastCommentDate":"\/Date(1791975191490)\/","LastCommentDateDescription":"2026-10-14","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1791786600000)\/","ISODate":"2026-10-12","DisplayDate":"2026-10-12","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/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/a-type-of-type-safety","CommentsUrl":"https://thedailywtf.com/articles/comments/a-type-of-type-safety","Slug":"a-type-of-type-safety","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fa-type-of-type-safety+-+A+Type+of+Type+Safety+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fa-type-of-type-safety\u0026t=A+Type+of+Type+Safety+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=A%20Type%20of%20Type%20Safety:%20https://thedailywtf.com/articles/a-type-of-type-safety","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fa-type-of-type-safety","PreviousArticleId":11292,"PreviousArticleTitle":"Fast Quick","PreviousArticleSlug":"fast-quick","PreviousArticleUrl":"//thedailywtf.com/articles/fast-quick","NextArticleId":11294,"NextArticleTitle":"Digital Mail","NextArticleSlug":"digital-mail","NextArticleUrl":"//thedailywtf.com/articles/digital-mail"},{"Id":11292,"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\n\u003cstrong\u003eMatias\u003c/strong\u003e shared a standard sort of flubstituted fail-merge error\u0026#39;d; not really egregious, just routine.\n\u0026#34;I am {{emotionType}} to hear this.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#38cbfe9d47c3447790831d94826212c8\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"38cbfe9d47c3447790831d94826212c8\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/38cbfe9d47c3447790831d94826212c8.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003e\n\u003cstrong\u003eMatias\u003c/strong\u003e shared a standard sort of flubstituted fail-merge error\u0026#39;d; not really egregious, just routine.\n\u0026#34;I am {{emotionType}} to hear this.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#38cbfe9d47c3447790831d94826212c8\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"38cbfe9d47c3447790831d94826212c8\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/38cbfe9d47c3447790831d94826212c8.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eAnd another mail-not-merged from\n\u003cstrong\u003eReinier B.\u003c/strong\u003e\n\u0026#34;When the package from [SELLER] seemed to be lost in\nthe mail, I was very [EMOTIONAL_STATE] with the refund of\n[AMOUNT]. I can now buy another [ITEM] instead.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#566b877339174759b96eaa3aa5b8a032\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"566b877339174759b96eaa3aa5b8a032\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/566b877339174759b96eaa3aa5b8a032.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eDave A.\u003c/strong\u003e didn\u0026#39;t care for this mail flub, though it\u0026#39;s hardly egregious in my opinion. He suggested we just label it with\n\u0026#34;A short description of snarky comments.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6e07443194d549519ed3cff7ddfba009\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6e07443194d549519ed3cff7ddfba009\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/6e07443194d549519ed3cff7ddfba009.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;I\u0026#39;ve_missed_you_too\u0026#34; \n\u003cstrong\u003eWilly\u003c/strong\u003e wrote in response to this earnest email.\n\u0026#34;Long lasting relationships with car dealers are built on the\npersonal touchÖ.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#7fb868d3282c4229aff2d94814247705\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"7fb868d3282c4229aff2d94814247705\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/7fb868d3282c4229aff2d94814247705.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;This is a title\u0026#34;\n\u003cstrong\u003ePeter\u003c/strong\u003e said about a polyglot web page.\n\u0026#34;This is a comment.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#492453f2f3c741dcbd0d0b194a4a2815\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"492453f2f3c741dcbd0d0b194a4a2815\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/492453f2f3c741dcbd0d0b194a4a2815.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n","BodyAndAdHtml":"\u003cp\u003e\n\u003cstrong\u003eMatias\u003c/strong\u003e shared a standard sort of flubstituted fail-merge error\u0026#39;d; not really egregious, just routine.\n\u0026#34;I am {{emotionType}} to hear this.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#38cbfe9d47c3447790831d94826212c8\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"38cbfe9d47c3447790831d94826212c8\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/38cbfe9d47c3447790831d94826212c8.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eAnd another mail-not-merged from\n\u003cstrong\u003eReinier B.\u003c/strong\u003e\n\u0026#34;When the package from [SELLER] seemed to be lost in\nthe mail, I was very [EMOTIONAL_STATE] with the refund of\n[AMOUNT]. I can now buy another [ITEM] instead.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#566b877339174759b96eaa3aa5b8a032\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"566b877339174759b96eaa3aa5b8a032\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/566b877339174759b96eaa3aa5b8a032.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\n\u003cstrong\u003eDave A.\u003c/strong\u003e didn\u0026#39;t care for this mail flub, though it\u0026#39;s hardly egregious in my opinion. He suggested we just label it with\n\u0026#34;A short description of snarky comments.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6e07443194d549519ed3cff7ddfba009\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6e07443194d549519ed3cff7ddfba009\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/6e07443194d549519ed3cff7ddfba009.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;I\u0026#39;ve_missed_you_too\u0026#34; \n\u003cstrong\u003eWilly\u003c/strong\u003e wrote in response to this earnest email.\n\u0026#34;Long lasting relationships with car dealers are built on the\npersonal touchÖ.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#7fb868d3282c4229aff2d94814247705\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"7fb868d3282c4229aff2d94814247705\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/7fb868d3282c4229aff2d94814247705.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;This is a title\u0026#34;\n\u003cstrong\u003ePeter\u003c/strong\u003e said about a polyglot web page.\n\u0026#34;This is a comment.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#492453f2f3c741dcbd0d0b194a4a2815\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"492453f2f3c741dcbd0d0b194a4a2815\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/09/28/492453f2f3c741dcbd0d0b194a4a2815.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\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":"Fast Quick","RssTitle":"Error\u0027d: Fast Quick","CachedCommentCount":9,"LastCommentDate":"\/Date(1791953631250)\/","LastCommentDateDescription":"2026-10-14","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1791527400000)\/","ISODate":"2026-10-09","DisplayDate":"2026-10-09","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] \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/fast-quick","CommentsUrl":"https://thedailywtf.com/articles/comments/fast-quick","Slug":"fast-quick","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2ffast-quick+-+Fast+Quick+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2ffast-quick\u0026t=Fast+Quick+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Fast%20Quick:%20https://thedailywtf.com/articles/fast-quick","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2ffast-quick","PreviousArticleId":11291,"PreviousArticleTitle":"Racing Trains","PreviousArticleSlug":"racing-trains","PreviousArticleUrl":"//thedailywtf.com/articles/racing-trains","NextArticleId":11293,"NextArticleTitle":"A Type of Type Safety","NextArticleSlug":"a-type-of-type-safety","NextArticleUrl":"//thedailywtf.com/articles/a-type-of-type-safety"},{"Id":11291,"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\u003eRobert G\u003c/strong\u003e sends us a WTF from the outside, but I think we can come up with some hypotheses about what actually happened.\u003c/p\u003e\n\u003cp\u003eRobert was traveling by train. For complicated train reasons, the car he was seated on was not actually scheduled to continue with the train he was booked to ride, the replacement car missed its scheduled arrival, and the result was that Robert was left at a station needing to rebook his travel.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eRobert G\u003c/strong\u003e sends us a WTF from the outside, but I think we can come up with some hypotheses about what actually happened.\u003c/p\u003e\n\u003cp\u003eRobert was traveling by train. For complicated train reasons, the car he was seated on was not actually scheduled to continue with the train he was booked to ride, the replacement car missed its scheduled arrival, and the result was that Robert was left at a station needing to rebook his travel.\u003c/p\u003e\n\u003cp\u003eNow, given that this is in a region of the world with a fairly robust train network, this represented a hiccup of thirty minutes in a many hour trip. Not a particularly big deal. But Robert didn\u0026#39;t want to get stranded any longer than he had to, so he took out his phone, fired up the train company\u0026#39;s app, and made sure he had a reservation on the next train. He got the confirmation, and grabbed a coffee while he waited.\u003c/p\u003e\n\u003cp\u003eNot quite thirty minutes later, Robert boarded the train and went towards his reserved seat. Another passenger approached from the opposite direction, and they met at the seat. \u0026#34;Excuse me,\u0026#34; Robert said, \u0026#34;but I reserved this one.\u0026#34;\u003c/p\u003e\n\u003cp\u003e\u0026#34;No, \u003cem\u003eI\u003c/em\u003e reserved this one.\u0026#34;\u003c/p\u003e\n\u003cp\u003eBeing reasonable people, they both pulled out their phones and pulled up their apps. Sure enough, each one of them was confirmed for that seat. Since the email confirmation had more details than the app provided, they both pulled up the email. Same seat. Both confirmed. The timestamp of the reservation? The same, down to the second.\u003c/p\u003e\n\u003cp\u003e\u0026#34;I don\u0026#39;t think the conductor will let us sit in each other\u0026#39;s laps,\u0026#34; the other passenger said.\u003c/p\u003e\n\u003cp\u003eAs it turned out, there was enough room on the train that no lap sitting was required. Everyone got a seat, even if it wasn\u0026#39;t the one they reserved.\u003c/p\u003e\n\u003cp\u003eBut the story stuck with Robert. A major transit provider had a reservation system that clearly had a race condition. It seemed like the most basic example of race conditions too, the kind you\u0026#39;re shown in college to explain the basic concept.\u003c/p\u003e\n\u003cp\u003e\u0026#34;Check if the seat is reserved, and if it\u0026#39;s not, reserve it.\u0026#34; Because that sequence isn\u0026#39;t atomic, two different threads could do the check, see it\u0026#39;s not reserved, and then reserve it. I suppose it\u0026#39;s at least something that one reservation doesn\u0026#39;t \u003cem\u003eoverwrite\u003c/em\u003e the other, which at least indicates that a reservation is its own record.\u003c/p\u003e\n\u003cp\u003eThe real question is this: this has to happen with some frequency, so \u003cem\u003ehow has nobody fixed it\u003c/em\u003e?\u003c/p\u003e\n\u003cp\u003eThe real answer: they probably just don\u0026#39;t care, either because they literally don\u0026#39;t care, or because their software is such a trashfire that this doesn\u0026#39;t even rise to the top ten bugs. It\u0026#39;s likely a mix of both.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Look, I\u0027m in the US, and by US standards I\u0027m a top decile train user, in that I ride Amtrak a few times a year for trips, so I\u0027m not going to make snarky comments about some other country\u0027s train system, what with glass houses and stones thrown. Amtrak is actually pretty nice, all things considered, but the US *hates trains* and they try and make the experience as bad as possible. --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eRobert G\u003c/strong\u003e sends us a WTF from the outside, but I think we can come up with some hypotheses about what actually happened.\u003c/p\u003e\n\u003cp\u003eRobert was traveling by train. For complicated train reasons, the car he was seated on was not actually scheduled to continue with the train he was booked to ride, the replacement car missed its scheduled arrival, and the result was that Robert was left at a station needing to rebook his travel.\u003c/p\u003e\n\u003cp\u003eNow, given that this is in a region of the world with a fairly robust train network, this represented a hiccup of thirty minutes in a many hour trip. Not a particularly big deal. But Robert didn\u0026#39;t want to get stranded any longer than he had to, so he took out his phone, fired up the train company\u0026#39;s app, and made sure he had a reservation on the next train. He got the confirmation, and grabbed a coffee while he waited.\u003c/p\u003e\n\u003cp\u003eNot quite thirty minutes later, Robert boarded the train and went towards his reserved seat. Another passenger approached from the opposite direction, and they met at the seat. \u0026#34;Excuse me,\u0026#34; Robert said, \u0026#34;but I reserved this one.\u0026#34;\u003c/p\u003e\n\u003cp\u003e\u0026#34;No, \u003cem\u003eI\u003c/em\u003e reserved this one.\u0026#34;\u003c/p\u003e\n\u003cp\u003eBeing reasonable people, they both pulled out their phones and pulled up their apps. Sure enough, each one of them was confirmed for that seat. Since the email confirmation had more details than the app provided, they both pulled up the email. Same seat. Both confirmed. The timestamp of the reservation? The same, down to the second.\u003c/p\u003e\n\u003cp\u003e\u0026#34;I don\u0026#39;t think the conductor will let us sit in each other\u0026#39;s laps,\u0026#34; the other passenger said.\u003c/p\u003e\n\u003cp\u003eAs it turned out, there was enough room on the train that no lap sitting was required. Everyone got a seat, even if it wasn\u0026#39;t the one they reserved.\u003c/p\u003e\n\u003cp\u003eBut the story stuck with Robert. A major transit provider had a reservation system that clearly had a race condition. It seemed like the most basic example of race conditions too, the kind you\u0026#39;re shown in college to explain the basic concept.\u003c/p\u003e\n\u003cp\u003e\u0026#34;Check if the seat is reserved, and if it\u0026#39;s not, reserve it.\u0026#34; Because that sequence isn\u0026#39;t atomic, two different threads could do the check, see it\u0026#39;s not reserved, and then reserve it. I suppose it\u0026#39;s at least something that one reservation doesn\u0026#39;t \u003cem\u003eoverwrite\u003c/em\u003e the other, which at least indicates that a reservation is its own record.\u003c/p\u003e\n\u003cp\u003eThe real question is this: this has to happen with some frequency, so \u003cem\u003ehow has nobody fixed it\u003c/em\u003e?\u003c/p\u003e\n\u003cp\u003eThe real answer: they probably just don\u0026#39;t care, either because they literally don\u0026#39;t care, or because their software is such a trashfire that this doesn\u0026#39;t even rise to the top ten bugs. It\u0026#39;s likely a mix of both.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Look, I\u0027m in the US, and by US standards I\u0027m a top decile train user, in that I ride Amtrak a few times a year for trips, so I\u0027m not going to make snarky comments about some other country\u0027s train system, what with glass houses and stones thrown. Amtrak is actually pretty nice, all things considered, but the US *hates trains* and they try and make the experience as bad as possible. --\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\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":"Racing Trains","RssTitle":"Racing Trains","CachedCommentCount":29,"LastCommentDate":"\/Date(1792142781270)\/","LastCommentDateDescription":"09:26","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1791441000000)\/","ISODate":"2026-10-08","DisplayDate":"2026-10-08","Series":{"Slug":"feature-articles","Title":"Feature Articles","Description":"","CssClass":"featured"},"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/racing-trains","CommentsUrl":"https://thedailywtf.com/articles/comments/racing-trains","Slug":"racing-trains","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fracing-trains+-+Racing+Trains+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fracing-trains\u0026t=Racing+Trains+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Racing%20Trains:%20https://thedailywtf.com/articles/racing-trains","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fracing-trains","PreviousArticleId":11290,"PreviousArticleTitle":"A Tool for You","PreviousArticleSlug":"a-tool-for-you","PreviousArticleUrl":"//thedailywtf.com/articles/a-tool-for-you","NextArticleId":11292,"NextArticleTitle":"Fast Quick","NextArticleSlug":"fast-quick","NextArticleUrl":"//thedailywtf.com/articles/fast-quick"},{"Id":11290,"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\u003eA junior dev on the team had a simple question: in Java, how do I correctly read user input from the CLI and act on it?\u003c/p\u003e\n\u003cp\u003eNow, we can wonder about a junior dev not having such basic knowledge, but maybe they\u0026#39;re new to \u003cem\u003eJava\u003c/em\u003e specifically. Who knows. But \u003cstrong\u003eRobert\u003c/strong\u003e\u0026#39;s team has a senior on it who \u0026#34;likes to mentor\u0026#34;. This senior has strong opinions about how to write software, extreme confidence in those opinions, and has somehow been around the company long enough that he knows where the bodies are buried and no one will fire him.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eA junior dev on the team had a simple question: in Java, how do I correctly read user input from the CLI and act on it?\u003c/p\u003e\n\u003cp\u003eNow, we can wonder about a junior dev not having such basic knowledge, but maybe they\u0026#39;re new to \u003cem\u003eJava\u003c/em\u003e specifically. Who knows. But \u003cstrong\u003eRobert\u003c/strong\u003e\u0026#39;s team has a senior on it who \u0026#34;likes to mentor\u0026#34;. This senior has strong opinions about how to write software, extreme confidence in those opinions, and has somehow been around the company long enough that he knows where the bodies are buried and no one will fire him.\u003c/p\u003e\n\u003cp\u003eHere\u0026#39;s his sample application for reading input.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\u003cspan class=\"hljs-keyword\"\u003eimport\u003c/span\u003e java.nio.charset.StandardCharsets;\n\u003cspan class=\"hljs-keyword\"\u003eimport\u003c/span\u003e java.util.*;\n\n\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eclass\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eScannerTool\u003c/span\u003e {\n  \u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003evoid\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003emain\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String[] args)\u003c/span\u003e {\n    Map\u0026lt;Optional\u0026lt;Character\u0026gt;, Map.Entry\u0026lt;String, Boolean\u0026gt;\u0026gt; map = \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eHashMap\u003c/span\u003e\u0026lt;\u0026gt;();\n    map.put(Optional.of(\u003cspan class=\"hljs-string\"\u003e\u0026#39;A\u0026#39;\u003c/span\u003e), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;You entered A.\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003etrue\u003c/span\u003e));\n    map.put(Optional.of(\u003cspan class=\"hljs-string\"\u003e\u0026#39;B\u0026#39;\u003c/span\u003e), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;You entered B.\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003etrue\u003c/span\u003e));\n    map.put(Optional.empty(), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;You entered nothing.\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003efalse\u003c/span\u003e));\n    Optional\u0026lt;Character\u0026gt; input;\n    \u003cspan class=\"hljs-keyword\"\u003edo\u003c/span\u003e {\n      System.out.println(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Please enter A or B:\u0026#34;\u003c/span\u003e);\n    } \u003cspan class=\"hljs-keyword\"\u003ewhile\u003c/span\u003e (!map.getOrDefault((input = nextCharacter()), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003efalse\u003c/span\u003e))\n        .getValue());\n    System.out.println(map.get(input).getKey());\n  }\n\n  \u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e Optional\u0026lt;Character\u0026gt; \u003cspan class=\"hljs-title function_\"\u003enextCharacter\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c/span\u003e {\n    \u003cspan class=\"hljs-type\"\u003eString\u003c/span\u003e \u003cspan class=\"hljs-variable\"\u003el\u003c/span\u003e \u003cspan class=\"hljs-operator\"\u003e=\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eScanner\u003c/span\u003e(System.in, StandardCharsets.UTF_8).nextLine();\n    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (l != \u003cspan class=\"hljs-literal\"\u003enull\u003c/span\u003e \u0026amp;\u0026amp; !l.isEmpty()) {\n      \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e Optional.of(l.charAt(\u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e));\n    }\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e Optional.empty();\n  }\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eLook, I know Java is verbose, but this is entirely next level. Giving this to a junior has to constitute an attempt to drive the youth \u003cem\u003eout\u003c/em\u003e of the industry, because any sane person being told, \u0026#34;your job is to write this\u0026#34; would realize they\u0026#39;ve committed a grave error in their career choice and needs to escape now.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003enextCharacter\u003c/code\u003e in this case actually returns the first character of the next line, not the next character. And if there isn\u0026#39;t one, it returns an empty optional. Which, fine, we only expect one character per line of input for this exercise, so that\u0026#39;s not \u003cem\u003ewrong\u003c/em\u003e, I just don\u0026#39;t like the name of the function.\u003c/p\u003e\n\u003cp\u003eOf course, using \u003ccode\u003eScanner\u003c/code\u003e here is a wrecking ball fly swatter- that class is a full on parser for reading out common data types from a file. Worth showing to a junior, but a little out of scope of this question.\u003c/p\u003e\n\u003cp\u003eBut the real overengineering is the map of maps- well, a map of map \u003cem\u003eentries\u003c/em\u003e. The key to the outer map is an optional of the character that was entered by the user. The value is itself a map, the key of the map is the message we want to output, the value is whether or not the loop should continue. They\u0026#39;ve reinvented tuples using map entries. Which, in their defense, mainline Java doesn\u0026#39;t have tuples (enterprise edition seems to have them in the \u003ccode\u003ejavax\u003c/code\u003e namespace, but I\u0026#39;m not even certain those are meant to be general purpose tuples anyway). A quick search indicates that their absence is a perennial source of heated discussions in forums and Stack Overflow.\u003c/p\u003e\n\u003cp\u003eRobert writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eIt is remarkable in its creativity and execution and still has me in awe. When I tried to unpack it, my brain just started to pack up its things and left, haven\u0026#39;t seen it since.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eBon voyage.\u003c/p\u003e\n\u003c!-- Easy Reader Version: \"The street finds it own uses for things,\" William Gibson wrote. Then someone showed him this use of SimpleEntry types, and added, \"but it really shouldn\u0027t.\" --\u003e","BodyAndAdHtml":"\u003cp\u003eA junior dev on the team had a simple question: in Java, how do I correctly read user input from the CLI and act on it?\u003c/p\u003e\n\u003cp\u003eNow, we can wonder about a junior dev not having such basic knowledge, but maybe they\u0026#39;re new to \u003cem\u003eJava\u003c/em\u003e specifically. Who knows. But \u003cstrong\u003eRobert\u003c/strong\u003e\u0026#39;s team has a senior on it who \u0026#34;likes to mentor\u0026#34;. This senior has strong opinions about how to write software, extreme confidence in those opinions, and has somehow been around the company long enough that he knows where the bodies are buried and no one will fire him.\u003c/p\u003e\n\u003cp\u003eHere\u0026#39;s his sample application for reading input.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-java\"\u003e\u003cspan class=\"hljs-keyword\"\u003eimport\u003c/span\u003e java.nio.charset.StandardCharsets;\n\u003cspan class=\"hljs-keyword\"\u003eimport\u003c/span\u003e java.util.*;\n\n\u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eclass\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eScannerTool\u003c/span\u003e {\n  \u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003evoid\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003emain\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e(String[] args)\u003c/span\u003e {\n    Map\u0026lt;Optional\u0026lt;Character\u0026gt;, Map.Entry\u0026lt;String, Boolean\u0026gt;\u0026gt; map = \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eHashMap\u003c/span\u003e\u0026lt;\u0026gt;();\n    map.put(Optional.of(\u003cspan class=\"hljs-string\"\u003e\u0026#39;A\u0026#39;\u003c/span\u003e), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;You entered A.\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003etrue\u003c/span\u003e));\n    map.put(Optional.of(\u003cspan class=\"hljs-string\"\u003e\u0026#39;B\u0026#39;\u003c/span\u003e), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;You entered B.\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003etrue\u003c/span\u003e));\n    map.put(Optional.empty(), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;You entered nothing.\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003efalse\u003c/span\u003e));\n    Optional\u0026lt;Character\u0026gt; input;\n    \u003cspan class=\"hljs-keyword\"\u003edo\u003c/span\u003e {\n      System.out.println(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Please enter A or B:\u0026#34;\u003c/span\u003e);\n    } \u003cspan class=\"hljs-keyword\"\u003ewhile\u003c/span\u003e (!map.getOrDefault((input = nextCharacter()), \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eAbstractMap\u003c/span\u003e.SimpleEntry\u0026lt;\u0026gt;(\u003cspan class=\"hljs-string\"\u003e\u0026#34;\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003efalse\u003c/span\u003e))\n        .getValue());\n    System.out.println(map.get(input).getKey());\n  }\n\n  \u003cspan class=\"hljs-keyword\"\u003epublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003estatic\u003c/span\u003e Optional\u0026lt;Character\u0026gt; \u003cspan class=\"hljs-title function_\"\u003enextCharacter\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c/span\u003e {\n    \u003cspan class=\"hljs-type\"\u003eString\u003c/span\u003e \u003cspan class=\"hljs-variable\"\u003el\u003c/span\u003e \u003cspan class=\"hljs-operator\"\u003e=\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eScanner\u003c/span\u003e(System.in, StandardCharsets.UTF_8).nextLine();\n    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (l != \u003cspan class=\"hljs-literal\"\u003enull\u003c/span\u003e \u0026amp;\u0026amp; !l.isEmpty()) {\n      \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e Optional.of(l.charAt(\u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e));\n    }\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e Optional.empty();\n  }\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eLook, I know Java is verbose, but this is entirely next level. Giving this to a junior has to constitute an attempt to drive the youth \u003cem\u003eout\u003c/em\u003e of the industry, because any sane person being told, \u0026#34;your job is to write this\u0026#34; would realize they\u0026#39;ve committed a grave error in their career choice and needs to escape now.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003enextCharacter\u003c/code\u003e in this case actually returns the first character of the next line, not the next character. And if there isn\u0026#39;t one, it returns an empty optional. Which, fine, we only expect one character per line of input for this exercise, so that\u0026#39;s not \u003cem\u003ewrong\u003c/em\u003e, I just don\u0026#39;t like the name of the function.\u003c/p\u003e\n\u003cp\u003eOf course, using \u003ccode\u003eScanner\u003c/code\u003e here is a wrecking ball fly swatter- that class is a full on parser for reading out common data types from a file. Worth showing to a junior, but a little out of scope of this question.\u003c/p\u003e\n\u003cp\u003eBut the real overengineering is the map of maps- well, a map of map \u003cem\u003eentries\u003c/em\u003e. The key to the outer map is an optional of the character that was entered by the user. The value is itself a map, the key of the map is the message we want to output, the value is whether or not the loop should continue. They\u0026#39;ve reinvented tuples using map entries. Which, in their defense, mainline Java doesn\u0026#39;t have tuples (enterprise edition seems to have them in the \u003ccode\u003ejavax\u003c/code\u003e namespace, but I\u0026#39;m not even certain those are meant to be general purpose tuples anyway). A quick search indicates that their absence is a perennial source of heated discussions in forums and Stack Overflow.\u003c/p\u003e\n\u003cp\u003eRobert writes:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eIt is remarkable in its creativity and execution and still has me in awe. When I tried to unpack it, my brain just started to pack up its things and left, haven\u0026#39;t seen it since.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eBon voyage.\u003c/p\u003e\n\u003c!-- Easy Reader Version: \"The street finds it own uses for things,\" William Gibson wrote. Then someone showed him this use of SimpleEntry types, and added, \"but it really shouldn\u0027t.\" --\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":"A Tool for You","RssTitle":"CodeSOD: A Tool for You","CachedCommentCount":16,"LastCommentDate":"\/Date(1791878073780)\/","LastCommentDateDescription":"2026-10-13","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1791354600000)\/","ISODate":"2026-10-07","DisplayDate":"2026-10-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[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/a-tool-for-you","CommentsUrl":"https://thedailywtf.com/articles/comments/a-tool-for-you","Slug":"a-tool-for-you","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fa-tool-for-you+-+A+Tool+for+You+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fa-tool-for-you\u0026t=A+Tool+for+You+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=A%20Tool%20for%20You:%20https://thedailywtf.com/articles/a-tool-for-you","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fa-tool-for-you","PreviousArticleId":11289,"PreviousArticleTitle":"A Random Article","PreviousArticleSlug":"a-random-article","PreviousArticleUrl":"//thedailywtf.com/articles/a-random-article","NextArticleId":11291,"NextArticleTitle":"Racing Trains","NextArticleSlug":"racing-trains","NextArticleUrl":"//thedailywtf.com/articles/racing-trains"}]