[{"Id":11165,"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;Here, you\u0026#39;re a programmer, take this over. It\u0026#39;s business critical.\u0026#34;\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s what \u003cstrong\u003eFelicity\u003c/strong\u003e\u0026#39;s boss told her when he pointed her to a network drive containing an Excel spreadsheet. The Excel spreadsheet contained a pile of macros. The person who wrote it had left, and nobody knew how to make it work, but the macros in question were absolutely business vital.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u0026#34;Here, you\u0026#39;re a programmer, take this over. It\u0026#39;s business critical.\u0026#34;\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s what \u003cstrong\u003eFelicity\u003c/strong\u003e\u0026#39;s boss told her when he pointed her to a network drive containing an Excel spreadsheet. The Excel spreadsheet contained a pile of macros. The person who wrote it had left, and nobody knew how to make it work, but the macros in question were absolutely business vital.\u003c/p\u003e\n\u003cp\u003eAlso, it\u0026#39;s in French.\u003c/p\u003e\n\u003cp\u003eWe\u0026#39;ll take this one in chunks. The indentation is as in the original.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-keyword\"\u003ePublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eSub\u003c/span\u003e ExporToutVersBaseDonnées(ClasseurEnCours As Workbook)\n\u003cspan class=\"hljs-keyword\"\u003eCall\u003c/span\u003e AffectionVariables(ToutesLesCellulesNommées)\n\u003cspan class=\"hljs-keyword\"\u003eCall\u003c/span\u003e AffectationBaseDonnées(BaseDonnées)\nBaseDonnées.Activate\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe procedures \u003ccode\u003eAffectionVariables\u003c/code\u003e and \u003ccode\u003eAffectationBaseDonnées\u003c/code\u003e populate a pile of global variables. \u0026#34;base de données\u0026#34; is French for database, but don\u0026#39;t let the name fool you- anything referencing \u0026#34;base de données\u0026#34; is referencing another Excel file located on a shared server. There are, in total, four Excel files that must live on a shared server, and two more which must be in a hard-coded path on the user\u0026#39;s computer.\u003c/p\u003e\n\u003cp\u003eOh, and the shared server is referenced not by a hostname, but by IP address- which is why the macros were breaking on everyone\u0026#39;s computer; the IP address changed.\u003c/p\u003e\n\u003cp\u003eLet\u0026#39;s continue.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Vérifier si la ligne existe déjà.\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e ClasseurEnCours.Sheets(\u003cspan class=\"hljs-string\"\u003e\u0026#34;DATA\u0026#34;\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Num_Fichier\u0026#34;\u003c/span\u003e) = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n        Num_Fichier = BaseDonnées.Sheets(\u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Dernier_Fichier\u0026#34;\u003c/span\u003e).Value + \u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e\nInsérer_Ligne: \u003cspan class=\"hljs-comment\"\u003e\u0026#39;(étiquette Goto) insérer une ligne\u003c/span\u003e\n    Application.\u003cspan class=\"hljs-keyword\"\u003eGoTo\u003c/span\u003e Reference:=\u003cspan class=\"hljs-string\"\u003e\u0026#34;Dernière_Ligne\u0026#34;\u003c/span\u003e\n            Selection.EntireRow.Insert\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Copie les cellules (colonne A à colonne FI) de la ligne au-dessus de la ligne insérée.\u003c/span\u003e\n            \u003cspan class=\"hljs-keyword\"\u003eWith\u003c/span\u003e ActiveCell\n                    .Offset(\u003cspan class=\"hljs-number\"\u003e-1\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:FM1\u0026#34;\u003c/span\u003e).Copy\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Colle le format de la cellule précédemment copiée à la cellule active puis libère les données du presse papier\u003c/span\u003e\n                    .PasteSpecial\n                    .Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:FM1\u0026#34;\u003c/span\u003e).Value = \u003cspan class=\"hljs-string\"\u003e\u0026#34;\u0026#34;\u003c/span\u003e\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Se repositionne au début de la ligne insérée.\u003c/span\u003e\n                    .Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1\u0026#34;\u003c/span\u003e).\u003cspan class=\"hljs-keyword\"\u003eSelect\u003c/span\u003e\n            \u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eWith\u003c/span\u003e\n            Application.CutCopyMode = \u003cspan class=\"hljs-literal\"\u003eFalse\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eUh oh, \u003ccode\u003eInsérer_Ligne\u003c/code\u003e is a label for a \u003ccode\u003eGoto\u003c/code\u003e target. Not to be confused by the \u003ccode\u003eApplication.GoTo\u003c/code\u003e call on the next line- that just selects a range in the spreadsheet.\u003c/p\u003e\n\u003cp\u003eAfter that little landmine, we copy/paste some data around in the sheet.\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s the \u003ccode\u003eIf\u003c/code\u003e side of the conditional, let\u0026#39;s look at the \u003ccode\u003eelse\u003c/code\u003e clause:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e        \u003cspan class=\"hljs-keyword\"\u003eElse\u003c/span\u003e\nCherche_Numéro_Fichier: \u003cspan class=\"hljs-comment\"\u003e\u0026#39; Chercher la ligne ou le numéro de fichier est égale à NumFichier.\u003c/span\u003e\n                        \u003cspan class=\"hljs-keyword\"\u003eWhile\u003c/span\u003e ActiveCell.Value \u0026lt;\u0026gt; Num_Fichier\n                \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e ActiveCell.Row = Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Etiquettes\u0026#34;\u003c/span\u003e).Row \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n                    \u003cspan class=\"hljs-keyword\"\u003eGoTo\u003c/span\u003e Insérer_Ligne\n                \u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e\n                ActiveCell.Offset(\u003cspan class=\"hljs-number\"\u003e-1\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;a1:a1\u0026#34;\u003c/span\u003e).\u003cspan class=\"hljs-keyword\"\u003eSelect\u003c/span\u003e\n            \u003cspan class=\"hljs-keyword\"\u003eWend\u003c/span\u003e\n            \u003cspan class=\"hljs-comment\"\u003e\u0026#39;Vérifier le numéro d\u0026#39;indice de la ligne active.\u003c/span\u003e\n                \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e Cells(ActiveCell.Row, \u003cspan class=\"hljs-number\"\u003e165\u003c/span\u003e).Value \u0026lt;\u0026gt; ClasseurEnCours.Sheets(\u003cspan class=\"hljs-string\"\u003e\u0026#34;DATA\u0026#34;\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Dernier_Indice\u0026#34;\u003c/span\u003e) \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n                    ActiveCell.Offset(\u003cspan class=\"hljs-number\"\u003e-1\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:A1\u0026#34;\u003c/span\u003e).\u003cspan class=\"hljs-keyword\"\u003eSelect\u003c/span\u003e\n                    \u003cspan class=\"hljs-keyword\"\u003eGoTo\u003c/span\u003e Cherche_Numéro_Fichier\n                \u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e\n            ActiveCell.Offset(\u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:FM1\u0026#34;\u003c/span\u003e).Value = \u003cspan class=\"hljs-string\"\u003e\u0026#34;\u0026#34;\u003c/span\u003e\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\u003eWe start with another label, and… then we have a \u003ccode\u003eGoto\u003c/code\u003e. A \u003ccode\u003eGoto\u003c/code\u003e which jumps us back into the \u003ccode\u003eIf\u003c/code\u003e side of the conditional. A \u003ccode\u003eGoto\u003c/code\u003e inside of a while loop, a while loop that\u0026#39;s marching around the spreadsheet to search for certain values in the cell.\u003c/p\u003e\n\u003cp\u003eAfter the loop, we have \u003cem\u003eanother\u003c/em\u003e \u003ccode\u003eGoto\u003c/code\u003e which will possibly jump us up to the start of the \u003ccode\u003eelse\u003c/code\u003e block.\u003c/p\u003e\n\u003cp\u003eThe procedure ends with some cleanup:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-comment\"\u003e\u0026#39;----- \u003c/span\u003e\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39; Do some stuff on the active cell and the following cells on the column\u003c/span\u003e\n.-----\nBaseDonnées.Close \u003cspan class=\"hljs-literal\"\u003eTrue\u003c/span\u003e\n\u003cspan class=\"hljs-keyword\"\u003eSet\u003c/span\u003e BaseDonnées = \u003cspan class=\"hljs-literal\"\u003eNothing\u003c/span\u003e\n\u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eSub\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eI do not know what this function does, and the fact that the code is largely in a language I don\u0026#39;t speak isn\u0026#39;t the obstacle. I have no idea what the loops and the gotos are trying to do. I\u0026#39;m not even a \u0026#34;never use \u003ccode\u003eGoto\u003c/code\u003e ever ever ever\u0026#34; person; in a language like VBA, it\u0026#39;s sometimes the best way to handle errors. But this bizarre time-traveling flow control boggles me.\u003c/p\u003e\n\u003cp\u003e\u0026#34;Etiquettes\u0026#34; is French for \u0026#34;labels\u0026#34;, and it may be bad etiquette but I\u0026#39;ve got some four letter labels for this code.\u003c/p\u003e\n\u003c!-- Easy Reader Version: GOTO considered harmful? Yeah, to my *sanity* --\u003e","BodyAndAdHtml":"\u003cp\u003e\u0026#34;Here, you\u0026#39;re a programmer, take this over. It\u0026#39;s business critical.\u0026#34;\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s what \u003cstrong\u003eFelicity\u003c/strong\u003e\u0026#39;s boss told her when he pointed her to a network drive containing an Excel spreadsheet. The Excel spreadsheet contained a pile of macros. The person who wrote it had left, and nobody knew how to make it work, but the macros in question were absolutely business vital.\u003c/p\u003e\n\u003cp\u003eAlso, it\u0026#39;s in French.\u003c/p\u003e\n\u003cp\u003eWe\u0026#39;ll take this one in chunks. The indentation is as in the original.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-keyword\"\u003ePublic\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eSub\u003c/span\u003e ExporToutVersBaseDonnées(ClasseurEnCours As Workbook)\n\u003cspan class=\"hljs-keyword\"\u003eCall\u003c/span\u003e AffectionVariables(ToutesLesCellulesNommées)\n\u003cspan class=\"hljs-keyword\"\u003eCall\u003c/span\u003e AffectationBaseDonnées(BaseDonnées)\nBaseDonnées.Activate\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe procedures \u003ccode\u003eAffectionVariables\u003c/code\u003e and \u003ccode\u003eAffectationBaseDonnées\u003c/code\u003e populate a pile of global variables. \u0026#34;base de données\u0026#34; is French for database, but don\u0026#39;t let the name fool you- anything referencing \u0026#34;base de données\u0026#34; is referencing another Excel file located on a shared server. There are, in total, four Excel files that must live on a shared server, and two more which must be in a hard-coded path on the user\u0026#39;s computer.\u003c/p\u003e\n\u003cp\u003eOh, and the shared server is referenced not by a hostname, but by IP address- which is why the macros were breaking on everyone\u0026#39;s computer; the IP address changed.\u003c/p\u003e\n\u003cp\u003eLet\u0026#39;s continue.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Vérifier si la ligne existe déjà.\u003c/span\u003e\n        \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e ClasseurEnCours.Sheets(\u003cspan class=\"hljs-string\"\u003e\u0026#34;DATA\u0026#34;\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Num_Fichier\u0026#34;\u003c/span\u003e) = \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n        Num_Fichier = BaseDonnées.Sheets(\u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Dernier_Fichier\u0026#34;\u003c/span\u003e).Value + \u003cspan class=\"hljs-number\"\u003e1\u003c/span\u003e\nInsérer_Ligne: \u003cspan class=\"hljs-comment\"\u003e\u0026#39;(étiquette Goto) insérer une ligne\u003c/span\u003e\n    Application.\u003cspan class=\"hljs-keyword\"\u003eGoTo\u003c/span\u003e Reference:=\u003cspan class=\"hljs-string\"\u003e\u0026#34;Dernière_Ligne\u0026#34;\u003c/span\u003e\n            Selection.EntireRow.Insert\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Copie les cellules (colonne A à colonne FI) de la ligne au-dessus de la ligne insérée.\u003c/span\u003e\n            \u003cspan class=\"hljs-keyword\"\u003eWith\u003c/span\u003e ActiveCell\n                    .Offset(\u003cspan class=\"hljs-number\"\u003e-1\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:FM1\u0026#34;\u003c/span\u003e).Copy\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Colle le format de la cellule précédemment copiée à la cellule active puis libère les données du presse papier\u003c/span\u003e\n                    .PasteSpecial\n                    .Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:FM1\u0026#34;\u003c/span\u003e).Value = \u003cspan class=\"hljs-string\"\u003e\u0026#34;\u0026#34;\u003c/span\u003e\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39;Se repositionne au début de la ligne insérée.\u003c/span\u003e\n                    .Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1\u0026#34;\u003c/span\u003e).\u003cspan class=\"hljs-keyword\"\u003eSelect\u003c/span\u003e\n            \u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eWith\u003c/span\u003e\n            Application.CutCopyMode = \u003cspan class=\"hljs-literal\"\u003eFalse\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eUh oh, \u003ccode\u003eInsérer_Ligne\u003c/code\u003e is a label for a \u003ccode\u003eGoto\u003c/code\u003e target. Not to be confused by the \u003ccode\u003eApplication.GoTo\u003c/code\u003e call on the next line- that just selects a range in the spreadsheet.\u003c/p\u003e\n\u003cp\u003eAfter that little landmine, we copy/paste some data around in the sheet.\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s the \u003ccode\u003eIf\u003c/code\u003e side of the conditional, let\u0026#39;s look at the \u003ccode\u003eelse\u003c/code\u003e clause:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e        \u003cspan class=\"hljs-keyword\"\u003eElse\u003c/span\u003e\nCherche_Numéro_Fichier: \u003cspan class=\"hljs-comment\"\u003e\u0026#39; Chercher la ligne ou le numéro de fichier est égale à NumFichier.\u003c/span\u003e\n                        \u003cspan class=\"hljs-keyword\"\u003eWhile\u003c/span\u003e ActiveCell.Value \u0026lt;\u0026gt; Num_Fichier\n                \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e ActiveCell.Row = Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Etiquettes\u0026#34;\u003c/span\u003e).Row \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n                    \u003cspan class=\"hljs-keyword\"\u003eGoTo\u003c/span\u003e Insérer_Ligne\n                \u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e\n                ActiveCell.Offset(\u003cspan class=\"hljs-number\"\u003e-1\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;a1:a1\u0026#34;\u003c/span\u003e).\u003cspan class=\"hljs-keyword\"\u003eSelect\u003c/span\u003e\n            \u003cspan class=\"hljs-keyword\"\u003eWend\u003c/span\u003e\n            \u003cspan class=\"hljs-comment\"\u003e\u0026#39;Vérifier le numéro d\u0026#39;indice de la ligne active.\u003c/span\u003e\n                \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e Cells(ActiveCell.Row, \u003cspan class=\"hljs-number\"\u003e165\u003c/span\u003e).Value \u0026lt;\u0026gt; ClasseurEnCours.Sheets(\u003cspan class=\"hljs-string\"\u003e\u0026#34;DATA\u0026#34;\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;Dernier_Indice\u0026#34;\u003c/span\u003e) \u003cspan class=\"hljs-keyword\"\u003eThen\u003c/span\u003e\n                    ActiveCell.Offset(\u003cspan class=\"hljs-number\"\u003e-1\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:A1\u0026#34;\u003c/span\u003e).\u003cspan class=\"hljs-keyword\"\u003eSelect\u003c/span\u003e\n                    \u003cspan class=\"hljs-keyword\"\u003eGoTo\u003c/span\u003e Cherche_Numéro_Fichier\n                \u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eIf\u003c/span\u003e\n            ActiveCell.Offset(\u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e, \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e).Range(\u003cspan class=\"hljs-string\"\u003e\u0026#34;A1:FM1\u0026#34;\u003c/span\u003e).Value = \u003cspan class=\"hljs-string\"\u003e\u0026#34;\u0026#34;\u003c/span\u003e\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\u003eWe start with another label, and… then we have a \u003ccode\u003eGoto\u003c/code\u003e. A \u003ccode\u003eGoto\u003c/code\u003e which jumps us back into the \u003ccode\u003eIf\u003c/code\u003e side of the conditional. A \u003ccode\u003eGoto\u003c/code\u003e inside of a while loop, a while loop that\u0026#39;s marching around the spreadsheet to search for certain values in the cell.\u003c/p\u003e\n\u003cp\u003eAfter the loop, we have \u003cem\u003eanother\u003c/em\u003e \u003ccode\u003eGoto\u003c/code\u003e which will possibly jump us up to the start of the \u003ccode\u003eelse\u003c/code\u003e block.\u003c/p\u003e\n\u003cp\u003eThe procedure ends with some cleanup:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-vbscript\"\u003e\u003cspan class=\"hljs-comment\"\u003e\u0026#39;----- \u003c/span\u003e\n\u003cspan class=\"hljs-comment\"\u003e\u0026#39; Do some stuff on the active cell and the following cells on the column\u003c/span\u003e\n.-----\nBaseDonnées.Close \u003cspan class=\"hljs-literal\"\u003eTrue\u003c/span\u003e\n\u003cspan class=\"hljs-keyword\"\u003eSet\u003c/span\u003e BaseDonnées = \u003cspan class=\"hljs-literal\"\u003eNothing\u003c/span\u003e\n\u003cspan class=\"hljs-keyword\"\u003eEnd\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003eSub\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eI do not know what this function does, and the fact that the code is largely in a language I don\u0026#39;t speak isn\u0026#39;t the obstacle. I have no idea what the loops and the gotos are trying to do. I\u0026#39;m not even a \u0026#34;never use \u003ccode\u003eGoto\u003c/code\u003e ever ever ever\u0026#34; person; in a language like VBA, it\u0026#39;s sometimes the best way to handle errors. But this bizarre time-traveling flow control boggles me.\u003c/p\u003e\n\u003cp\u003e\u0026#34;Etiquettes\u0026#34; is French for \u0026#34;labels\u0026#34;, and it may be bad etiquette but I\u0026#39;ve got some four letter labels for this code.\u003c/p\u003e\n\u003c!-- Easy Reader Version: GOTO considered harmful? Yeah, to my *sanity* --\u003e\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Good Etiquette","RssTitle":"CodeSOD: Good Etiquette","CachedCommentCount":7,"LastCommentDate":"\/Date(1776694684023)\/","LastCommentDateDescription":"14:18","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1776666600000)\/","ISODate":"2026-04-20","DisplayDate":"2026-04-20","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\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/good-etiquette","CommentsUrl":"https://thedailywtf.com/articles/comments/good-etiquette","Slug":"good-etiquette","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fgood-etiquette+-+Good+Etiquette+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fgood-etiquette\u0026t=Good+Etiquette+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Good%20Etiquette:%20https://thedailywtf.com/articles/good-etiquette","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fgood-etiquette","PreviousArticleId":11157,"PreviousArticleTitle":"Having a Beastly Time","PreviousArticleSlug":"having-a-beastly-time","PreviousArticleUrl":"//thedailywtf.com/articles/having-a-beastly-time","NextArticleId":null,"NextArticleTitle":null,"NextArticleSlug":null,"NextArticleUrl":"//thedailywtf.com/articles/"},{"Id":11157,"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\u003eIt\u0026#39;s time again for a reader special, and once again it\u0026#39;s all \u003cstrong\u003eThe Beast In Black\u003c/strong\u003e (there must be a story to that nick, no?).\u003c/p\u003e\n\n\u003cp\u003e\u0026#34;MySQL is not better than your SQL,\u0026#34; he pontificated, \n\u0026#34;especially when\nit comes to the Workbench Migration Wizard\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003eIt\u0026#39;s time again for a reader special, and once again it\u0026#39;s all \u003cstrong\u003eThe Beast In Black\u003c/strong\u003e (there must be a story to that nick, no?).\u003c/p\u003e\n\n\u003cp\u003e\u0026#34;MySQL is not better than your SQL,\u0026#34; he pontificated, \n\u0026#34;especially when\nit comes to the Workbench Migration Wizard\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#7369002fc20e41b89b64ed7f32ef3641\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"7369002fc20e41b89b64ed7f32ef3641\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/7369002fc20e41b89b64ed7f32ef3641.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Sadly,\u0026#34; says he, \n\u0026#34;Not even gmail/chromium either.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#149c9109443f4521b1a38b91bd0bcc22\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"149c9109443f4521b1a38b91bd0bcc22\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/149c9109443f4521b1a38b91bd0bcc22.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Updated software is available, but there are no updates!\u0026#34; he puzzled.\n\u0026#34;Clicking Install Now just throws\nthat dialog right back in my face. I\u0026#39;m re-cursing.\u0026#34; Zero, one, does it really make a difference?\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#e9ea57c886984dc8a106df503a2fd923\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"e9ea57c886984dc8a106df503a2fd923\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/e9ea57c886984dc8a106df503a2fd923.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Questions\u0026#34;\n\u003cstrong\u003eThe Beast in Black\u003c/strong\u003e\n\u0026#34;I do, in fact, have a question...\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#f5c83f7bc02644a895f1f9aa5ec368a1\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"f5c83f7bc02644a895f1f9aa5ec368a1\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/f5c83f7bc02644a895f1f9aa5ec368a1.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eOne of the foundational guides to my [lyle, not bib] engineering career\nwas John Bentley\u0026#39;s \u003cem\u003eProgramming Pearls\u003c/em\u003e. These are not those.\n\u003cbr/\u003e\n\u0026#34;Veni, vidi: vc. No pearls of wisdom here, just litter.\u0026#34; says\n\u003cstrong\u003eThe Beast\u003c/strong\u003e.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#4e13a188deb94473abcc6148d106458c\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"4e13a188deb94473abcc6148d106458c\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/4e13a188deb94473abcc6148d106458c.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\n","BodyAndAdHtml":"\u003cp\u003eIt\u0026#39;s time again for a reader special, and once again it\u0026#39;s all \u003cstrong\u003eThe Beast In Black\u003c/strong\u003e (there must be a story to that nick, no?).\u003c/p\u003e\n\n\u003cp\u003e\u0026#34;MySQL is not better than your SQL,\u0026#34; he pontificated, \n\u0026#34;especially when\nit comes to the Workbench Migration Wizard\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#7369002fc20e41b89b64ed7f32ef3641\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"7369002fc20e41b89b64ed7f32ef3641\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/7369002fc20e41b89b64ed7f32ef3641.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Sadly,\u0026#34; says he, \n\u0026#34;Not even gmail/chromium either.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#149c9109443f4521b1a38b91bd0bcc22\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"149c9109443f4521b1a38b91bd0bcc22\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/149c9109443f4521b1a38b91bd0bcc22.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Updated software is available, but there are no updates!\u0026#34; he puzzled.\n\u0026#34;Clicking Install Now just throws\nthat dialog right back in my face. I\u0026#39;m re-cursing.\u0026#34; Zero, one, does it really make a difference?\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#e9ea57c886984dc8a106df503a2fd923\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"e9ea57c886984dc8a106df503a2fd923\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/e9ea57c886984dc8a106df503a2fd923.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003e\u0026#34;Questions\u0026#34;\n\u003cstrong\u003eThe Beast in Black\u003c/strong\u003e\n\u0026#34;I do, in fact, have a question...\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#f5c83f7bc02644a895f1f9aa5ec368a1\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"f5c83f7bc02644a895f1f9aa5ec368a1\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/f5c83f7bc02644a895f1f9aa5ec368a1.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\n\u003cp\u003eOne of the foundational guides to my [lyle, not bib] engineering career\nwas John Bentley\u0026#39;s \u003cem\u003eProgramming Pearls\u003c/em\u003e. These are not those.\n\u003cbr/\u003e\n\u0026#34;Veni, vidi: vc. No pearls of wisdom here, just litter.\u0026#34; says\n\u003cstrong\u003eThe Beast\u003c/strong\u003e.\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#4e13a188deb94473abcc6148d106458c\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"4e13a188deb94473abcc6148d106458c\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/4e13a188deb94473abcc6148d106458c.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\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":"Having a Beastly Time","RssTitle":"Error\u0027d: Having a Beastly Time","CachedCommentCount":12,"LastCommentDate":"\/Date(1776506450627)\/","LastCommentDateDescription":"2026-04-18","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1776407400000)\/","ISODate":"2026-04-17","DisplayDate":"2026-04-17","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/having-a-beastly-time","CommentsUrl":"https://thedailywtf.com/articles/comments/having-a-beastly-time","Slug":"having-a-beastly-time","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fhaving-a-beastly-time+-+Having+a+Beastly+Time+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fhaving-a-beastly-time\u0026t=Having+a+Beastly+Time+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Having%20a%20Beastly%20Time:%20https://thedailywtf.com/articles/having-a-beastly-time","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fhaving-a-beastly-time","PreviousArticleId":11164,"PreviousArticleTitle":"We\u0027ll Hire Better Contractors Next Time, We Promise","PreviousArticleSlug":"we-ll-hire-better-contractors-next-time-we-promise","PreviousArticleUrl":"//thedailywtf.com/articles/we-ll-hire-better-contractors-next-time-we-promise","NextArticleId":11165,"NextArticleTitle":"Good Etiquette","NextArticleSlug":"good-etiquette","NextArticleUrl":"//thedailywtf.com/articles/good-etiquette"},{"Id":11164,"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\u003eNona\u003c/strong\u003e writes: \u0026#34;this is the beginning of a 2100 line function.\u0026#34;\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s bad. Nona didn\u0026#39;t send us the entire JavaScript function, but sent us just the three early lines, which definitely raise concerns:\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eNona\u003c/strong\u003e writes: \u0026#34;this is the beginning of a 2100 line function.\u0026#34;\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s bad. Nona didn\u0026#39;t send us the entire JavaScript function, but sent us just the three early lines, which definitely raise concerns:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-javascript\"\u003e\u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (res.\u003cspan class=\"hljs-property\"\u003elength\u003c/span\u003e \u0026gt; \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e) {\n  \u003cspan class=\"hljs-keyword\"\u003eawait\u003c/span\u003e (\u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e (\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e) {\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003ePromise\u003c/span\u003e(\u003cspan class=\"hljs-function\"\u003e(\u003cspan class=\"hljs-params\"\u003eresolve, reject\u003c/span\u003e) =\u0026gt;\u003c/span\u003e {\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eWe await a synchronous function which retuns a promise, passing a function to the promise. As a general rule, you don\u0026#39;t construct promises directly, you let asynchronous code generate them and pass them around (or await them). It\u0026#39;s not a thing you \u003cem\u003enever\u003c/em\u003e do, but it\u0026#39;s certainly suspicious. It gets more problematic when Nona adds:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eThis function happens to contain multiple code repetition snippets, including these three lines.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eThat\u0026#39;s right, this little block appears multiple times in the function, \u003cem\u003einside\u003c/em\u003e of anonymous function getting passed to the \u003ccode\u003ePromise\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eNo, the code does not work in its current state. It\u0026#39;s unclear what the 2100 line function was supposed to do. And yes, this was written by lowest-bidder third-party contractors.\u003c/p\u003e\n\u003cp\u003eNona adds:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eI am numb at this point and know I gotta fix it or we lose contracts\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eManagement made the choice to \u0026#34;save money\u0026#34; by hiring third parties, and now Nona\u0026#39;s team gets saddled with all the crunch to fix the problems created by the \u0026#34;savings\u0026#34;.\u003c/p\u003e\n\u003c!-- Easy Reader Version: \"lowest bidder\" plans to make as much, if not more profit, than the highest bidder- they just plan to spend way less doing it. --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eNona\u003c/strong\u003e writes: \u0026#34;this is the beginning of a 2100 line function.\u0026#34;\u003c/p\u003e\n\u003cp\u003eThat\u0026#39;s bad. Nona didn\u0026#39;t send us the entire JavaScript function, but sent us just the three early lines, which definitely raise concerns:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-javascript\"\u003e\u003cspan class=\"hljs-keyword\"\u003eif\u003c/span\u003e (res.\u003cspan class=\"hljs-property\"\u003elength\u003c/span\u003e \u0026gt; \u003cspan class=\"hljs-number\"\u003e0\u003c/span\u003e) {\n  \u003cspan class=\"hljs-keyword\"\u003eawait\u003c/span\u003e (\u003cspan class=\"hljs-keyword\"\u003efunction\u003c/span\u003e (\u003cspan class=\"hljs-params\"\u003e\u003c/span\u003e) {\n    \u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e \u003cspan class=\"hljs-keyword\"\u003enew\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003ePromise\u003c/span\u003e(\u003cspan class=\"hljs-function\"\u003e(\u003cspan class=\"hljs-params\"\u003eresolve, reject\u003c/span\u003e) =\u0026gt;\u003c/span\u003e {\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eWe await a synchronous function which retuns a promise, passing a function to the promise. As a general rule, you don\u0026#39;t construct promises directly, you let asynchronous code generate them and pass them around (or await them). It\u0026#39;s not a thing you \u003cem\u003enever\u003c/em\u003e do, but it\u0026#39;s certainly suspicious. It gets more problematic when Nona adds:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eThis function happens to contain multiple code repetition snippets, including these three lines.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eThat\u0026#39;s right, this little block appears multiple times in the function, \u003cem\u003einside\u003c/em\u003e of anonymous function getting passed to the \u003ccode\u003ePromise\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eNo, the code does not work in its current state. It\u0026#39;s unclear what the 2100 line function was supposed to do. And yes, this was written by lowest-bidder third-party contractors.\u003c/p\u003e\n\u003cp\u003eNona adds:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eI am numb at this point and know I gotta fix it or we lose contracts\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eManagement made the choice to \u0026#34;save money\u0026#34; by hiring third parties, and now Nona\u0026#39;s team gets saddled with all the crunch to fix the problems created by the \u0026#34;savings\u0026#34;.\u003c/p\u003e\n\u003c!-- Easy Reader Version: \"lowest bidder\" plans to make as much, if not more profit, than the highest bidder- they just plan to spend way less doing it. --\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":"We\u0027ll Hire Better Contractors Next Time, We Promise","RssTitle":"CodeSOD: We\u0027ll Hire Better Contractors Next Time, We Promise","CachedCommentCount":14,"LastCommentDate":"\/Date(1776676563720)\/","LastCommentDateDescription":"09:16","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1776321000000)\/","ISODate":"2026-04-16","DisplayDate":"2026-04-16","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/we-ll-hire-better-contractors-next-time-we-promise","CommentsUrl":"https://thedailywtf.com/articles/comments/we-ll-hire-better-contractors-next-time-we-promise","Slug":"we-ll-hire-better-contractors-next-time-we-promise","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fwe-ll-hire-better-contractors-next-time-we-promise+-+We%27ll+Hire+Better+Contractors+Next+Time%2c+We+Promise+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fwe-ll-hire-better-contractors-next-time-we-promise\u0026t=We%27ll+Hire+Better+Contractors+Next+Time%2c+We+Promise+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=We\u0027ll%20Hire%20Better%20Contractors%20Next%20Time,%20We%20Promise:%20https://thedailywtf.com/articles/we-ll-hire-better-contractors-next-time-we-promise","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fwe-ll-hire-better-contractors-next-time-we-promise","PreviousArticleId":11163,"PreviousArticleTitle":"Three Letter Acronyms, Four Letter Words","PreviousArticleSlug":"three-letter-acronyms-four-letter-words","PreviousArticleUrl":"//thedailywtf.com/articles/three-letter-acronyms-four-letter-words","NextArticleId":11157,"NextArticleTitle":"Having a Beastly Time","NextArticleSlug":"having-a-beastly-time","NextArticleUrl":"//thedailywtf.com/articles/having-a-beastly-time"},{"Id":11163,"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\u003eCandice\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/negative-creep\"\u003epreviously\u003c/a\u003e) has another WTF to share for us.\u003c/p\u003e\n\u003cp\u003eWe\u0026#39;re going to start by just looking at one fragment of a class defined in this C++ code: \u003ccode\u003eTLAflaList\u003c/code\u003e.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eCandice\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/negative-creep\"\u003epreviously\u003c/a\u003e) has another WTF to share for us.\u003c/p\u003e\n\u003cp\u003eWe\u0026#39;re going to start by just looking at one fragment of a class defined in this C++ code: \u003ccode\u003eTLAflaList\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eEvery type and variable has a three-letter-acronym buried in its name. The specific meaning of most of the acronyms are mostly lost to time, so \u0026#34;TLA\u0026#34; is as good as any other three random letters. No one knows what \u0026#34;fla\u0026#34; is.\u003c/p\u003e\n\u003cp\u003eWhat drew Candice\u0026#39;s attention was that there was a type called \u0026#34;list\u0026#34;, which implies they\u0026#39;re maybe not using the standard library and have reinvented a wheel. Another data point arguing in favor of that is that the class had a method called \u003ccode\u003egetNumElements\u003c/code\u003e, instead of something more conventional like \u003ccode\u003esize\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eLet\u0026#39;s look at that function:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003esize_t\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003eTLAflaList::getNumElements\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c/span\u003e\n\u003c/span\u003e{\n\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e mv_FLAarray.\u003cspan class=\"hljs-built_in\"\u003esize\u003c/span\u003e();\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIn addition to the meaningless three-letter-acronyms which start every type and variable, we\u0026#39;re also adding on a lovely bit of hungarian notation, throwing \u003ccode\u003emv_\u003c/code\u003e on the front for a member variable. The variable is called \u0026#34;array\u0026#34;, but \u003cem\u003eis\u003c/em\u003e it? Let\u0026#39;s look at that definition.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-keyword\"\u003eclass\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eTLAflaList\u003c/span\u003e\n{\n\t…\n\t\u003cspan class=\"hljs-keyword\"\u003eprivate\u003c/span\u003e:\n\t\tTLAflaArray_t mv_FLAarray;\n\t\t…\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eOkay, that gives me a lot more nonsense letters but I still have no idea what that variable is. Where\u0026#39;s that type defined? The good news, it\u0026#39;s in the same header.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-keyword\"\u003etypedef\u003c/span\u003e std::vector\u0026lt;INtabCRMprdinvusage_t*\u0026gt; TLAflaArray_t;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eSo it\u0026#39;s not a list or an array, it\u0026#39;s a vector. A vector of bare pointers, which definitely makes me worry about inevitable use-after-free errors or memory leaks. Who owns the memory that those pointers are referencing?\u003c/p\u003e\n\u003cp\u003e\u0026#34;IN\u0026#34; in the type name is an old company, good ol\u0026#39; Initrode, which got acquired a decade ago. \u0026#34;tab\u0026#34; tells us that it\u0026#39;s meant to be a database table. We can guess at the rest.\u003c/p\u003e\n\u003cp\u003eThis isn\u0026#39;t a codebase, it\u0026#39;s a bad Scrabble hand. It\u0026#39;s also a trainwreck. Confusing, disorganized, and all of that made worse by piles of \u003ccode\u003etypedef\u003c/code\u003es that hide what you\u0026#39;re actually doing and endless acronyms that make it impossible to read.\u003c/p\u003e\n\u003cp\u003eOne last detail, which I\u0026#39;ll let Candice explain:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eI started scrolling down the class definition - it took longer than it should have, given that the company coding style is to double-space the overwhelming majority of lines.  (Seriously; I\u0026#39;ve seen single character braces sandwiched by two lines of nothing.)  On the upside, this was one of the classes with just one public block and one private block - some classes like to ping-pong back and forth a half-dozen times.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c!-- ERV: WTFBBQ TMAMCUAIR? --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eCandice\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/negative-creep\"\u003epreviously\u003c/a\u003e) has another WTF to share for us.\u003c/p\u003e\n\u003cp\u003eWe\u0026#39;re going to start by just looking at one fragment of a class defined in this C++ code: \u003ccode\u003eTLAflaList\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eEvery type and variable has a three-letter-acronym buried in its name. The specific meaning of most of the acronyms are mostly lost to time, so \u0026#34;TLA\u0026#34; is as good as any other three random letters. No one knows what \u0026#34;fla\u0026#34; is.\u003c/p\u003e\n\u003cp\u003eWhat drew Candice\u0026#39;s attention was that there was a type called \u0026#34;list\u0026#34;, which implies they\u0026#39;re maybe not using the standard library and have reinvented a wheel. Another data point arguing in favor of that is that the class had a method called \u003ccode\u003egetNumElements\u003c/code\u003e, instead of something more conventional like \u003ccode\u003esize\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eLet\u0026#39;s look at that function:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003esize_t\u003c/span\u003e \u003cspan class=\"hljs-title\"\u003eTLAflaList::getNumElements\u003c/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c/span\u003e\n\u003c/span\u003e{\n\t\u003cspan class=\"hljs-keyword\"\u003ereturn\u003c/span\u003e mv_FLAarray.\u003cspan class=\"hljs-built_in\"\u003esize\u003c/span\u003e();\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIn addition to the meaningless three-letter-acronyms which start every type and variable, we\u0026#39;re also adding on a lovely bit of hungarian notation, throwing \u003ccode\u003emv_\u003c/code\u003e on the front for a member variable. The variable is called \u0026#34;array\u0026#34;, but \u003cem\u003eis\u003c/em\u003e it? Let\u0026#39;s look at that definition.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-keyword\"\u003eclass\u003c/span\u003e \u003cspan class=\"hljs-title class_\"\u003eTLAflaList\u003c/span\u003e\n{\n\t…\n\t\u003cspan class=\"hljs-keyword\"\u003eprivate\u003c/span\u003e:\n\t\tTLAflaArray_t mv_FLAarray;\n\t\t…\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eOkay, that gives me a lot more nonsense letters but I still have no idea what that variable is. Where\u0026#39;s that type defined? The good news, it\u0026#39;s in the same header.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-cpp\"\u003e\u003cspan class=\"hljs-keyword\"\u003etypedef\u003c/span\u003e std::vector\u0026lt;INtabCRMprdinvusage_t*\u0026gt; TLAflaArray_t;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eSo it\u0026#39;s not a list or an array, it\u0026#39;s a vector. A vector of bare pointers, which definitely makes me worry about inevitable use-after-free errors or memory leaks. Who owns the memory that those pointers are referencing?\u003c/p\u003e\n\u003cp\u003e\u0026#34;IN\u0026#34; in the type name is an old company, good ol\u0026#39; Initrode, which got acquired a decade ago. \u0026#34;tab\u0026#34; tells us that it\u0026#39;s meant to be a database table. We can guess at the rest.\u003c/p\u003e\n\u003cp\u003eThis isn\u0026#39;t a codebase, it\u0026#39;s a bad Scrabble hand. It\u0026#39;s also a trainwreck. Confusing, disorganized, and all of that made worse by piles of \u003ccode\u003etypedef\u003c/code\u003es that hide what you\u0026#39;re actually doing and endless acronyms that make it impossible to read.\u003c/p\u003e\n\u003cp\u003eOne last detail, which I\u0026#39;ll let Candice explain:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eI started scrolling down the class definition - it took longer than it should have, given that the company coding style is to double-space the overwhelming majority of lines.  (Seriously; I\u0026#39;ve seen single character braces sandwiched by two lines of nothing.)  On the upside, this was one of the classes with just one public block and one private block - some classes like to ping-pong back and forth a half-dozen times.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c!-- ERV: WTFBBQ TMAMCUAIR? --\u003e\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Three Letter Acronyms, Four Letter Words","RssTitle":"CodeSOD: Three Letter Acronyms, Four Letter Words","CachedCommentCount":18,"LastCommentDate":"\/Date(1776338936223)\/","LastCommentDateDescription":"2026-04-16","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1776234600000)\/","ISODate":"2026-04-15","DisplayDate":"2026-04-15","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\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/three-letter-acronyms-four-letter-words","CommentsUrl":"https://thedailywtf.com/articles/comments/three-letter-acronyms-four-letter-words","Slug":"three-letter-acronyms-four-letter-words","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fthree-letter-acronyms-four-letter-words+-+Three+Letter+Acronyms%2c+Four+Letter+Words+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fthree-letter-acronyms-four-letter-words\u0026t=Three+Letter+Acronyms%2c+Four+Letter+Words+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Three%20Letter%20Acronyms,%20Four%20Letter%20Words:%20https://thedailywtf.com/articles/three-letter-acronyms-four-letter-words","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fthree-letter-acronyms-four-letter-words","PreviousArticleId":11162,"PreviousArticleTitle":"A Hole in Your Plan","PreviousArticleSlug":"a-hole-in-your-plan","PreviousArticleUrl":"//thedailywtf.com/articles/a-hole-in-your-plan","NextArticleId":11164,"NextArticleTitle":"We\u0027ll Hire Better Contractors Next Time, We Promise","NextArticleSlug":"we-ll-hire-better-contractors-next-time-we-promise","NextArticleUrl":"//thedailywtf.com/articles/we-ll-hire-better-contractors-next-time-we-promise"},{"Id":11162,"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\u003eTheresa\u003c/strong\u003e works for a company that handles a fair bit of personally identifiable information that can be tied to health care data, so for them, security matters. They need to comply with security practices laid out by a variety of standards bodies and be able to demonstrate that compliance.\u003c/p\u003e\n\u003cp\u003eThere\u0026#39;s a dirty secret about standards compliance, though. Most of these standards are trying to avoid being overly technically prescriptive. So frequently, they may have something like, \u0026#34;a process must exist for securely destroying storage devices before they are disposed of.\u0026#34; Maybe it will include some examples of what you could do to meet this standard, but the important thing is that you have to have a \u003cem\u003eprocess\u003c/em\u003e. This means that if you whip up a Word document called \u0026#34;Secure Data Destruction Process\u0026#34; and tell people they should follow it, you can check off that box on your compliance. Sometimes, you need to validate the process; sometimes you need to have other processes which ensure this process is being followed. What you need to do and to what complexity depends on the compliance structure you\u0026#39;re beholden to. Some of them are surprisingly flexible, which is a polite way of saying \u0026#34;mostly meaningless\u0026#34;.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eTheresa\u003c/strong\u003e works for a company that handles a fair bit of personally identifiable information that can be tied to health care data, so for them, security matters. They need to comply with security practices laid out by a variety of standards bodies and be able to demonstrate that compliance.\u003c/p\u003e\n\u003cp\u003eThere\u0026#39;s a dirty secret about standards compliance, though. Most of these standards are trying to avoid being overly technically prescriptive. So frequently, they may have something like, \u0026#34;a process must exist for securely destroying storage devices before they are disposed of.\u0026#34; Maybe it will include some examples of what you could do to meet this standard, but the important thing is that you have to have a \u003cem\u003eprocess\u003c/em\u003e. This means that if you whip up a Word document called \u0026#34;Secure Data Destruction Process\u0026#34; and tell people they should follow it, you can check off that box on your compliance. Sometimes, you need to validate the process; sometimes you need to have other processes which ensure this process is being followed. What you need to do and to what complexity depends on the compliance structure you\u0026#39;re beholden to. Some of them are surprisingly flexible, which is a polite way of saying \u0026#34;mostly meaningless\u0026#34;.\u003c/p\u003e\n\u003cp\u003eTheresa\u0026#39;s company has a process for safely destroying hard drives. They even validated it, shortly after its introduction. They even have someone who checks that the process has been followed. The process is this: in the basement, someone set up a cheap drill press, and attached a wooden jig to it. You slap the hard drive in the jig, turn on the drill, and brrrrzzzzzz- poke a hole through the platters making the drive unreadable.\u003c/p\u003e\n\u003cp\u003eThere\u0026#39;s just one problem with that process: the company recently switched to using SSDs. The SSDs are in a carrier which makes them share the same form factor as old-style spinning disk drives, but that\u0026#39;s just a thin plastic shell. The actual electronics package where the data is stored is quite small. Small enough, and located in a position where the little jig attached to the drill guarantees that the drill won\u0026#39;t even touch the SSD at all.\u003c/p\u003e\n\u003cp\u003eFor months now, whenever a drive got decommissioned, the IT drone responsible for punching a hole through it has just been drilling through plastic, and nothing else. An unknown quantity of hard drives have been sent out for recycling with PII and health data on them. But it\u0026#39;s okay, because \u003cem\u003ethe process was followed\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThe compliance team at the company will update the process, probably after six months of meetings and planning and approvals from all of the stakeholders. Though it may take longer to glue together a new jig for the SSDs.\u003c/p\u003e\n\u003c!-- Easy Reader Version: On the flip side, some standards are weirdly prescriptive, like requiring a hardware firewall between sections of the network, down to the specific brands allowed. --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eTheresa\u003c/strong\u003e works for a company that handles a fair bit of personally identifiable information that can be tied to health care data, so for them, security matters. They need to comply with security practices laid out by a variety of standards bodies and be able to demonstrate that compliance.\u003c/p\u003e\n\u003cp\u003eThere\u0026#39;s a dirty secret about standards compliance, though. Most of these standards are trying to avoid being overly technically prescriptive. So frequently, they may have something like, \u0026#34;a process must exist for securely destroying storage devices before they are disposed of.\u0026#34; Maybe it will include some examples of what you could do to meet this standard, but the important thing is that you have to have a \u003cem\u003eprocess\u003c/em\u003e. This means that if you whip up a Word document called \u0026#34;Secure Data Destruction Process\u0026#34; and tell people they should follow it, you can check off that box on your compliance. Sometimes, you need to validate the process; sometimes you need to have other processes which ensure this process is being followed. What you need to do and to what complexity depends on the compliance structure you\u0026#39;re beholden to. Some of them are surprisingly flexible, which is a polite way of saying \u0026#34;mostly meaningless\u0026#34;.\u003c/p\u003e\n\u003cp\u003eTheresa\u0026#39;s company has a process for safely destroying hard drives. They even validated it, shortly after its introduction. They even have someone who checks that the process has been followed. The process is this: in the basement, someone set up a cheap drill press, and attached a wooden jig to it. You slap the hard drive in the jig, turn on the drill, and brrrrzzzzzz- poke a hole through the platters making the drive unreadable.\u003c/p\u003e\n\u003cp\u003eThere\u0026#39;s just one problem with that process: the company recently switched to using SSDs. The SSDs are in a carrier which makes them share the same form factor as old-style spinning disk drives, but that\u0026#39;s just a thin plastic shell. The actual electronics package where the data is stored is quite small. Small enough, and located in a position where the little jig attached to the drill guarantees that the drill won\u0026#39;t even touch the SSD at all.\u003c/p\u003e\n\u003cp\u003eFor months now, whenever a drive got decommissioned, the IT drone responsible for punching a hole through it has just been drilling through plastic, and nothing else. An unknown quantity of hard drives have been sent out for recycling with PII and health data on them. But it\u0026#39;s okay, because \u003cem\u003ethe process was followed\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThe compliance team at the company will update the process, probably after six months of meetings and planning and approvals from all of the stakeholders. Though it may take longer to glue together a new jig for the SSDs.\u003c/p\u003e\n\u003c!-- Easy Reader Version: On the flip side, some standards are weirdly prescriptive, like requiring a hardware firewall between sections of the network, down to the specific brands allowed. --\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 Hole in Your Plan","RssTitle":"A Hole in Your Plan","CachedCommentCount":41,"LastCommentDate":"\/Date(1776660916767)\/","LastCommentDateDescription":"04:55","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1776148200000)\/","ISODate":"2026-04-14","DisplayDate":"2026-04-14","Series":{"Slug":"feature-articles","Title":"Feature Articles","Description":"","CssClass":"featured"},"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-hole-in-your-plan","CommentsUrl":"https://thedailywtf.com/articles/comments/a-hole-in-your-plan","Slug":"a-hole-in-your-plan","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fa-hole-in-your-plan+-+A+Hole+in+Your+Plan+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fa-hole-in-your-plan\u0026t=A+Hole+in+Your+Plan+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=A%20Hole%20in%20Your%20Plan:%20https://thedailywtf.com/articles/a-hole-in-your-plan","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fa-hole-in-your-plan","PreviousArticleId":11161,"PreviousArticleTitle":"Non-cogito Ergo c_str","PreviousArticleSlug":"non-cogito-ergo-c-str","PreviousArticleUrl":"//thedailywtf.com/articles/non-cogito-ergo-c-str","NextArticleId":11163,"NextArticleTitle":"Three Letter Acronyms, Four Letter Words","NextArticleSlug":"three-letter-acronyms-four-letter-words","NextArticleUrl":"//thedailywtf.com/articles/three-letter-acronyms-four-letter-words"},{"Id":11161,"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\u003eTim\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/expressing-a-leak\"\u003epreviously\u003c/a\u003e) supports a relatively ancient C++ application. And that creates some interesting conundrums, as the way you wrote C++ in 2003 is not the way you would write it even a few years later. The standard matured quickly.\u003c/p\u003e\n\u003cp\u003eWay back in 2003, it was still common to use C-style strings, instead of the C++ \u003ccode\u003estd::string\u003c/code\u003e type. It seems silly, but people had Strong Opinions™ about using standard library types, and much of your C++ code was probably interacting with C libraries, so yeah, C-strings stuck around for a long time.\u003c/p\u003e\n","BodyHtml":"\u003cp\u003e\u003cstrong\u003eTim\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/expressing-a-leak\"\u003epreviously\u003c/a\u003e) supports a relatively ancient C++ application. And that creates some interesting conundrums, as the way you wrote C++ in 2003 is not the way you would write it even a few years later. The standard matured quickly.\u003c/p\u003e\n\u003cp\u003eWay back in 2003, it was still common to use C-style strings, instead of the C++ \u003ccode\u003estd::string\u003c/code\u003e type. It seems silly, but people had Strong Opinions™ about using standard library types, and much of your C++ code was probably interacting with C libraries, so yeah, C-strings stuck around for a long time.\u003c/p\u003e\n\u003cp\u003eFor Tim\u0026#39;s company, however, the migration away from C-strings was in 2007.\u003c/p\u003e\n\u003cp\u003eSo they wrote 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\"\u003estrncmp\u003c/span\u003e( pdf-\u0026gt;\u003cspan class=\"hljs-built_in\"\u003esymTabName\u003c/span\u003e().\u003cspan class=\"hljs-built_in\"\u003ec_str\u003c/span\u003e(), prefix.\u003cspan class=\"hljs-built_in\"\u003ec_str\u003c/span\u003e(), \u003cspan class=\"hljs-built_in\"\u003estrlen\u003c/span\u003e( prefix.\u003cspan class=\"hljs-built_in\"\u003ec_str\u003c/span\u003e() ) ) ) {\n    \u003cspan class=\"hljs-comment\"\u003e// do stuff\u003c/span\u003e\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis is doing a \u0026#34;starts with\u0026#34; check. \u003ccode\u003estrncmp\u003c/code\u003e, \u003ccode\u003estrlen\u003c/code\u003e are both functions which operate on C-strings. So we compare the \u003ccode\u003esymTabName\u003c/code\u003e against the \u003ccode\u003eprefix\u003c/code\u003e, but only look at as many characters as are in the prefix. As is common, \u003ccode\u003estrncmp\u003c/code\u003e returns 0 if the two strings are equal, so we negate that to say \u0026#34;if the \u003ccode\u003esymTabName\u003c/code\u003e starts with \u003ccode\u003eprefix\u003c/code\u003e, do stuff\u0026#34;.\u003c/p\u003e\n\u003cp\u003eIn C code, this is very much how you would do this, though you might contemplate turning it into a function. Though maybe not.\u003c/p\u003e\n\u003cp\u003eIn C++, in 2007, you \u003cem\u003edo not\u003c/em\u003e have a built-in \u003ccode\u003estarts_with\u003c/code\u003e function- you have to wait until the C++20 standard for that- but you have some string handling functions which could make this more clear. As Tim points out, the \u0026#34;correct\u0026#34; answer is: \u003ccode\u003eif(pdf-\u0026gt;symTabName().find(prefix) != 0UL)\u003c/code\u003e. It\u0026#39;s more readable, it doesn\u0026#39;t involve poking around with \u003ccode\u003echar*\u003c/code\u003es, and also isn\u0026#39;t spamming that extra whitespace between every parenthesis and operator.\u003c/p\u003e\n\u003cp\u003eTim writes: \u0026#34;String handling in C++ is pretty terrible, but it doesn\u0026#39;t have to be this terrible.\u0026#34;\u003c/p\u003e\n\u003c!-- Easy Reader Version: Strings were a mistake. We shouldn\u0027t use text to communicate anymore. Let LLMs do that, we can just use pure numbers and mathematics. --\u003e","BodyAndAdHtml":"\u003cp\u003e\u003cstrong\u003eTim\u003c/strong\u003e (\u003ca href=\"https://thedailywtf.com/articles/expressing-a-leak\"\u003epreviously\u003c/a\u003e) supports a relatively ancient C++ application. And that creates some interesting conundrums, as the way you wrote C++ in 2003 is not the way you would write it even a few years later. The standard matured quickly.\u003c/p\u003e\n\u003cp\u003eWay back in 2003, it was still common to use C-style strings, instead of the C++ \u003ccode\u003estd::string\u003c/code\u003e type. It seems silly, but people had Strong Opinions™ about using standard library types, and much of your C++ code was probably interacting with C libraries, so yeah, C-strings stuck around for a long time.\u003c/p\u003e\n\u003cp\u003eFor Tim\u0026#39;s company, however, the migration away from C-strings was in 2007.\u003c/p\u003e\n\u003cp\u003eSo they wrote 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\"\u003estrncmp\u003c/span\u003e( pdf-\u0026gt;\u003cspan class=\"hljs-built_in\"\u003esymTabName\u003c/span\u003e().\u003cspan class=\"hljs-built_in\"\u003ec_str\u003c/span\u003e(), prefix.\u003cspan class=\"hljs-built_in\"\u003ec_str\u003c/span\u003e(), \u003cspan class=\"hljs-built_in\"\u003estrlen\u003c/span\u003e( prefix.\u003cspan class=\"hljs-built_in\"\u003ec_str\u003c/span\u003e() ) ) ) {\n    \u003cspan class=\"hljs-comment\"\u003e// do stuff\u003c/span\u003e\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThis is doing a \u0026#34;starts with\u0026#34; check. \u003ccode\u003estrncmp\u003c/code\u003e, \u003ccode\u003estrlen\u003c/code\u003e are both functions which operate on C-strings. So we compare the \u003ccode\u003esymTabName\u003c/code\u003e against the \u003ccode\u003eprefix\u003c/code\u003e, but only look at as many characters as are in the prefix. As is common, \u003ccode\u003estrncmp\u003c/code\u003e returns 0 if the two strings are equal, so we negate that to say \u0026#34;if the \u003ccode\u003esymTabName\u003c/code\u003e starts with \u003ccode\u003eprefix\u003c/code\u003e, do stuff\u0026#34;.\u003c/p\u003e\n\u003cp\u003eIn C code, this is very much how you would do this, though you might contemplate turning it into a function. Though maybe not.\u003c/p\u003e\n\u003cp\u003eIn C++, in 2007, you \u003cem\u003edo not\u003c/em\u003e have a built-in \u003ccode\u003estarts_with\u003c/code\u003e function- you have to wait until the C++20 standard for that- but you have some string handling functions which could make this more clear. As Tim points out, the \u0026#34;correct\u0026#34; answer is: \u003ccode\u003eif(pdf-\u0026gt;symTabName().find(prefix) != 0UL)\u003c/code\u003e. It\u0026#39;s more readable, it doesn\u0026#39;t involve poking around with \u003ccode\u003echar*\u003c/code\u003es, and also isn\u0026#39;t spamming that extra whitespace between every parenthesis and operator.\u003c/p\u003e\n\u003cp\u003eTim writes: \u0026#34;String handling in C++ is pretty terrible, but it doesn\u0026#39;t have to be this terrible.\u0026#34;\u003c/p\u003e\n\u003c!-- Easy Reader Version: Strings were a mistake. We shouldn\u0027t use text to communicate anymore. Let LLMs do that, we can just use pure numbers and mathematics. --\u003e\u003cdiv\u003e\n\t\u003cimg src=\"https://thedailywtf.com/images/inedo/proget-icon.png\" style=\"display:block; float: left; margin: 0 10px 10px 0;\"/\u003e [Advertisement] \n\tProGet’s got you covered with security and access controls on your NuGet feeds. \u003ca href=\"https://inedo.com/proget/private-nuget-server?utm_source=tdwtf\u0026amp;utm_medium=footer\u0026amp;utm_content=GotYouCoveredFooter\u0026amp;utm_campaign=Cyclops2020\"\u003eLearn more.\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv style=\"clear: left;\"\u003e \u003c/div\u003e\n","Title":"Non-cogito Ergo c_str","RssTitle":"CodeSOD: Non-cogito Ergo c_str","CachedCommentCount":24,"LastCommentDate":"\/Date(1776664218713)\/","LastCommentDateDescription":"05:50","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1776061800000)\/","ISODate":"2026-04-13","DisplayDate":"2026-04-13","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\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/non-cogito-ergo-c-str","CommentsUrl":"https://thedailywtf.com/articles/comments/non-cogito-ergo-c-str","Slug":"non-cogito-ergo-c-str","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fnon-cogito-ergo-c-str+-+Non-cogito+Ergo+c_str+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fnon-cogito-ergo-c-str\u0026t=Non-cogito+Ergo+c_str+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Non-cogito%20Ergo%20c_str:%20https://thedailywtf.com/articles/non-cogito-ergo-c-str","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fnon-cogito-ergo-c-str","PreviousArticleId":11159,"PreviousArticleTitle":"Youth is Wasted on the Junge","PreviousArticleSlug":"youth-is-wasted-on-the-junge","PreviousArticleUrl":"//thedailywtf.com/articles/youth-is-wasted-on-the-junge","NextArticleId":11162,"NextArticleTitle":"A Hole in Your Plan","NextArticleSlug":"a-hole-in-your-plan","NextArticleUrl":"//thedailywtf.com/articles/a-hole-in-your-plan"},{"Id":11159,"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\u003cp\u003e\u0026#34;My thoughts exactly\u0026#34; muttered \n\u003cstrong\u003eJason H.\u003c/strong\u003e\n\u0026#34;I was in a system that avoids check constraints and\nthe developers never seemed to agree to a T/F or\nY/N or 1/0 for indicator columns. All data in a\ncolumn will use the same pattern but different columns in\nthe same table will use different patterns so I\u0026#39;m not\nsure why I was surprised when I came across the\nattached. Sort the data descending and you have the shorthand\nfor what I uttered.\u0026#34; How are these all unique?\n\u003c/p\u003e\u003cblockquote\u003e\u003c/blockquote\u003e","BodyHtml":"\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u0026#34;My thoughts exactly\u0026#34; muttered \n\u003cstrong\u003eJason H.\u003c/strong\u003e\n\u0026#34;I was in a system that avoids check constraints and\nthe developers never seemed to agree to a T/F or\nY/N or 1/0 for indicator columns. All data in a\ncolumn will use the same pattern but different columns in\nthe same table will use different patterns so I\u0026#39;m not\nsure why I was surprised when I came across the\nattached. Sort the data descending and you have the shorthand\nfor what I uttered.\u0026#34; How are these all unique?\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#4af53c55b8564b34a6f12916571c92fd\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"4af53c55b8564b34a6f12916571c92fd\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/4af53c55b8564b34a6f12916571c92fd.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\n\u0026#34;I\u0026#39;d better act quickly!\u0026#34;\n\u003cstrong\u003eHugh Scenic\u003c/strong\u003e almost panicked.\n\u0026#34;This Microsoft Rewards offer might\nexpire (in just under 74 years)!\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#50a5533b37f54e6ebbfc460136507205\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"50a5533b37f54e6ebbfc460136507205\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/50a5533b37f54e6ebbfc460136507205.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\u0026#34;Copy-copy-copy\u0026#34; repeated \n\u003cstrong\u003eGordon\u003c/strong\u003e.\n\u0026#34;Not sure I want the team to be in touch\n- my query might be best left unanswered.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#617f1082b64f442aa146e47115c5b6fa\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"617f1082b64f442aa146e47115c5b6fa\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/617f1082b64f442aa146e47115c5b6fa.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\n\u0026#34;Was Comcast\u0026#39;s episode guide data hacked by MAGA?\u0026#34;\n\u003cstrong\u003eBarry M.\u003c/strong\u003e\nwondered. \u0026#34;This is\nnot the usual generic description of Real Time.\u0026#34; \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6af551a6d02e417eb4d0fb3470f8fbb1\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6af551a6d02e417eb4d0fb3470f8fbb1\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/6af551a6d02e417eb4d0fb3470f8fbb1.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\u0026#34;\u003cstrong\u003eHoliday Workshop for Children\u003c/strong\u003e\nlearning how to write web pages, apparently,\u0026#34; notes self-named \n\u003cstrong\u003eYouth P.\u003c/strong\u003e\n\u0026#34;You need a new category - because it is no\nerror to involve young people in a\nweb design workshop during their holidays. A little bit of\na surprise was that it will happen in a local\nmuseum, and that children between 8 and 12 are the\ntarget audience - should they really already think about their\nwork future?\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#c3cced1e818d499ea652a80a7d1cbc71\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"c3cced1e818d499ea652a80a7d1cbc71\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/c3cced1e818d499ea652a80a7d1cbc71.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n","BodyAndAdHtml":"\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u0026#34;My thoughts exactly\u0026#34; muttered \n\u003cstrong\u003eJason H.\u003c/strong\u003e\n\u0026#34;I was in a system that avoids check constraints and\nthe developers never seemed to agree to a T/F or\nY/N or 1/0 for indicator columns. All data in a\ncolumn will use the same pattern but different columns in\nthe same table will use different patterns so I\u0026#39;m not\nsure why I was surprised when I came across the\nattached. Sort the data descending and you have the shorthand\nfor what I uttered.\u0026#34; How are these all unique?\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#4af53c55b8564b34a6f12916571c92fd\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"4af53c55b8564b34a6f12916571c92fd\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/4af53c55b8564b34a6f12916571c92fd.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\n\u0026#34;I\u0026#39;d better act quickly!\u0026#34;\n\u003cstrong\u003eHugh Scenic\u003c/strong\u003e almost panicked.\n\u0026#34;This Microsoft Rewards offer might\nexpire (in just under 74 years)!\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#50a5533b37f54e6ebbfc460136507205\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"50a5533b37f54e6ebbfc460136507205\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/50a5533b37f54e6ebbfc460136507205.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\u0026#34;Copy-copy-copy\u0026#34; repeated \n\u003cstrong\u003eGordon\u003c/strong\u003e.\n\u0026#34;Not sure I want the team to be in touch\n- my query might be best left unanswered.\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#617f1082b64f442aa146e47115c5b6fa\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"617f1082b64f442aa146e47115c5b6fa\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/617f1082b64f442aa146e47115c5b6fa.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\n\u0026#34;Was Comcast\u0026#39;s episode guide data hacked by MAGA?\u0026#34;\n\u003cstrong\u003eBarry M.\u003c/strong\u003e\nwondered. \u0026#34;This is\nnot the usual generic description of Real Time.\u0026#34; \n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#6af551a6d02e417eb4d0fb3470f8fbb1\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"6af551a6d02e417eb4d0fb3470f8fbb1\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/6af551a6d02e417eb4d0fb3470f8fbb1.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\u0026#34;\u003cstrong\u003eHoliday Workshop for Children\u003c/strong\u003e\nlearning how to write web pages, apparently,\u0026#34; notes self-named \n\u003cstrong\u003eYouth P.\u003c/strong\u003e\n\u0026#34;You need a new category - because it is no\nerror to involve young people in a\nweb design workshop during their holidays. A little bit of\na surprise was that it will happen in a local\nmuseum, and that children between 8 and 12 are the\ntarget audience - should they really already think about their\nwork future?\u0026#34;\n\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003e\u003ca href=\"#c3cced1e818d499ea652a80a7d1cbc71\"\u003e\u003cimg itemprop=\"image\" border=\"0\" alt=\"c3cced1e818d499ea652a80a7d1cbc71\" src=\"https://d3hvi6t161kfmf.cloudfront.net/images/2026/04/05/c3cced1e818d499ea652a80a7d1cbc71.jpeg\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003e \u003c/p\u003e\u003c/blockquote\u003e\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":"Youth is Wasted on the Junge","RssTitle":"Error\u0027d: Youth is Wasted on the Junge","CachedCommentCount":9,"LastCommentDate":"\/Date(1776061458640)\/","LastCommentDateDescription":"2026-04-13","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1775802600000)\/","ISODate":"2026-04-10","DisplayDate":"2026-04-10","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/youth-is-wasted-on-the-junge","CommentsUrl":"https://thedailywtf.com/articles/comments/youth-is-wasted-on-the-junge","Slug":"youth-is-wasted-on-the-junge","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2fyouth-is-wasted-on-the-junge+-+Youth+is+Wasted+on+the+Junge+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2fyouth-is-wasted-on-the-junge\u0026t=Youth+is+Wasted+on+the+Junge+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Youth%20is%20Wasted%20on%20the%20Junge:%20https://thedailywtf.com/articles/youth-is-wasted-on-the-junge","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2fyouth-is-wasted-on-the-junge","PreviousArticleId":11160,"PreviousArticleTitle":"Take a Percentage","PreviousArticleSlug":"take-a-percentage","PreviousArticleUrl":"//thedailywtf.com/articles/take-a-percentage","NextArticleId":11161,"NextArticleTitle":"Non-cogito Ergo c_str","NextArticleSlug":"non-cogito-ergo-c-str","NextArticleUrl":"//thedailywtf.com/articles/non-cogito-ergo-c-str"},{"Id":11160,"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 looking at the source of a major news site, today\u0026#39;s anonymous submitter sends us this very, very mild, but also very funny WTF:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-html\"\u003e\t\u003cspan class=\"hljs-tag\"\u003e\u0026lt;\u003cspan class=\"hljs-name\"\u003ediv\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003eclass\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;g-vhs g-videotape g-cinemagraph\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003eid\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;g-video-178_article_slug-640w\u0026#34;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003edata-type\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;videotape\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-asset\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;https://somesite.com/videos/file.mp4\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-cinemagraph\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;true\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-allow-multiple-players\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;true\u0026#34;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003edata-vhs-options\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#39;{\u0026#34;ratio\u0026#34;:\u0026#34;560:320\u0026#34;}\u0026#39;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003estyle\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;padding-bottom: 57.14285714285714%\u0026#34;\u003c/span\u003e\u0026gt;\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n","BodyHtml":"\u003cp\u003eWhen looking at the source of a major news site, today\u0026#39;s anonymous submitter sends us this very, very mild, but also very funny WTF:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-html\"\u003e\t\u003cspan class=\"hljs-tag\"\u003e\u0026lt;\u003cspan class=\"hljs-name\"\u003ediv\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003eclass\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;g-vhs g-videotape g-cinemagraph\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003eid\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;g-video-178_article_slug-640w\u0026#34;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003edata-type\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;videotape\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-asset\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;https://somesite.com/videos/file.mp4\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-cinemagraph\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;true\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-allow-multiple-players\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;true\u0026#34;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003edata-vhs-options\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#39;{\u0026#34;ratio\u0026#34;:\u0026#34;560:320\u0026#34;}\u0026#39;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003estyle\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;padding-bottom: 57.14285714285714%\u0026#34;\u003c/span\u003e\u0026gt;\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eLook, I know that percentage was calculated by JavaScript, or maybe the backend, or maybe calculated by a CSS pre-processor. No human typed that. There\u0026#39;s nothing to gain by adding a rounding operation. There\u0026#39;s nothing truly \u003cem\u003ewrong\u003c/em\u003e with that line of code.\u003c/p\u003e\n\u003cp\u003eBut I can\u0026#39;t help but think about the comedic value in controlling your page layout down to sub-sub-sub-sub-sub-sub-sub-sub-pixel precision. This code will continue to have pixel accuracy out to screens with quadrillions of pixels, making it incredibly future proof.\u003c/p\u003e\n\u003cp\u003eIt\u0026#39;s made extra funny by calling the video player \u003ccode\u003eVHS\u003c/code\u003e and suggesting the appropriate ratio is 560 pixels by 320- which is not \u003cem\u003equite\u003c/em\u003e 16:9, but is a frequent letterbox ratio on DVD prints of movies.\u003c/p\u003e\n\u003cp\u003eIn any case, I eagerly await a 20-zetta-pixel displays, so I can read the news in its intended glory.\u003c/p\u003e\n\u003c!-- Easy Reader Version: I bet the person responsible has memorized all the digits of pi --\u003e","BodyAndAdHtml":"\u003cp\u003eWhen looking at the source of a major news site, today\u0026#39;s anonymous submitter sends us this very, very mild, but also very funny WTF:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-html\"\u003e\t\u003cspan class=\"hljs-tag\"\u003e\u0026lt;\u003cspan class=\"hljs-name\"\u003ediv\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003eclass\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;g-vhs g-videotape g-cinemagraph\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003eid\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;g-video-178_article_slug-640w\u0026#34;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003edata-type\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;videotape\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-asset\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;https://somesite.com/videos/file.mp4\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-cinemagraph\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;true\u0026#34;\u003c/span\u003e \u003cspan class=\"hljs-attr\"\u003edata-allow-multiple-players\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;true\u0026#34;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003edata-vhs-options\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#39;{\u0026#34;ratio\u0026#34;:\u0026#34;560:320\u0026#34;}\u0026#39;\u003c/span\u003e\n\t\t \u003cspan class=\"hljs-attr\"\u003estyle\u003c/span\u003e=\u003cspan class=\"hljs-string\"\u003e\u0026#34;padding-bottom: 57.14285714285714%\u0026#34;\u003c/span\u003e\u0026gt;\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eLook, I know that percentage was calculated by JavaScript, or maybe the backend, or maybe calculated by a CSS pre-processor. No human typed that. There\u0026#39;s nothing to gain by adding a rounding operation. There\u0026#39;s nothing truly \u003cem\u003ewrong\u003c/em\u003e with that line of code.\u003c/p\u003e\n\u003cp\u003eBut I can\u0026#39;t help but think about the comedic value in controlling your page layout down to sub-sub-sub-sub-sub-sub-sub-sub-pixel precision. This code will continue to have pixel accuracy out to screens with quadrillions of pixels, making it incredibly future proof.\u003c/p\u003e\n\u003cp\u003eIt\u0026#39;s made extra funny by calling the video player \u003ccode\u003eVHS\u003c/code\u003e and suggesting the appropriate ratio is 560 pixels by 320- which is not \u003cem\u003equite\u003c/em\u003e 16:9, but is a frequent letterbox ratio on DVD prints of movies.\u003c/p\u003e\n\u003cp\u003eIn any case, I eagerly await a 20-zetta-pixel displays, so I can read the news in its intended glory.\u003c/p\u003e\n\u003c!-- Easy Reader Version: I bet the person responsible has memorized all the digits of pi --\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":"Take a Percentage","RssTitle":"CodeSOD: Take a Percentage","CachedCommentCount":19,"LastCommentDate":"\/Date(1775823555167)\/","LastCommentDateDescription":"2026-04-10","DiscourseTopicId":null,"DiscourseTopicOpened":false,"PublishedDate":"\/Date(1775716200000)\/","ISODate":"2026-04-09","DisplayDate":"2026-04-09","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/take-a-percentage","CommentsUrl":"https://thedailywtf.com/articles/comments/take-a-percentage","Slug":"take-a-percentage","TwitterUrl":"//www.twitter.com/home?status=https%3a%2f%2fthedailywtf.com%2farticles%2ftake-a-percentage+-+Take+a+Percentage+-+The+Daily+WTF","FacebookUrl":"//www.facebook.com/sharer.php?u=https%3a%2f%2fthedailywtf.com%2farticles%2ftake-a-percentage\u0026t=Take+a+Percentage+-+The+Daily+WTF","EmailUrl":"mailto:%20?subject=Check%20out%20this%20article%20on%20The%20Daily%20WTF...\u0026body=Take%20a%20Percentage:%20https://thedailywtf.com/articles/take-a-percentage","GooglePlusUrl":"//plus.google.com/share?url=https%3a%2f%2fthedailywtf.com%2farticles%2ftake-a-percentage","PreviousArticleId":11156,"PreviousArticleTitle":"Two Conversions","PreviousArticleSlug":"two-conversions","PreviousArticleUrl":"//thedailywtf.com/articles/two-conversions","NextArticleId":11159,"NextArticleTitle":"Youth is Wasted on the Junge","NextArticleSlug":"youth-is-wasted-on-the-junge","NextArticleUrl":"//thedailywtf.com/articles/youth-is-wasted-on-the-junge"}]