[{"Id":11312,"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\u0026#34;I Already Hate Running... I Don\u0026#39;t Want To Have To Run Each Street A Second Time!\u0026#34;\nplods \n\u003cstrong\u003eWeaponizedFun\u003c/strong\u003e\n\u0026#34;I\u0026#39;ve gotten a couple of notifications from CityStrides today that\nthey\u0026#39;ve updated streets for several cities, but it looks like\nthey\u0026#39;re doubling the effort it\u0026#39;s going to take to finish\ncompleting these roads.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d72b3a03e73644879ec43ebf4d626587\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d72b3a03e73644879ec43ebf4d626587\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/d72b3a03e73644879ec43ebf4d626587.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003e\u0026#34;I Already Hate Running... I Don\u0026#39;t Want To Have To Run Each Street A Second Time!\u0026#34;\nplods \n\u003cstrong\u003eWeaponizedFun\u003c/strong\u003e\n\u0026#34;I\u0026#39;ve gotten a couple of notifications from CityStrides today that\nthey\u0026#39;ve updated streets for several cities, but it looks like\nthey\u0026#39;re doubling the effort it\u0026#39;s going to take to finish\ncompleting these roads.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d72b3a03e73644879ec43ebf4d626587\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d72b3a03e73644879ec43ebf4d626587\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/d72b3a03e73644879ec43ebf4d626587.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;I\u0026#39;ll be back in 292 years\u0026#34; concedes \n\u003cstrong\u003eRick H.\u003c/strong\u003e\n\u0026#34;I asked GoDaddy for a single whois record. They gave it\nto me, and told me if I wanted to ask\nanything else to come back in 300 years.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#14d1f05fdc7f4a1a91c06bd07e18e9a1\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"14d1f05fdc7f4a1a91c06bd07e18e9a1\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/14d1f05fdc7f4a1a91c06bd07e18e9a1.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\n\u003cstrong\u003eTotty\u003c/strong\u003e reports \n\u0026#34;I found this at the bottom of an article at \u003ca href=\"https://www.ajournalofmusicalthings.com/ongoing-history-daily-who-was-the-first-band-to-design-their-own-logo/\"\u003eajournalofmusicalthings.com\u003c/a\u003e.\n\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6ad3a9c085a64f40819836dbc81d5e10\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6ad3a9c085a64f40819836dbc81d5e10\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/6ad3a9c085a64f40819836dbc81d5e10.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;I hope I don\u0026#39;t have to pay the whole period\u0026#34; frets \n\u003cstrong\u003eErnesto T.\u003c/strong\u003e\n\u0026#34;Not considering the mix of languages between English and Italian, \nmy subscription will renew on 1st of Jan, 1970 So am I \n56 years late in payment? I hope I am\nnot. It would be quite a big amount of money\nin inflation and interests.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6f1258fe3be148a392de952cdce8b36c\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6f1258fe3be148a392de952cdce8b36c\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/6f1258fe3be148a392de952cdce8b36c.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;Everything is insecure\u0026#34; worries \n\u003cstrong\u003eDaryl\u003c/strong\u003e too. \n\u0026#34;No threats found, but I don\u0026#39;t feel very safe.\u0026#34;  It was a worrisome week. \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#a4eebddd2eb44db5baade067ac2b5177\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"a4eebddd2eb44db5baade067ac2b5177\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/a4eebddd2eb44db5baade067ac2b5177.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n","BodyAndAdHtml":"\u003cp\u003e\u0026#34;I Already Hate Running... I Don\u0026#39;t Want To Have To Run Each Street A Second Time!\u0026#34;\nplods \n\u003cstrong\u003eWeaponizedFun\u003c/strong\u003e\n\u0026#34;I\u0026#39;ve gotten a couple of notifications from CityStrides today that\nthey\u0026#39;ve updated streets for several cities, but it looks like\nthey\u0026#39;re doubling the effort it\u0026#39;s going to take to finish\ncompleting these roads.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d72b3a03e73644879ec43ebf4d626587\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d72b3a03e73644879ec43ebf4d626587\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/d72b3a03e73644879ec43ebf4d626587.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;I\u0026#39;ll be back in 292 years\u0026#34; concedes \n\u003cstrong\u003eRick H.\u003c/strong\u003e\n\u0026#34;I asked GoDaddy for a single whois record. They gave it\nto me, and told me if I wanted to ask\nanything else to come back in 300 years.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#14d1f05fdc7f4a1a91c06bd07e18e9a1\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"14d1f05fdc7f4a1a91c06bd07e18e9a1\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/14d1f05fdc7f4a1a91c06bd07e18e9a1.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\n\u003cstrong\u003eTotty\u003c/strong\u003e reports \n\u0026#34;I found this at the bottom of an article at \u003ca href=\"https://www.ajournalofmusicalthings.com/ongoing-history-daily-who-was-the-first-band-to-design-their-own-logo/\"\u003eajournalofmusicalthings.com\u003c/a\u003e.\n\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6ad3a9c085a64f40819836dbc81d5e10\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6ad3a9c085a64f40819836dbc81d5e10\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/6ad3a9c085a64f40819836dbc81d5e10.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;I hope I don\u0026#39;t have to pay the whole period\u0026#34; frets \n\u003cstrong\u003eErnesto T.\u003c/strong\u003e\n\u0026#34;Not considering the mix of languages between English and Italian, \nmy subscription will renew on 1st of Jan, 1970 So am I \n56 years late in payment? I hope I am\nnot. It would be quite a big amount of money\nin inflation and interests.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6f1258fe3be148a392de952cdce8b36c\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6f1258fe3be148a392de952cdce8b36c\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/6f1258fe3be148a392de952cdce8b36c.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;Everything is insecure\u0026#34; worries \n\u003cstrong\u003eDaryl\u003c/strong\u003e too. \n\u0026#34;No threats found, but I don\u0026#39;t feel very safe.\u0026#34;  It was a worrisome week. \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#a4eebddd2eb44db5baade067ac2b5177\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"a4eebddd2eb44db5baade067ac2b5177\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/11/05/a4eebddd2eb44db5baade067ac2b5177.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Remember Remember","RssTitle":"Error\u0027d: Remember Remember","CachedCommentCount":10,"LastCommentDate":"\/Date(1794139139667)\/","LastCommentDateDescription":"11:58","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793946600000)\/","ISODate":"2026-11-06","DisplayDate":"2026-11-06","Series":{"Slug":"errord","Title":"Error\u0027d","Description":"Error\u0027d features fun error messages and other visual oddities from the world of IT.","CssClass":"errord"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/remember-remember","CommentsUrl":"https://thedailywtf.com/articles/comments/remember-remember","Slug":"remember-remember","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fremember-remember+-+Remember+Remember+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fremember-remember\u0026t=Remember+Remember+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Remember%20Remember:%20https://thedailywtf.com/articles/remember-remember","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fremember-remember","PreviousArticleId":11311,"PreviousArticleTitle":"Only Create Me if I Exist","PreviousArticleSlug":"only-create-me-if-i-exist","PreviousArticleUrl":"//thedailywtf.com/articles/only-create-me-if-i-exist","NextArticleId":null,"NextArticleTitle":null,"NextArticleSlug":null,"NextArticleUrl":"//thedailywtf.com/articles/"},{"Id":11311,"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\u003eForeign keys are an important part of making sure the entities in our relational database can be connected back together and queried correctly. It\u0026#39;s part of proper data normalization. This isn\u0026#39;t shocking, of course: the order line table has a foreign key over to the products table, so that every line item points to a product we sell. That\u0026#39;s database 101. Database 201, you\u0026#39;d also think about the times where you have a hierarchy of records, where say, every \u003ccode\u003eEmployee\u003c/code\u003e has a \u003ccode\u003eManagerId\u003c/code\u003e, which is a foreign key back to the \u003ccode\u003eEmployee\u003c/code\u003e table itself (and in database 301, you\u0026#39;ll understand why having a \u003ccode\u003eManagerId\u003c/code\u003e field is a terrible choice, but that\u0026#39;s neither here nor there).\u003c/p\u003e\n\u003cp\u003eThe important thing here is that foreign keys are very common, and foreign keys pointing back to the same table are also very common.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eForeign keys are an important part of making sure the entities in our relational database can be connected back together and queried correctly. It\u0026#39;s part of proper data normalization. This isn\u0026#39;t shocking, of course: the order line table has a foreign key over to the products table, so that every line item points to a product we sell. That\u0026#39;s database 101. Database 201, you\u0026#39;d also think about the times where you have a hierarchy of records, where say, every \u003ccode\u003eEmployee\u003c/code\u003e has a \u003ccode\u003eManagerId\u003c/code\u003e, which is a foreign key back to the \u003ccode\u003eEmployee\u003c/code\u003e table itself (and in database 301, you\u0026#39;ll understand why having a \u003ccode\u003eManagerId\u003c/code\u003e field is a terrible choice, but that\u0026#39;s neither here nor there).\u003c/p\u003e\n\u003cp\u003eThe important thing here is that foreign keys are very common, and foreign keys pointing back to the same table are also very common.\u003c/p\u003e\n\u003cp\u003eBut it can still go very wrong. \u003cstrong\u003eRoman\u003c/strong\u003e sends us this foreign key definition in a database they maintain.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003e\u003cspan class=\"hljs-keyword\"\u003eALTER\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eTABLE\u003c/span\u003e [dbo].[ListingDetails]  \u003cspan class=\"hljs-keyword\"\u003eWITH\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eCHECK\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eADD\u003c/span\u003e  \u003cspan class=\"hljs-keyword\"\u003eCONSTRAINT\u003c/span\u003e [FK_Listings_Listings] \u003cspan class=\"hljs-keyword\"\u003eFOREIGN\u003c/span\u003e KEY([Id])\n\u003cspan class=\"hljs-keyword\"\u003eREFERENCES\u003c/span\u003e [dbo].[ListingDetails] ([Id])\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis ensures that the \u003ccode\u003eListingDetails\u003c/code\u003e table\u0026#39;s \u003ccode\u003eId\u003c/code\u003e field is a foreign key over to the \u003ccode\u003eListingDetails\u003c/code\u003e table\u0026#39;s \u003ccode\u003eId\u003c/code\u003e field. A field is a foreign key back to itself.\u003c/p\u003e\n\u003cp\u003eRoman writes: \u0026#34;I can\u0026#39;t believe SQL Server even allows this...\u0026#34;\u003c/p\u003e\n\u003cp\u003eI can. While I haven\u0026#39;t personally tried this out, a bit of cursory searching implies that this does actually \u003cem\u003ework\u003c/em\u003e- the record satisfies its own constraint, so you can still add it to the database. It\u0026#39;s basically a no-op, which isn\u0026#39;t great, but it\u0026#39;s not SQL Server\u0026#39;s job to ensure you keep all your toes because they\u0026#39;ve removed all the footguns.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Only create me if I exist --\u003e","BodyAndAdHtml":"\u003cp\u003eForeign keys are an important part of making sure the entities in our relational database can be connected back together and queried correctly. It\u0026#39;s part of proper data normalization. This isn\u0026#39;t shocking, of course: the order line table has a foreign key over to the products table, so that every line item points to a product we sell. That\u0026#39;s database 101. Database 201, you\u0026#39;d also think about the times where you have a hierarchy of records, where say, every \u003ccode\u003eEmployee\u003c/code\u003e has a \u003ccode\u003eManagerId\u003c/code\u003e, which is a foreign key back to the \u003ccode\u003eEmployee\u003c/code\u003e table itself (and in database 301, you\u0026#39;ll understand why having a \u003ccode\u003eManagerId\u003c/code\u003e field is a terrible choice, but that\u0026#39;s neither here nor there).\u003c/p\u003e\n\u003cp\u003eThe important thing here is that foreign keys are very common, and foreign keys pointing back to the same table are also very common.\u003c/p\u003e\n\u003cp\u003eBut it can still go very wrong. \u003cstrong\u003eRoman\u003c/strong\u003e sends us this foreign key definition in a database they maintain.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003e\u003cspan class=\"hljs-keyword\"\u003eALTER\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eTABLE\u003c/span\u003e [dbo].[ListingDetails]  \u003cspan class=\"hljs-keyword\"\u003eWITH\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eCHECK\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eADD\u003c/span\u003e  \u003cspan class=\"hljs-keyword\"\u003eCONSTRAINT\u003c/span\u003e [FK_Listings_Listings] \u003cspan class=\"hljs-keyword\"\u003eFOREIGN\u003c/span\u003e KEY([Id])\n\u003cspan class=\"hljs-keyword\"\u003eREFERENCES\u003c/span\u003e [dbo].[ListingDetails] ([Id])\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis ensures that the \u003ccode\u003eListingDetails\u003c/code\u003e table\u0026#39;s \u003ccode\u003eId\u003c/code\u003e field is a foreign key over to the \u003ccode\u003eListingDetails\u003c/code\u003e table\u0026#39;s \u003ccode\u003eId\u003c/code\u003e field. A field is a foreign key back to itself.\u003c/p\u003e\n\u003cp\u003eRoman writes: \u0026#34;I can\u0026#39;t believe SQL Server even allows this...\u0026#34;\u003c/p\u003e\n\u003cp\u003eI can. While I haven\u0026#39;t personally tried this out, a bit of cursory searching implies that this does actually \u003cem\u003ework\u003c/em\u003e- the record satisfies its own constraint, so you can still add it to the database. It\u0026#39;s basically a no-op, which isn\u0026#39;t great, but it\u0026#39;s not SQL Server\u0026#39;s job to ensure you keep all your toes because they\u0026#39;ve removed all the footguns.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Only create me if I exist --\u003e\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/buildmaster-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\t\u003ca href=\"https://inedo.com/BuildMaster?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eUtilize BuildMaster\u003c/a\u003e to release your software with confidence, at the pace your business demands. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eDownload\u003c/a\u003e today!  \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Only Create Me if I Exist","RssTitle":"CodeSOD: Only Create Me if I Exist","CachedCommentCount":22,"LastCommentDate":"\/Date(1794080914350)\/","LastCommentDateDescription":"2026-11-07","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793860200000)\/","ISODate":"2026-11-05","DisplayDate":"2026-11-05","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/buildmaster-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\t\u003ca href=\"https://inedo.com/BuildMaster?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eUtilize BuildMaster\u003c/a\u003e to release your software with confidence, at the pace your business demands. \u003ca href=\"https://inedo.com/BuildMaster/download?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=Confidence\u0026amp;utm_campaign=Buildmaster_Footer\"\u003eDownload\u003c/a\u003e today!  \n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/only-create-me-if-i-exist","CommentsUrl":"https://thedailywtf.com/articles/comments/only-create-me-if-i-exist","Slug":"only-create-me-if-i-exist","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fonly-create-me-if-i-exist+-+Only+Create+Me+if+I+Exist+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fonly-create-me-if-i-exist\u0026t=Only+Create+Me+if+I+Exist+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Only%20Create%20Me%20if%20I%20Exist:%20https://thedailywtf.com/articles/only-create-me-if-i-exist","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fonly-create-me-if-i-exist","PreviousArticleId":11310,"PreviousArticleTitle":"What it Doesn\u0027t Do","PreviousArticleSlug":"what-it-doesn-t-do","PreviousArticleUrl":"//thedailywtf.com/articles/what-it-doesn-t-do","NextArticleId":11312,"NextArticleTitle":"Remember Remember","NextArticleSlug":"remember-remember","NextArticleUrl":"//thedailywtf.com/articles/remember-remember"},{"Id":11310,"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\u003eAlastair\u003c/strong\u003e found this comment in his codebase, and wondered, \u0026#34;who wrote this comment?\u0026#34; A quick \u003ccode\u003eblame\u003c/code\u003e answered the question: he did. He did not, however, write the code.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-javascript\"\u003e public \u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003egetAllMailers\u003c/span\u003e(\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e) {\n        \u003cspan class=\"hljs-comment\"\u003e// This function neither returns Mailers, nor all of them.\u003c/span\u003e\n        ...\n }\n\u003c/code\u003e\u003c/pre\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eAlastair\u003c/strong\u003e found this comment in his codebase, and wondered, \u0026#34;who wrote this comment?\u0026#34; A quick \u003ccode\u003eblame\u003c/code\u003e answered the question: he did. He did not, however, write the code.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-javascript\"\u003e public \u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003egetAllMailers\u003c/span\u003e(\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e) {\n        \u003cspan class=\"hljs-comment\"\u003e// This function neither returns Mailers, nor all of them.\u003c/span\u003e\n        ...\n }\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eI suppose the comment was easier to add that doing a global find/replace to update the function name everywhere. But I do wonder, what \u003cem\u003edoes\u003c/em\u003e this function return?\u003c/p\u003e\n\u003cp\u003eIn any case, sing along: \u0026#34;I wrote the comment, but I did not pick this function name\u0026#34;.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Is neither easy, nor a version --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eAlastair\u003c/strong\u003e found this comment in his codebase, and wondered, \u0026#34;who wrote this comment?\u0026#34; A quick \u003ccode\u003eblame\u003c/code\u003e answered the question: he did. He did not, however, write the code.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-javascript\"\u003e public \u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e \u003cspan class=\"hljs-title function_\"\u003egetAllMailers\u003c/span\u003e(\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e) {\n        \u003cspan class=\"hljs-comment\"\u003e// This function neither returns Mailers, nor all of them.\u003c/span\u003e\n        ...\n }\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eI suppose the comment was easier to add that doing a global find/replace to update the function name everywhere. But I do wonder, what \u003cem\u003edoes\u003c/em\u003e this function return?\u003c/p\u003e\n\u003cp\u003eIn any case, sing along: \u0026#34;I wrote the comment, but I did not pick this function name\u0026#34;.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Is neither easy, nor a version --\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 the plebs out of prod. Restrict NuGet feed privileges with ProGet. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=PlebsFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"What it Doesn\u0027t Do","RssTitle":"Representative Line: What it Doesn\u0027t Do","CachedCommentCount":13,"LastCommentDate":"\/Date(1793934822373)\/","LastCommentDateDescription":"2026-11-06","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793773800000)\/","ISODate":"2026-11-04","DisplayDate":"2026-11-04","Series":{"Slug":"representative-line","Title":"Representative Line","Description":"A single line of code from a large application that somehow manages to provide an almost endless insight into the pain that its maintainers face each day.","CssClass":"soapbox"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tKeep the plebs out of prod. Restrict NuGet feed privileges with ProGet. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=PlebsFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/what-it-doesn-t-do","CommentsUrl":"https://thedailywtf.com/articles/comments/what-it-doesn-t-do","Slug":"what-it-doesn-t-do","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fwhat-it-doesn-t-do+-+What+it+Doesn%27t+Do+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fwhat-it-doesn-t-do\u0026t=What+it+Doesn%27t+Do+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=What%20it%20Doesn\u0027t%20Do:%20https://thedailywtf.com/articles/what-it-doesn-t-do","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fwhat-it-doesn-t-do","PreviousArticleId":11309,"PreviousArticleTitle":"Death of the Auth-Er","PreviousArticleSlug":"death-of-the-auth-er","PreviousArticleUrl":"//thedailywtf.com/articles/death-of-the-auth-er","NextArticleId":11311,"NextArticleTitle":"Only Create Me if I Exist","NextArticleSlug":"only-create-me-if-i-exist","NextArticleUrl":"//thedailywtf.com/articles/only-create-me-if-i-exist"},{"Id":11309,"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\u003eWhen writing Perl, it\u0026#39;s not unusual to want to \u003ccode\u003edie\u003c/code\u003e. The \u003ccode\u003edie\u003c/code\u003e function ends your Perl program with an error string, and you\u0026#39;ll often see code like: \u003ccode\u003edie \u0026#34;My error\u0026#34; unless $i \u0026gt; 5\u003c/code\u003e or \u003ccode\u003edie \u0026#34;Other error\u0026#34; if check()\u003c/code\u003e, because Perl just loves the backwards conditionals. What\u0026#39;s even more fun with \u003ccode\u003edie\u003c/code\u003e is \u003ca href=\"https://perldoc.perl.org/functions/die\"\u003ehow it behaves with \u003ccode\u003eeval\u003c/code\u003e blocks\u003c/a\u003e, so it doesn\u0026#39;t always kill your program, sometimes it is how you pass error strings back out of sections of your program.\u003c/p\u003e\n\u003cp\u003eAnd poor \u003cstrong\u003eBobby\u003c/strong\u003e has inherited some Perl that just really loves to \u003ccode\u003edie\u003c/code\u003e.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eWhen writing Perl, it\u0026#39;s not unusual to want to \u003ccode\u003edie\u003c/code\u003e. The \u003ccode\u003edie\u003c/code\u003e function ends your Perl program with an error string, and you\u0026#39;ll often see code like: \u003ccode\u003edie \u0026#34;My error\u0026#34; unless $i \u0026gt; 5\u003c/code\u003e or \u003ccode\u003edie \u0026#34;Other error\u0026#34; if check()\u003c/code\u003e, because Perl just loves the backwards conditionals. What\u0026#39;s even more fun with \u003ccode\u003edie\u003c/code\u003e is \u003ca href=\"https://perldoc.perl.org/functions/die\"\u003ehow it behaves with \u003ccode\u003eeval\u003c/code\u003e blocks\u003c/a\u003e, so it doesn\u0026#39;t always kill your program, sometimes it is how you pass error strings back out of sections of your program.\u003c/p\u003e\n\u003cp\u003eAnd poor \u003cstrong\u003eBobby\u003c/strong\u003e has inherited some Perl that just really loves to \u003ccode\u003edie\u003c/code\u003e.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-perl\"\u003epublic function store()\n{\n    echo \u003cspan class=\"hljs-string\"\u003e\u0026#39;Hello\u0026#39;\u003c/span\u003e; \u003cspan class=\"hljs-keyword\"\u003edie\u003c/span\u003e;\n    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (Auth::attempt(Input::only(\u003cspan class=\"hljs-string\"\u003e\u0026#39;email\u0026#39;\u003c/span\u003e, \u003cspan class=\"hljs-string\"\u003e\u0026#39;password\u0026#39;\u003c/span\u003e)))\n    {\n        echo \u003cspan class=\"hljs-string\"\u003e\u0026#39;done\u0026#39;\u003c/span\u003e; \u003cspan class=\"hljs-keyword\"\u003edie\u003c/span\u003e;\n        \u003cspan class=\"hljs-regexp\"\u003e//\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e \u003cspan class=\"hljs-string\"\u003e\u0026#34;welcome \u0026#34;\u003c/span\u003e.Auth::user()-\u0026gt;username\n    }\n    echo \u003cspan class=\"hljs-string\"\u003e\u0026#34;Oops! Fails\u0026#34;\u003c/span\u003e; \u003cspan class=\"hljs-keyword\"\u003edie\u003c/span\u003e;\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e Redirect::back()-\u0026gt;with_input();\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBobby didn\u0026#39;t send the source control history here, but I have a sense of what it likely was like, once. If they authenticate successfully, print a welcome message. If they don\u0026#39;t, redirect back to the logon page and let them try again. I suspect they wanted to disable the route. So first they disabled the success path, only to discover that the failure path kept redirecting, so they disabled that too. Finally, they added the \u003ccode\u003eHello\u003c/code\u003e at the top to disable the whole thing.\u003c/p\u003e\n\u003cp\u003eWhy? Why did they do any of this? No idea. It \u003cem\u003efeels\u003c/em\u003e like debugging code, but you\u0026#39;d expect more \u003ccode\u003eecho\u003c/code\u003es and fewer \u003ccode\u003edie\u003c/code\u003es if that were the case. And you wouldn\u0026#39;t expect it to leak into production and sit there for years, which is what happened here.\u003c/p\u003e\n\u003c!-- Easy Reader Version: My favorite thing about Perl is that when they finally tried to make the syntax make sense, it pissed people off so badly they had to name the result as a new language, because they couldn\u0027t call in Perl without Perl programmers rioting. --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\u003e","BodyAndAdHtml":"\u003cp\u003eWhen writing Perl, it\u0026#39;s not unusual to want to \u003ccode\u003edie\u003c/code\u003e. The \u003ccode\u003edie\u003c/code\u003e function ends your Perl program with an error string, and you\u0026#39;ll often see code like: \u003ccode\u003edie \u0026#34;My error\u0026#34; unless $i \u0026gt; 5\u003c/code\u003e or \u003ccode\u003edie \u0026#34;Other error\u0026#34; if check()\u003c/code\u003e, because Perl just loves the backwards conditionals. What\u0026#39;s even more fun with \u003ccode\u003edie\u003c/code\u003e is \u003ca href=\"https://perldoc.perl.org/functions/die\"\u003ehow it behaves with \u003ccode\u003eeval\u003c/code\u003e blocks\u003c/a\u003e, so it doesn\u0026#39;t always kill your program, sometimes it is how you pass error strings back out of sections of your program.\u003c/p\u003e\n\u003cp\u003eAnd poor \u003cstrong\u003eBobby\u003c/strong\u003e has inherited some Perl that just really loves to \u003ccode\u003edie\u003c/code\u003e.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-perl\"\u003epublic function store()\n{\n    echo \u003cspan class=\"hljs-string\"\u003e\u0026#39;Hello\u0026#39;\u003c/span\u003e; \u003cspan class=\"hljs-keyword\"\u003edie\u003c/span\u003e;\n    \u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (Auth::attempt(Input::only(\u003cspan class=\"hljs-string\"\u003e\u0026#39;email\u0026#39;\u003c/span\u003e, \u003cspan class=\"hljs-string\"\u003e\u0026#39;password\u0026#39;\u003c/span\u003e)))\n    {\n        echo \u003cspan class=\"hljs-string\"\u003e\u0026#39;done\u0026#39;\u003c/span\u003e; \u003cspan class=\"hljs-keyword\"\u003edie\u003c/span\u003e;\n        \u003cspan class=\"hljs-regexp\"\u003e//\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e \u003cspan class=\"hljs-string\"\u003e\u0026#34;welcome \u0026#34;\u003c/span\u003e.Auth::user()-\u0026gt;username\n    }\n    echo \u003cspan class=\"hljs-string\"\u003e\u0026#34;Oops! Fails\u0026#34;\u003c/span\u003e; \u003cspan class=\"hljs-keyword\"\u003edie\u003c/span\u003e;\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e Redirect::back()-\u0026gt;with_input();\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBobby didn\u0026#39;t send the source control history here, but I have a sense of what it likely was like, once. If they authenticate successfully, print a welcome message. If they don\u0026#39;t, redirect back to the logon page and let them try again. I suspect they wanted to disable the route. So first they disabled the success path, only to discover that the failure path kept redirecting, so they disabled that too. Finally, they added the \u003ccode\u003eHello\u003c/code\u003e at the top to disable the whole thing.\u003c/p\u003e\n\u003cp\u003eWhy? Why did they do any of this? No idea. It \u003cem\u003efeels\u003c/em\u003e like debugging code, but you\u0026#39;d expect more \u003ccode\u003eecho\u003c/code\u003es and fewer \u003ccode\u003edie\u003c/code\u003es if that were the case. And you wouldn\u0026#39;t expect it to leak into production and sit there for years, which is what happened here.\u003c/p\u003e\n\u003c!-- Easy Reader Version: My favorite thing about Perl is that when they finally tried to make the syntax make sense, it pissed people off so badly they had to name the result as a new language, because they couldn\u0027t call in Perl without Perl programmers rioting. --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\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":"Death of the Auth-Er","RssTitle":"CodeSOD: Death of the Auth-Er","CachedCommentCount":27,"LastCommentDate":"\/Date(1793869324410)\/","LastCommentDateDescription":"2026-11-05","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793687400000)\/","ISODate":"2026-11-03","DisplayDate":"2026-11-03","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/buildmaster-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\t\u003ca href=\"https://inedo.com/BuildMaster?utm_source=tdwtf\u0026amp;utm_medium=footerad\u0026amp;utm_term=2018\u0026amp;utm_content=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/death-of-the-auth-er","CommentsUrl":"https://thedailywtf.com/articles/comments/death-of-the-auth-er","Slug":"death-of-the-auth-er","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fdeath-of-the-auth-er+-+Death+of+the+Auth-Er+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fdeath-of-the-auth-er\u0026t=Death+of+the+Auth-Er+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Death%20of%20the%20Auth-Er:%20https://thedailywtf.com/articles/death-of-the-auth-er","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fdeath-of-the-auth-er","PreviousArticleId":11308,"PreviousArticleTitle":"Get It Now","PreviousArticleSlug":"get-it-now","PreviousArticleUrl":"//thedailywtf.com/articles/get-it-now","NextArticleId":11310,"NextArticleTitle":"What it Doesn\u0027t Do","NextArticleSlug":"what-it-doesn-t-do","NextArticleUrl":"//thedailywtf.com/articles/what-it-doesn-t-do"},{"Id":11308,"Author":{"Name":"Remy Porter","FirstName":"Remy","ShortDescription":"Computers were a mistake, so I accidentally became a farmer? Editor-in-Chief for TDWTF.","DescriptionHtml":"\u003cp\u003eRemy is a veteran developer who writes software for farming robots. They pick tomatoes.\u003c/p\u003e\r\n\u003cp\u003eHe\u0027s often on stage, doing improv comedy, but insists that \u003cem\u003ehe\u003c/em\u003e isn\u0027t doing comedy- it\u0027s deadly serious. You\u0027re laughing at him, not with him. That, by the way, is usually true- you\u0027re laughing at him, not with him.\u003c/p\u003e","Slug":"remy-porter","IsAdmin":true,"IsActive":true,"ImageUrl":"https://s3.amazonaws.com/remy.jetpackshark.com/remy-thumb.jpg"},"Status":"Published","SummaryHtml":"\u003cp\u003e\u0026#34;TODO\u0026#34; comments are an inescapable part of our work. Yes, yes, you \u003cem\u003eshould\u003c/em\u003e just do it right the first time, everything should probably have a ticket in whatever your ticket system is for visibility, but at some point, you\u0026#39;re just going to leave a \u0026#34;TODO\u0026#34; behind.\u003c/p\u003e\n\u003cp\u003eBut hopefully, the TODO gets TODONE, which is not what happened in \u003cstrong\u003eSam C\u003c/strong\u003e\u0026#39;s codebase.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u0026#34;TODO\u0026#34; comments are an inescapable part of our work. Yes, yes, you \u003cem\u003eshould\u003c/em\u003e just do it right the first time, everything should probably have a ticket in whatever your ticket system is for visibility, but at some point, you\u0026#39;re just going to leave a \u0026#34;TODO\u0026#34; behind.\u003c/p\u003e\n\u003cp\u003eBut hopefully, the TODO gets TODONE, which is not what happened in \u003cstrong\u003eSam C\u003c/strong\u003e\u0026#39;s codebase.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-php\"\u003e\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003egetnow\u003c/span\u003e(\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e)\n\u003c/span\u003e{\n    \u003cspan class=\"hljs-comment\"\u003e//TODO\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e \u003cspan class=\"hljs-string\"\u003e\u0026#39;2012\u0026#39;\u003c/span\u003e;\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIt\u0026#39;s the \u003ca href=\"https://xkcd.com/221/\"\u003eXKCD\u003c/a\u003e, but for years. Or \u003ca href=\"https://knowyourmeme.com/memes/what-year-is-it\"\u003eWHAT YEAR IS IN\u003c/a\u003e memes.\u003c/p\u003e\n\u003cp\u003eAt least it\u0026#39;s a relatively recent year, not some far off point from over a decade ago.\u003c/p\u003e\n\u003cp\u003eWait. 2012 was \u003cem\u003ehow\u003c/em\u003e long ago? That can\u0026#39;t be right. It was just a few years ago!\u003c/p\u003e\n\u003c!-- Easy Reader Version: The linear passage of time is a crime --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\u003e","BodyAndAdHtml":"\u003cp\u003e\u0026#34;TODO\u0026#34; comments are an inescapable part of our work. Yes, yes, you \u003cem\u003eshould\u003c/em\u003e just do it right the first time, everything should probably have a ticket in whatever your ticket system is for visibility, but at some point, you\u0026#39;re just going to leave a \u0026#34;TODO\u0026#34; behind.\u003c/p\u003e\n\u003cp\u003eBut hopefully, the TODO gets TODONE, which is not what happened in \u003cstrong\u003eSam C\u003c/strong\u003e\u0026#39;s codebase.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-php\"\u003e\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003egetnow\u003c/span\u003e(\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e)\n\u003c/span\u003e{\n    \u003cspan class=\"hljs-comment\"\u003e//TODO\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e \u003cspan class=\"hljs-string\"\u003e\u0026#39;2012\u0026#39;\u003c/span\u003e;\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIt\u0026#39;s the \u003ca href=\"https://xkcd.com/221/\"\u003eXKCD\u003c/a\u003e, but for years. Or \u003ca href=\"https://knowyourmeme.com/memes/what-year-is-it\"\u003eWHAT YEAR IS IN\u003c/a\u003e memes.\u003c/p\u003e\n\u003cp\u003eAt least it\u0026#39;s a relatively recent year, not some far off point from over a decade ago.\u003c/p\u003e\n\u003cp\u003eWait. 2012 was \u003cem\u003ehow\u003c/em\u003e long ago? That can\u0026#39;t be right. It was just a few years ago!\u003c/p\u003e\n\u003c!-- Easy Reader Version: The linear passage of time is a crime --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\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":"Get It Now","RssTitle":"CodeSOD: Get It Now","CachedCommentCount":20,"LastCommentDate":"\/Date(1794137494277)\/","LastCommentDateDescription":"11:31","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793601000000)\/","ISODate":"2026-11-02","DisplayDate":"2026-11-02","Series":{"Slug":"code-sod","Title":"CodeSOD","Description":"Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.","CssClass":"code"},"FooterAdHtml":"\u003cdiv\u003e\n\t[Advertisement] \u003cb\u003ePlan Your .NET 9 Migration with Confidence\u003c/b\u003e\u003cbr/\u003eYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. \u003cb\u003e\u003ca href=\"https://inedo.com/support/whitepapers/dotnet-guide?utm_campaign=dotnet\u0026amp;utm_source=tdwtf-footer\"\u003eDownload Free Guide Now!\u003c/a\u003e\u003c/b\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e","Url":"https://thedailywtf.com/articles/get-it-now","CommentsUrl":"https://thedailywtf.com/articles/comments/get-it-now","Slug":"get-it-now","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fget-it-now+-+Get+It+Now+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fget-it-now\u0026t=Get+It+Now+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Get%20It%20Now:%20https://thedailywtf.com/articles/get-it-now","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fget-it-now","PreviousArticleId":11307,"PreviousArticleTitle":"Named And ","PreviousArticleSlug":"named-and","PreviousArticleUrl":"//thedailywtf.com/articles/named-and","NextArticleId":11309,"NextArticleTitle":"Death of the Auth-Er","NextArticleSlug":"death-of-the-auth-er","NextArticleUrl":"//thedailywtf.com/articles/death-of-the-auth-er"},{"Id":11307,"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\u003eI do like it when submissions include the creator of the wtf, unless the specific kind of err is really spectacular and then it might be noteworthy regardless.  This week we received a few who did tell us something about the responsible party. That being said, on with the party!\u0026#34;\n\n\u003c/p\u003e\u003cp\u003eAn anonymous contributor shared with us this \u0026#34;Important order info from Ubbad HBG-ICS I\u0026#34;,\nsaying \n\u0026#34;I checked on Amazon but can\u0026#39;t find order #{randnum(3)}-{randnum(6)}. This\nis worrisome though, because my credit card does end in\n**{randnum(4)}.\u0026#34; Wild, so does mine!\n\u003c/p\u003e\u003cblockquote\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003eI do like it when submissions include the creator of the wtf, unless the specific kind of err is really spectacular and then it might be noteworthy regardless.  This week we received a few who did tell us something about the responsible party. That being said, on with the party!\u0026#34;\n\n\u003c/p\u003e\u003cp\u003eAn anonymous contributor shared with us this \u0026#34;Important order info from Ubbad HBG-ICS I\u0026#34;,\nsaying \n\u0026#34;I checked on Amazon but can\u0026#39;t find order #{randnum(3)}-{randnum(6)}. This\nis worrisome though, because my credit card does end in\n**{randnum(4)}.\u0026#34; Wild, so does mine!\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#b374018305314c90bfa32978913fb772\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"b374018305314c90bfa32978913fb772\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/b374018305314c90bfa32978913fb772.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;With the right translation this could say anything\u0026#34; observed\n\u003cstrong\u003eB.J. H.\u003c/strong\u003e sagely.\n\u0026#34;I guess they haven\u0026#39;t translated to English yet. I especially\nlike this: [%EXTERNAL_TRANSLATION:New gender_aware email footer body 5 privacy policy\nBLUE%] Can\u0026#39;t they decide on capitalization and whether to use\nspaces or underscores?\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#b8c2d3d8930e40c2b28684b0dc1ddcdf\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"b8c2d3d8930e40c2b28684b0dc1ddcdf\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/b8c2d3d8930e40c2b28684b0dc1ddcdf.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;this could go in two directions\u0026#34; worried undercapitalized (but aren\u0026#39;t we all)\n\u003cstrong\u003eklinsten\u003c/strong\u003e. \n\u0026#34;well... it is a\nmail with my paycheck. but the label \u0026#39;promotions\u0026#39; got me\nworried. do i get a promotion (nice!!) or did they\napply a discount to my paycheck (less nice!!) i\u0026#39;m afraid\nto click it...\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#c552110e0b00487287e120b2923c85cc\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"c552110e0b00487287e120b2923c85cc\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/c552110e0b00487287e120b2923c85cc.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003eReader\n\u003cstrong\u003eValts S.\u003c/strong\u003e wondered\n\u0026#34;I\u0026#39;m not sure where I\u0026#39;m supposed to track my order,\nbut it feels like it\u0026#39;s been censored.\u0026#34;  Or merely forgotten?\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d545a4348d254012954465cc5b1f2e64\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d545a4348d254012954465cc5b1f2e64\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/d545a4348d254012954465cc5b1f2e64.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eRegular contributor \n\u003cstrong\u003eMichael R.\u003c/strong\u003e took a flier with this, hedging that it\u0026#39;s\n\u0026#34;Probably more a joke than a RWTF.\u0026#34;  But it\u0026#39;s a little funny, so this editor will allow it.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#e2da6ff401e04c11ba3a050d4367170f\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"e2da6ff401e04c11ba3a050d4367170f\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/e2da6ff401e04c11ba3a050d4367170f.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n","BodyAndAdHtml":"\u003cp\u003eI do like it when submissions include the creator of the wtf, unless the specific kind of err is really spectacular and then it might be noteworthy regardless.  This week we received a few who did tell us something about the responsible party. That being said, on with the party!\u0026#34;\n\n\u003c/p\u003e\u003cp\u003eAn anonymous contributor shared with us this \u0026#34;Important order info from Ubbad HBG-ICS I\u0026#34;,\nsaying \n\u0026#34;I checked on Amazon but can\u0026#39;t find order #{randnum(3)}-{randnum(6)}. This\nis worrisome though, because my credit card does end in\n**{randnum(4)}.\u0026#34; Wild, so does mine!\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#b374018305314c90bfa32978913fb772\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"b374018305314c90bfa32978913fb772\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/b374018305314c90bfa32978913fb772.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;With the right translation this could say anything\u0026#34; observed\n\u003cstrong\u003eB.J. H.\u003c/strong\u003e sagely.\n\u0026#34;I guess they haven\u0026#39;t translated to English yet. I especially\nlike this: [%EXTERNAL_TRANSLATION:New gender_aware email footer body 5 privacy policy\nBLUE%] Can\u0026#39;t they decide on capitalization and whether to use\nspaces or underscores?\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#b8c2d3d8930e40c2b28684b0dc1ddcdf\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"b8c2d3d8930e40c2b28684b0dc1ddcdf\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/b8c2d3d8930e40c2b28684b0dc1ddcdf.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003e\u0026#34;this could go in two directions\u0026#34; worried undercapitalized (but aren\u0026#39;t we all)\n\u003cstrong\u003eklinsten\u003c/strong\u003e. \n\u0026#34;well... it is a\nmail with my paycheck. but the label \u0026#39;promotions\u0026#39; got me\nworried. do i get a promotion (nice!!) or did they\napply a discount to my paycheck (less nice!!) i\u0026#39;m afraid\nto click it...\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#c552110e0b00487287e120b2923c85cc\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"c552110e0b00487287e120b2923c85cc\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/c552110e0b00487287e120b2923c85cc.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n\u003cp\u003eReader\n\u003cstrong\u003eValts S.\u003c/strong\u003e wondered\n\u0026#34;I\u0026#39;m not sure where I\u0026#39;m supposed to track my order,\nbut it feels like it\u0026#39;s been censored.\u0026#34;  Or merely forgotten?\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#d545a4348d254012954465cc5b1f2e64\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"d545a4348d254012954465cc5b1f2e64\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/d545a4348d254012954465cc5b1f2e64.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eRegular contributor \n\u003cstrong\u003eMichael R.\u003c/strong\u003e took a flier with this, hedging that it\u0026#39;s\n\u0026#34;Probably more a joke than a RWTF.\u0026#34;  But it\u0026#39;s a little funny, so this editor will allow it.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#e2da6ff401e04c11ba3a050d4367170f\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"e2da6ff401e04c11ba3a050d4367170f\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/10/29/e2da6ff401e04c11ba3a050d4367170f.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":"Named And ","RssTitle":"Error\u0027d: Named And ","CachedCommentCount":15,"LastCommentDate":"\/Date(1793703153820)\/","LastCommentDateDescription":"2026-11-03","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793341800000)\/","ISODate":"2026-10-30","DisplayDate":"2026-10-30","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/named-and","CommentsUrl":"https://thedailywtf.com/articles/comments/named-and","Slug":"named-and","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fnamed-and+-+Named+And++-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fnamed-and\u0026t=Named+And++-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Named%20And%20:%20https://thedailywtf.com/articles/named-and","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fnamed-and","PreviousArticleId":11306,"PreviousArticleTitle":"Oh, K?","PreviousArticleSlug":"oh-k","PreviousArticleUrl":"//thedailywtf.com/articles/oh-k","NextArticleId":11308,"NextArticleTitle":"Get It Now","NextArticleSlug":"get-it-now","NextArticleUrl":"//thedailywtf.com/articles/get-it-now"},{"Id":11306,"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\u003ePierre\u003c/strong\u003e found this cry for help:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-c\"\u003e \u003cspan class=\"hljs-keyword\"\u003efor\u003c/span\u003e (j = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e; j \u0026lt; DISTRICT_CARDINALITY; j++) {\n    \u003cspan class=\"hljs-comment\"\u003e/*\n    * A poor way to work around some sort of memory\n    * violation.  k gets clobbered, so I buffer l with it.\n    * Help?\n    */\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003efor\u003c/span\u003e (k = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e, l = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e; k \u0026lt; customers; k++, l++) {\n            \u003cspan class=\"hljs-comment\"\u003e/* c_id */\u003c/span\u003e\n            FPRINTF(output, \u003cspan class=\"hljs-string\"\u003e\u0026#34;%d\u0026#34;\u003c/span\u003e, l + \u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e);\n            METAPRINTF((output, \u003cspan class=\"hljs-string\"\u003e\u0026#34;%c\u0026#34;\u003c/span\u003e, delimiter));\n\u003c/code\u003e\u003c/pre\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003ePierre\u003c/strong\u003e found this cry for help:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-c\"\u003e \u003cspan class=\"hljs-keyword\"\u003efor\u003c/span\u003e (j = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e; j \u0026lt; DISTRICT_CARDINALITY; j++) {\n    \u003cspan class=\"hljs-comment\"\u003e/*\n    * A poor way to work around some sort of memory\n    * violation.  k gets clobbered, so I buffer l with it.\n    * Help?\n    */\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003efor\u003c/span\u003e (k = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e, l = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e; k \u0026lt; customers; k++, l++) {\n            \u003cspan class=\"hljs-comment\"\u003e/* c_id */\u003c/span\u003e\n            FPRINTF(output, \u003cspan class=\"hljs-string\"\u003e\u0026#34;%d\u0026#34;\u003c/span\u003e, l + \u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e);\n            METAPRINTF((output, \u003cspan class=\"hljs-string\"\u003e\u0026#34;%c\u0026#34;\u003c/span\u003e, delimiter));\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eHonestly, I\u0026#39;m always a little worried in C-like languages when the loop variable isn\u0026#39;t scoped to the loop and declared in place. Always concerning, so when there\u0026#39;s concerns with clobbering, I\u0026#39;m not surprised.\u003c/p\u003e\n\u003cp\u003eThis iterates across a set of \u0026#34;districts\u0026#34;, and then iterates across a list of customers. Standard output functions are replaced with macros, and honestly, I don\u0026#39;t know that I want to know what happens in \u003ccode\u003eMETAPRINTF\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eBut fine, this iterates across a bunch of stuff and generates output. It\u0026#39;s the comment that we\u0026#39;re really curious about. \u0026#34;Some sort of memory violation\u0026#34;, so we duplicate our loop variable. What on earth could be happening here?\u003c/p\u003e\n\u003cp\u003eWell, Pierre found the \u0026#34;memory violation\u0026#34;, which is probably what you expected:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-c\"\u003ek = \u003cspan class=\"hljs-built_in\"\u003estrlen\u003c/span\u003e(someOutputString) - \u003cspan class=\"hljs-number\"\u003e8\u003c/span\u003e;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ccode\u003ek\u003c/code\u003e is used elsewhere in the loop as a variable. That\u0026#39;s not a memory violation, that\u0026#39;s just how variables work.\u003c/p\u003e\n\u003cp\u003eThis leaves us with one possible conclusion: the developer who wrote the comment couldn\u0026#39;t find this bug. And given the weird use of macros here, I\u0026#39;m going to go out on a limb and guess that it\u0026#39;s not the developer\u0026#39;s fault; I strongly suspect the loop is so long, so complicated, and so obfuscated that very few developers could find that.\u003c/p\u003e\n\u003cp\u003eMy earlier complaint about scoping the variable to the loop wouldn\u0026#39;t fix this, which I guess is on me. They still should really scope the variable to the loop.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Don\u0027t get me started on languages that do variable hoisting and lift variables to the top of the function no matter where you declare them. --\u003e\n\u003cstyle\u003e.comment { border: none; }\u003c/style\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003ePierre\u003c/strong\u003e found this cry for help:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-c\"\u003e \u003cspan class=\"hljs-keyword\"\u003efor\u003c/span\u003e (j = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e; j \u0026lt; DISTRICT_CARDINALITY; j++) {\n    \u003cspan class=\"hljs-comment\"\u003e/*\n    * A poor way to work around some sort of memory\n    * violation.  k gets clobbered, so I buffer l with it.\n    * Help?\n    */\u003c/span\u003e\n    \u003cspan class=\"hljs-keyword\"\u003efor\u003c/span\u003e (k = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e, l = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e; k \u0026lt; customers; k++, l++) {\n            \u003cspan class=\"hljs-comment\"\u003e/* c_id */\u003c/span\u003e\n            FPRINTF(output, \u003cspan class=\"hljs-string\"\u003e\u0026#34;%d\u0026#34;\u003c/span\u003e, l + \u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e);\n            METAPRINTF((output, \u003cspan class=\"hljs-string\"\u003e\u0026#34;%c\u0026#34;\u003c/span\u003e, delimiter));\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eHonestly, I\u0026#39;m always a little worried in C-like languages when the loop variable isn\u0026#39;t scoped to the loop and declared in place. Always concerning, so when there\u0026#39;s concerns with clobbering, I\u0026#39;m not surprised.\u003c/p\u003e\n\u003cp\u003eThis iterates across a set of \u0026#34;districts\u0026#34;, and then iterates across a list of customers. Standard output functions are replaced with macros, and honestly, I don\u0026#39;t know that I want to know what happens in \u003ccode\u003eMETAPRINTF\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eBut fine, this iterates across a bunch of stuff and generates output. It\u0026#39;s the comment that we\u0026#39;re really curious about. \u0026#34;Some sort of memory violation\u0026#34;, so we duplicate our loop variable. What on earth could be happening here?\u003c/p\u003e\n\u003cp\u003eWell, Pierre found the \u0026#34;memory violation\u0026#34;, which is probably what you expected:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-c\"\u003ek = \u003cspan class=\"hljs-built_in\"\u003estrlen\u003c/span\u003e(someOutputString) - \u003cspan class=\"hljs-number\"\u003e8\u003c/span\u003e;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ccode\u003ek\u003c/code\u003e is used elsewhere in the loop as a variable. That\u0026#39;s not a memory violation, that\u0026#39;s just how variables work.\u003c/p\u003e\n\u003cp\u003eThis leaves us with one possible conclusion: the developer who wrote the comment couldn\u0026#39;t find this bug. And given the weird use of macros here, I\u0026#39;m going to go out on a limb and guess that it\u0026#39;s not the developer\u0026#39;s fault; I strongly suspect the loop is so long, so complicated, and so obfuscated that very few developers could find that.\u003c/p\u003e\n\u003cp\u003eMy earlier complaint about scoping the variable to the loop wouldn\u0026#39;t fix this, which I guess is on me. They still should really scope the variable to the loop.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Don\u0027t get me started on languages that do variable hoisting and lift variables to the top of the function no matter where you declare them. --\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":"Oh, K?","RssTitle":"CodeSOD: Oh, K?","CachedCommentCount":25,"LastCommentDate":"\/Date(1793851919227)\/","LastCommentDateDescription":"2026-11-05","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793255400000)\/","ISODate":"2026-10-29","DisplayDate":"2026-10-29","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/oh-k","CommentsUrl":"https://thedailywtf.com/articles/comments/oh-k","Slug":"oh-k","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2foh-k+-+Oh%2c+K%3f+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2foh-k\u0026t=Oh%2c+K%3f+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Oh,%20K?: https://thedailywtf.com/articles/oh-k","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2foh-k","PreviousArticleId":11305,"PreviousArticleTitle":"Session Recording","PreviousArticleSlug":"session-recording","PreviousArticleUrl":"//thedailywtf.com/articles/session-recording","NextArticleId":11307,"NextArticleTitle":"Named And ","NextArticleSlug":"named-and","NextArticleUrl":"//thedailywtf.com/articles/named-and"},{"Id":11305,"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 still get a fair bit of old school ASP .Net webforms code, which was cutting edge about twenty years ago, but remains a collection of bad choices that tried to make web programming feel like desktop programming. As an aside, what a reversed world we live in today, where everyone uses Electron and our desktop programming feels like web programming.\u003c/p\u003e\n\u003cp\u003eIn any case, \u003cstrong\u003eThomas\u003c/strong\u003e sends us some pretty ugly webforms code.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003eWe still get a fair bit of old school ASP .Net webforms code, which was cutting edge about twenty years ago, but remains a collection of bad choices that tried to make web programming feel like desktop programming. As an aside, what a reversed world we live in today, where everyone uses Electron and our desktop programming feels like web programming.\u003c/p\u003e\n\u003cp\u003eIn any case, \u003cstrong\u003eThomas\u003c/strong\u003e sends us some pretty ugly webforms code.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Albumid\u0026#34;\u003c/span\u003e) = CType(e.Item.FindControl(\u003cspan class=\"hljs-string\"\u003e\u0026#34;lblAlbumID\u0026#34;\u003c/span\u003e), Label).Text\n\u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eNot\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Albumid\u0026#34;\u003c/span\u003e) \u003cspan class=\"hljs-keyword\"\u003eIs\u003c/span\u003e \u003cspan class=\"hljs-literal\"\u003eNothing\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eAnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eNot\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Uid\u0026#34;\u003c/span\u003e) \u003cspan class=\"hljs-keyword\"\u003eIs\u003c/span\u003e \u003cspan class=\"hljs-literal\"\u003eNothing\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n\n    \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.strDelSQL = \u003cspan class=\"hljs-string\"\u003e\u0026#34;Delete from tbl_Albumshare_Mast where Album_Id=\u0026#34;\u003c/span\u003e \u0026amp; \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Albumid\u0026#34;\u003c/span\u003e) \u0026amp; \u003cspan class=\"hljs-string\"\u003e\u0026#34; and Sharer_ID=\u0026#34;\u003c/span\u003e \u0026amp; \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Uid\u0026#34;\u003c/span\u003e)\n    \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.objDB.ExecQry(\u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.strDelSQL)\n    \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.\u003cspan class=\"hljs-built_in\"\u003eResponse\u003c/span\u003e.Redirect(\u003cspan class=\"hljs-string\"\u003e\u0026#34;frmmyalbumshare.aspx\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003eFalse\u003c/span\u003e)\n\n\u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBroadly, the goal of this code is to take an album ID from the user and delete an album from the database where the ID matches and the album is owned by this user. And everything is horrible here.\u003c/p\u003e\n\u003cp\u003eFirst, the use of \u003ccode\u003ee.Item.FindControl\u003c/code\u003e to look up the input field is suspicious. That\u0026#39;s usually what you do when you\u0026#39;ve dynamically generated controls, but I don\u0026#39;t think that\u0026#39;s happening here. Because we use \u003ccode\u003eFindControl\u003c/code\u003e we have to cast it to \u003ccode\u003eLabel\u003c/code\u003e, and only then can we get the text property. That itself raises a question, because \u003cem\u003ewhy are user inputs getting stored in a label?\u003c/em\u003e. That\u0026#39;s not what labels are for. They\u0026#39;re clearly doing some sort of hacky lookup/autocomplete field thing and using the label to actually store the input, but presenting the user with a different UI for picking it. Not an uncommon pattern in those days, but a hidden field would be a more typical way of doing it.\u003c/p\u003e\n\u003cp\u003eWe then construct a SQL injection vulnerability and run it against the database.\u003c/p\u003e\n\u003cp\u003eThen, we use a redirect to send the user to a different page. Again, a common thing to do back then, but a thing I hate: using HTTP 300 codes to redirect users as a form of navigation is awkward and weird.\u003c/p\u003e\n\u003cp\u003eOf course, none of that is precisely the WTF here. The real WTF is the developer apparently \u003cem\u003ehates\u003c/em\u003e local variables. \u003ccode\u003estrDelSQL\u003c/code\u003e is a member variable- why do we need to store this in a class member? Especially because in the page lifecycle, we handle one request and then die; either this is unnecessary, or far, far worse, some other code is looking at this SQL query later. But far worse than a badly scoped variable is the overuse of session variables.\u003c/p\u003e\n\u003cp\u003eThomas sends us this block as a representation, but the developer responsible just stored \u003cem\u003eeverything\u003c/em\u003e they could in a session variable. While in this example, \u0026#34;Uid\u0026#34; probably makes sense, \u0026#34;Albumid\u0026#34; definitely doesn\u0026#39;t. And in other cases, basically every user form input gets stored in a session variable, and even worse: \u003cem\u003ethey\u0026#39;re often used as loop variables\u003c/em\u003e. \u003ccode\u003ewhile Session(\u0026#34;myloop\u0026#34;) \u0026lt; 5\u003c/code\u003e type stuff.\u003c/p\u003e\n\u003cp\u003eAnd finally, we already know I hate hungarian notation, but here we have a client side form holdover that pollutes the user experience: the URL they get redirected to has a hungarian \u003ccode\u003efrm\u003c/code\u003e prefix. It\u0026#39;s bad enough that you\u0026#39;re using hungarian notation, but don\u0026#39;t show that to your users! They really don\u0026#39;t need to see everything.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Webforms were a mistake, but an *interesting* mistake, and a weird historical time capsule. --\u003e","BodyAndAdHtml":"\u003cp\u003eWe still get a fair bit of old school ASP .Net webforms code, which was cutting edge about twenty years ago, but remains a collection of bad choices that tried to make web programming feel like desktop programming. As an aside, what a reversed world we live in today, where everyone uses Electron and our desktop programming feels like web programming.\u003c/p\u003e\n\u003cp\u003eIn any case, \u003cstrong\u003eThomas\u003c/strong\u003e sends us some pretty ugly webforms code.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Albumid\u0026#34;\u003c/span\u003e) = CType(e.Item.FindControl(\u003cspan class=\"hljs-string\"\u003e\u0026#34;lblAlbumID\u0026#34;\u003c/span\u003e), Label).Text\n\u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eNot\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Albumid\u0026#34;\u003c/span\u003e) \u003cspan class=\"hljs-keyword\"\u003eIs\u003c/span\u003e \u003cspan class=\"hljs-literal\"\u003eNothing\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eAnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eNot\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Uid\u0026#34;\u003c/span\u003e) \u003cspan class=\"hljs-keyword\"\u003eIs\u003c/span\u003e \u003cspan class=\"hljs-literal\"\u003eNothing\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n\n    \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.strDelSQL = \u003cspan class=\"hljs-string\"\u003e\u0026#34;Delete from tbl_Albumshare_Mast where Album_Id=\u0026#34;\u003c/span\u003e \u0026amp; \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Albumid\u0026#34;\u003c/span\u003e) \u0026amp; \u003cspan class=\"hljs-string\"\u003e\u0026#34; and Sharer_ID=\u0026#34;\u003c/span\u003e \u0026amp; \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.Session(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Uid\u0026#34;\u003c/span\u003e)\n    \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.objDB.ExecQry(\u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.strDelSQL)\n    \u003cspan class=\"hljs-keyword\"\u003eMe\u003c/span\u003e.\u003cspan class=\"hljs-built_in\"\u003eResponse\u003c/span\u003e.Redirect(\u003cspan class=\"hljs-string\"\u003e\u0026#34;frmmyalbumshare.aspx\u0026#34;\u003c/span\u003e, \u003cspan class=\"hljs-literal\"\u003eFalse\u003c/span\u003e)\n\n\u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBroadly, the goal of this code is to take an album ID from the user and delete an album from the database where the ID matches and the album is owned by this user. And everything is horrible here.\u003c/p\u003e\n\u003cp\u003eFirst, the use of \u003ccode\u003ee.Item.FindControl\u003c/code\u003e to look up the input field is suspicious. That\u0026#39;s usually what you do when you\u0026#39;ve dynamically generated controls, but I don\u0026#39;t think that\u0026#39;s happening here. Because we use \u003ccode\u003eFindControl\u003c/code\u003e we have to cast it to \u003ccode\u003eLabel\u003c/code\u003e, and only then can we get the text property. That itself raises a question, because \u003cem\u003ewhy are user inputs getting stored in a label?\u003c/em\u003e. That\u0026#39;s not what labels are for. They\u0026#39;re clearly doing some sort of hacky lookup/autocomplete field thing and using the label to actually store the input, but presenting the user with a different UI for picking it. Not an uncommon pattern in those days, but a hidden field would be a more typical way of doing it.\u003c/p\u003e\n\u003cp\u003eWe then construct a SQL injection vulnerability and run it against the database.\u003c/p\u003e\n\u003cp\u003eThen, we use a redirect to send the user to a different page. Again, a common thing to do back then, but a thing I hate: using HTTP 300 codes to redirect users as a form of navigation is awkward and weird.\u003c/p\u003e\n\u003cp\u003eOf course, none of that is precisely the WTF here. The real WTF is the developer apparently \u003cem\u003ehates\u003c/em\u003e local variables. \u003ccode\u003estrDelSQL\u003c/code\u003e is a member variable- why do we need to store this in a class member? Especially because in the page lifecycle, we handle one request and then die; either this is unnecessary, or far, far worse, some other code is looking at this SQL query later. But far worse than a badly scoped variable is the overuse of session variables.\u003c/p\u003e\n\u003cp\u003eThomas sends us this block as a representation, but the developer responsible just stored \u003cem\u003eeverything\u003c/em\u003e they could in a session variable. While in this example, \u0026#34;Uid\u0026#34; probably makes sense, \u0026#34;Albumid\u0026#34; definitely doesn\u0026#39;t. And in other cases, basically every user form input gets stored in a session variable, and even worse: \u003cem\u003ethey\u0026#39;re often used as loop variables\u003c/em\u003e. \u003ccode\u003ewhile Session(\u0026#34;myloop\u0026#34;) \u0026lt; 5\u003c/code\u003e type stuff.\u003c/p\u003e\n\u003cp\u003eAnd finally, we already know I hate hungarian notation, but here we have a client side form holdover that pollutes the user experience: the URL they get redirected to has a hungarian \u003ccode\u003efrm\u003c/code\u003e prefix. It\u0026#39;s bad enough that you\u0026#39;re using hungarian notation, but don\u0026#39;t show that to your users! They really don\u0026#39;t need to see everything.\u003c/p\u003e\n\u003c!-- Easy Reader Version: Webforms were a mistake, but an *interesting* mistake, and a weird historical time capsule. --\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 the plebs out of prod. Restrict NuGet feed privileges with ProGet. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=PlebsFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Session Recording","RssTitle":"CodeSOD: Session Recording","CachedCommentCount":23,"LastCommentDate":"\/Date(1793590720433)\/","LastCommentDateDescription":"2026-11-02","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1793169000000)\/","ISODate":"2026-10-28","DisplayDate":"2026-10-28","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 the plebs out of prod. Restrict NuGet feed privileges with ProGet. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=PlebsFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Url":"https://thedailywtf.com/articles/session-recording","CommentsUrl":"https://thedailywtf.com/articles/comments/session-recording","Slug":"session-recording","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fsession-recording+-+Session+Recording+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fsession-recording\u0026t=Session+Recording+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Session%20Recording:%20https://thedailywtf.com/articles/session-recording","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fsession-recording","PreviousArticleId":11304,"PreviousArticleTitle":"Security Fourth","PreviousArticleSlug":"security-fourth","PreviousArticleUrl":"//thedailywtf.com/articles/security-fourth","NextArticleId":11306,"NextArticleTitle":"Oh, K?","NextArticleSlug":"oh-k","NextArticleUrl":"//thedailywtf.com/articles/oh-k"}]