Click here to Skip to main content
15,898,588 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
RantRe: VB 6 Pin
Thomas Eyde4-Sep-10 10:38
Thomas Eyde4-Sep-10 10:38 
GeneralRe: VB 6 Pin
OriginalGriff4-Sep-10 10:43
mveOriginalGriff4-Sep-10 10:43 
GeneralRe: VB 6 Pin
Thomas Eyde4-Sep-10 13:49
Thomas Eyde4-Sep-10 13:49 
GeneralRe: VB 6 Pin
OriginalGriff4-Sep-10 21:25
mveOriginalGriff4-Sep-10 21:25 
GeneralRe: VB 6 Pin
Richard A. Dalton6-Sep-10 1:43
Richard A. Dalton6-Sep-10 1:43 
GeneralRe: VB 6 Pin
OriginalGriff6-Sep-10 1:58
mveOriginalGriff6-Sep-10 1:58 
GeneralRe: VB 6 Pin
Richard A. Dalton6-Sep-10 2:17
Richard A. Dalton6-Sep-10 2:17 
GeneralRe: VB 6 Pin
leonej_dt1-Sep-10 12:49
leonej_dt1-Sep-10 12:49 
3. VB has an integer division operator: 9 \ 4 returns 2, not 2.25.

4. Propagating the null value in expressions is correct. Technically, there is a difference between
Dim a As Variant
a = long_expression_possibly_returning_null
If a = True Then
some_code
Else
more_code
End If

and
Dim a As Variant
a = long_expression_possibly_returning_null
If a = True Then
some_code
ElseIf a = False Then
more_code
End If

And the difference consists on how the program handles the case in which a Is Null.

Still, I agree that VB is a very horrible language:

1. Default ByRef parameters? What were VB designers smoking?
2. No support for object-oriented programming would have been better than the weak support VB offers.
3. Weak support for value data types, which does not include operator overloading. (Java is guilty of this as well.)
4. Fairly common data structures such as collections and dictionaries are a mess.
5. Even more common Generic data structures such as stacks, queues and trees are simply not supported. And there is no clean, efficient way to implement them.
6. The only way to take full advantage of the power of the Win32 API is use gross hacks à la Bruce McKinney's Hardcore Visual Basic, aka, C (not even C++!) programming in VB.
If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

GeneralRe: VB 6 Pin
Kirk21129-Sep-10 8:41
Kirk21129-Sep-10 8:41 
GeneralRe: VB 6 PinPopular
xperroni1-Sep-10 4:24
xperroni1-Sep-10 4:24 
GeneralRe: VB 6 Pin
Fabio Franco1-Sep-10 5:05
professionalFabio Franco1-Sep-10 5:05 
GeneralRe: VB 6 Pin
Bigdeak10-Sep-10 1:56
Bigdeak10-Sep-10 1:56 
GeneralRe: VB 6 Pin
Fabio Franco10-Sep-10 2:03
professionalFabio Franco10-Sep-10 2:03 
GeneralRe: VB 6 Pin
M i s t e r L i s t e r1-Sep-10 5:54
M i s t e r L i s t e r1-Sep-10 5:54 
GeneralRe: VB 6 Pin
bwallan1-Sep-10 8:08
bwallan1-Sep-10 8:08 
GeneralRe: VB 6 Pin
JasonPSage1-Sep-10 8:37
JasonPSage1-Sep-10 8:37 
GeneralRe: VB 6 Pin
Max Peck2-Sep-10 4:05
Max Peck2-Sep-10 4:05 
GeneralRe: VB 6 Pin
Matt McGuire1-Sep-10 13:15
professionalMatt McGuire1-Sep-10 13:15 
GeneralRe: VB 6 Pin
Lutosław1-Sep-10 20:25
Lutosław1-Sep-10 20:25 
GeneralRe: VB 6 Pin
cwp423-Sep-10 1:38
cwp423-Sep-10 1:38 
General558 Lines Of QuickBasic Glory PinPopular
AspDotNetDev25-Aug-10 21:29
protectorAspDotNetDev25-Aug-10 21:29 
GeneralRe: 558 Lines Of QuickBasic Glory Pin
Kevin Drzycimski25-Aug-10 22:22
Kevin Drzycimski25-Aug-10 22:22 
GeneralRe: 558 Lines Of QuickBasic Glory Pin
AspDotNetDev26-Aug-10 10:48
protectorAspDotNetDev26-Aug-10 10:48 
GeneralRe: 558 Lines Of QuickBasic Glory Pin
CDP180226-Aug-10 0:50
CDP180226-Aug-10 0:50 
GeneralRe: 558 Lines Of QuickBasic Glory PinPopular
Ian Shlasko26-Aug-10 2:57
Ian Shlasko26-Aug-10 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.