expletive inserted Does cursing make you feel better?

My Own Personal DailyWTF

If you work in tech, and you glean humor from the peril of other people’s interactions with incompetence, you’ve probably seen http://thedailywtf.com/. Go on, take a look. It’s pretty good stuff. In my “pay the bills” job, I run into so many WTFs that it has become almost devoid of humor for me. Here’s one shining example from today.

Function AddFieldA(ColVal)

sStringOut = ""s = ColVal

If Len(s) > 1 ThenFor i = 1 To Len(s)  If Mid(s, i, 1) = Chr(34) Then     sStringOut = sStringOut + Chr(39) + Chr(39)  Else     If Mid(s, i, 1) <> Chr(0) Then        sStringOut = sStringOut + Mid(s, i, 1)     End If     If Mid(s, i, 1) = Chr(39) Then        sStringOut = sStringOut + Mid(s, i, 1)     End If  End IfNextAddFieldA = "'" & sStringOut & "',"ElseAddFieldA = "'',"End If

End Function

If anyone has any idea what the hell this means, please leave a comment below. Don’t get me wrong, I’ve figured out what this monstrosity does (not that it actually works correctly anyhow), but if anyone can enlighten me as to why the author would not use simple functions like

Replace()

and

Instr()

, I’d love to hear it. In case you were wondering, this lively catch was written by a HPC (Highly Paid Consultant) bringing in over $200K/year. I clearly don’t know how to lie well enough.