Click here to Skip to main content
15,917,005 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.

 
GeneralRe: VB 6 Pin
Chris Trelawny-Ross31-Aug-10 4:05
Chris Trelawny-Ross31-Aug-10 4:05 
GeneralRe: VB 6 PinPopular
Richard A. Dalton31-Aug-10 0:15
Richard A. Dalton31-Aug-10 0:15 
JokeRe: VB 6 Pin
Chris Meech31-Aug-10 8:37
Chris Meech31-Aug-10 8:37 
GeneralRe: VB 6 Pin
Rob Grainger31-Aug-10 22:37
Rob Grainger31-Aug-10 22:37 
GeneralRe: VB 6 Pin
jmoralesv1-Sep-10 17:14
professionaljmoralesv1-Sep-10 17:14 
GeneralRe: VB 6 Pin
Lutosław31-Aug-10 22:28
Lutosław31-Aug-10 22:28 
GeneralRe: VB 6 Pin
Rob Grainger31-Aug-10 22:59
Rob Grainger31-Aug-10 22:59 
GeneralRe: VB 6 Pin
sergiogarcianinja1-Sep-10 7:00
sergiogarcianinja1-Sep-10 7:00 
Rob,

You should consider more two VB features:

8. Automatic type conversions like:
VB
Dim a As Integer = "1"


9. Not assigment or type checking at compile type:
VB
Dim c As Object

Select Case c
    Case 1
        ' do something 1
    Case "horror"
        ' its really bad
    Case Color.Green
        ' its even worst
End Select


This code generates a warning for use of c before its assignment, a incredible error, because it will never run. And it happens in modern VB.Net versions.

---

We could assume that you like VB and we could accept it. Every programmer have your "perfect" language and consider it best as no one other.

I know VB since version 5.0 and even today I use this language in a lot of legacy projects, but never in a new project.

I know a lot of other languages (C, C++, C#, Python, Perl, PHP, Javascript, Bash, Java, Delphi) and each time I will start a new project, I never consider VB, because its problems.

Fact is Basic and VB are extremely easy to start programming but they "easiness" are really complicated for the real programmer. A real programmer should be able to run a program and it need to be deterministic. Same input, same output.

Some time a go, a friend mine was asking why a simple sum operation became wrong. She was using ASP 3.0, which uses VBScript, and 1 + 1 are equal to 11. As I saw that, I told her, perfect normal, what was you expecting? I told her simple to type her variables Dim a As Integer = 1, problem solved.

As me, and probably you, use VB along time both of us know that its evolution is really impressive. In version 5 and 6 its is a really poor in resource for type checking and compile time checking. Today it is more impressive, today 1 + 1 is really 2.

The easiness of VB 1, 2, 3, 4, 5 and we can consider version 6 to create and deploy windows applications are amazing, because your RAD and "good" (for the time) IDE.

Even with creation of Delphi, VB had evangelized his people.

But again, today, we can consider VB a good choice in real big and important projects. Project which requires use of good patterns, use o interfaces, a lot of modules, etc. VB can't handle this.

But again, it's my opinion. I consider VB a easy language not a good one.
GeneralRe: VB 6 Pin
Rob Grainger1-Sep-10 22:11
Rob Grainger1-Sep-10 22:11 
GeneralRe: VB 6 Pin
edmurphy991-Sep-10 7:29
edmurphy991-Sep-10 7:29 
GeneralRe: VB 6 Pin
OriginalGriff1-Sep-10 8:13
mveOriginalGriff1-Sep-10 8:13 
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 
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 

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.