Comment On objDocument.SetDocumentIndex = "WTF"

It seems that I have a few more submissions that days in the week, so I'll try to post in the evening (or early AM, as it may be) when I can. But of course, don't let that discourage you from sending in your WTF moments. [expand full text]
« PrevPage 1Next »

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 02:36 • by tom_
confusion is the key!

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 04:40 • by Paul Hill
I love the way they eat *any* exception, rather than what .FindByValue returns. Mmmm.... silently failing code....

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 06:23 • by Factory
To get the most out of this blog it seems working knowledge of VB and SQL are really needed.
I have also realized that I never want to use VB or SQL, ever.

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 08:16 • by Tony
Since this guy broke the mold I figure I can finally implement this code:

Public Function IsIntBob(value as Integer) as Boolean
If ctype(ctype(value, Double), String) = "Bob" Then
Return True
Else
Return False
End if
End Function

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 12:39 • by Alex Papadimoulis
Tony, that is hysterical.

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 13:40 • by (Anonymous)
But Tony, shouldn't you surround that with a Try…Catch, just in case there's an InvalidCastException?

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 15:03 • by Aiax
If you would like to see more examples, just let me know. I've spent months replacing code like this from this particular colleague and since I use source control, I can always go back into history and find some code for a good laugh now and then.

re: objDocument.SetDocumentIndex = "WTF"

2004-08-03 15:49 • by Eric Newton
Hey, I wonder if a few lines down, we see:

Public Readonly Property GetDocumentIndex() as Int32
Get
return ddlDocument.SelectedIndex
End Get
End Property

re: objDocument.SetDocumentIndex = "WTF"

2004-08-10 10:30 • by anon
Oh thats nothing. How about this?

Public ReadOnly Property GetProduction(ByVal vType As eProductionType) As String
Get
Dim oDataView As DataView
Select Case vType
Case eProductionType.Projected
Return FormatOrderAmount(SelectedGroup.ProjectedProduction)
Case eProductionType.OnHold
Return FormatOrderAmount(SelectedGroup.OnHoldOrderTotal)
Case eProductionType.Potential
Return FormatOrderAmount(SelectedGroup.PotentialProduction)
End Select
End Get
End Property

A parameterized read only property named with a Get prefix! I'm at a loss for words.

re: objDocument.SetDocumentIndex = "WTF"

2004-08-10 10:37 • by anon
I like to call the above pattern an "Propenumtion". It use an enum and a paramterized property that to all others looks like a function.
« PrevPage 1Next »

Add Comment