I didn't really think that people like this existed . . .
-
I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!
If intColumnnum = 1 Then
crDField(pcounter).Width = 2475
crDField(pcounter).Left = 240
intColumnwidth3 = 2475 + 240
intColumnwidth3 = intColumnwidth3 + 60
Else
If intColumnnum = 2 Then
crDField(pcounter).Width = 990
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 990 + 60
Else
*SNIP*
If intColumnnum = 38 Then
crDField(pcounter).Width = 2400
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 2400 + 60
End If*37 more End Ifs*
-
I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!
If intColumnnum = 1 Then
crDField(pcounter).Width = 2475
crDField(pcounter).Left = 240
intColumnwidth3 = 2475 + 240
intColumnwidth3 = intColumnwidth3 + 60
Else
If intColumnnum = 2 Then
crDField(pcounter).Width = 990
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 990 + 60
Else
*SNIP*
If intColumnnum = 38 Then
crDField(pcounter).Width = 2400
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 2400 + 60
End If*37 more End Ifs*
Why does the choice of language here not surprise me..
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
-
Why does the choice of language here not surprise me..
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
I think I have said before, its not the language that's at fault, its the ability of the developer in question that wrote these lines of code! You could do exactly the same thing in any programming language.. However unfortunately the fact is that most developers of a questionable ability develop in that language!
-
I think I have said before, its not the language that's at fault, its the ability of the developer in question that wrote these lines of code! You could do exactly the same thing in any programming language.. However unfortunately the fact is that most developers of a questionable ability develop in that language!
I agree it is not the language. I think that
Visual Basic
was a marketing trap: the appealing smoothness of its learning step made it be considered the language for all, hence many, many people became at once programmers, very poor programmers, in fact. I know (few) skilled guys usingVB6
and also a bunch of pretty weirdC++
coders. Another reason maybe that, usually, skilled people like to challenge themselves with more complex (and powerful) languages, leavingVB
to less skilled ones. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
I agree it is not the language. I think that
Visual Basic
was a marketing trap: the appealing smoothness of its learning step made it be considered the language for all, hence many, many people became at once programmers, very poor programmers, in fact. I know (few) skilled guys usingVB6
and also a bunch of pretty weirdC++
coders. Another reason maybe that, usually, skilled people like to challenge themselves with more complex (and powerful) languages, leavingVB
to less skilled ones. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]I know C# and VB, I have tended to code in the past using VB, but I do use the language properly and make use of all the features available. I do agree VB Was marketted as the language for all, unfortunately it has caused a minority (slowly becoming a majority) to market themselves as professional programmers when they are nothing more than hobbyists, and this reflects in the quality of code produced. I always ensure Option Strict is turned on when programming ;-) but again if VB was a proper language it should never allow you to turn it off! I have seen too many coding horrors where it has been turned off due to programmer laziness. VB used to offer many advantages (disadvantage?) in being able to create applications quickly but this is being eroded by the likes of C# and other contempary languages. I am planning to move more of my development over to C# over the coming months and migrate legacy systems as and when required, mainly as I want my internal team to code properly!
-
I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!
If intColumnnum = 1 Then
crDField(pcounter).Width = 2475
crDField(pcounter).Left = 240
intColumnwidth3 = 2475 + 240
intColumnwidth3 = intColumnwidth3 + 60
Else
If intColumnnum = 2 Then
crDField(pcounter).Width = 990
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 990 + 60
Else
*SNIP*
If intColumnnum = 38 Then
crDField(pcounter).Width = 2400
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 2400 + 60
End If*37 more End Ifs*
:wtf: ( pretty much sums it up for me )
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
-
I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!
If intColumnnum = 1 Then
crDField(pcounter).Width = 2475
crDField(pcounter).Left = 240
intColumnwidth3 = 2475 + 240
intColumnwidth3 = intColumnwidth3 + 60
Else
If intColumnnum = 2 Then
crDField(pcounter).Width = 990
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 990 + 60
Else
*SNIP*
If intColumnnum = 38 Then
crDField(pcounter).Width = 2400
crDField(pcounter).Left = intColumnwidth3
intColumnwidth3 = intColumnwidth3 + 2400 + 60
End If*37 more End Ifs*
It depends what the life of the code is indended. If it was a short term piece of interim code then perhaps it might be justifiable (perhaps even on performance grounds)