• anonymous (unregistered)

    I think Antony mean "debug mode"

    <font face="Courier New">getUser() = "developper"  ==> debug mode</font>

    but here "developper" = "Antony" so...
    <font face="Courier New">
    User = "Antony" ==> debug mode</font>

    And the result:

    <font color="#000000" face="Courier New">Antony  ==> debug mode

    </font>A better idea would be:<font color="#000000" face="Courier New">

    Debug ==> debug mode
    </font>

  • Mario (unregistered) in reply to AhnfeltVB2k

    Anonymous:
    Indeed, vb is a great language. It just makes more sense! Just consider this:
    If VB Is Nothing Then
    compared to  if(VB == null)
    Set VB = VB.next
    compared to VB = VB.next
    Do While Not VB.next Is Head
    compared to while(VB.next != head)

    It's much closer to natural language, and I think it really is the way to go. I think an improvement would be Set VB To VB Dot Next and Do As Long As Not VB Dot Next Is The Head Of A List. Especially "The" and "A" is missing from most languages, giving them a childish apperance.

    CAPTCHA: billgates

    If you like natural language in programming languages, you should see COBOL!

  • Me (unregistered) in reply to 4tehwin!!!

    I'm italian but still I don't get "lmmt"... ?

  • Martijn (unregistered)
    Alex Papadimoulis:

      Dim antony, gruppo1, gruppo2, gruppo3 'ED: group

    Didn't anybody notice the variable are declared as "gruppo", but named "grouppo" throughout the code? Is this some creative editing by the poster? Wouldn't be fair to judge code which was modified to look worse than it actually is.

    Anyway, looking at all the examples given on this site, I'm quite happy I've never even touched VB.

     

    [Note from Alex: I've fixed this; it was an anonymization typo]

  • StarLite (unregistered)
    									Drop database;<br>Fire developer;<br>GO<br><br>:P<br><br>yes, this time I DID post it in the right topic ;)<br>
    
  • Jens (unregistered) in reply to anonymous

    Even though "antony" is a bad name for a variable, it is so bad, that any sane reader can guess what it does.
    Think of naming the variable "bIgnoreGroupMode" and you would be left wondering, whether ignoring the groups is a feature, a bug or some debugging code.

    Just for my curiosity: Does VB6 support aspects, so that one can make debug functions an aspect of the regular function?

  • (cs) in reply to Jens

    Holy crap...this is exactly the sort of code that a comment from a former colleague brings to mind.  We were discussing coding standards, and I was of the opinion that they're a good thing because even the most technicaly proficient coders have a habbit of writting unreadable code, that may have to be fixed or altered by somebody else.

    His only defense against coding standards was that writting code any way a programmer wanted guaranteed "job security" and this was more important that anything else.  So, I'm guessing this guys was thinking the same thing... "heck, anybody could do this, better make sure I'm indespensable by making the code as unreadable as possible".


  • maht (unregistered)

    antony = True
    ' set this here to force miaFunzioneSecondo_3 = 1
    If (grouppo1 = grouppo3) Or (antony = True) Then
    miaFunzioneSecondo_3 = 1

    antony = True
    ' set this here to force miaFunzioneSecondo_3 = 3

    ElseIf (grouppo2 = grouppo3) Or (antony = True) Then
    miaFunzioneSecondo_3 = 3

    antony = True
    ' set this here to force miaFunzioneSecondo_3 = 2

    ElseIf (grouppo1 = grouppo2) Or (antony = True) Then
    miaFunzioneSecondo_3 = 2
    End If



    ' though as it is a wtf one cannot say why not just set it here

    miaFunzioneSecondo_3 = whatever


  • Mike Woodhouse (unregistered) in reply to SP

    One would hope that Antony gets f**ed when he gets back to work, but the probability is that things will just carry on as before ("we need him because he's the only one able to keep the system going").

    Which is sad for both the company and Antony, who clearly suffers from an acute case of code-blindness and should be moved into a role completely unrelated to computers (goatherding?) as quickly as possible for both his own and his company's benefit.

    Actually, Italian employment law is such that he'll probably get promoted to Architect.

  • jim (unregistered) in reply to Runtime Error
    Anonymous:

    Bus Raker:

    How long until the first anti-VB comment?  I guess 3 posts.



    I'm sure the person that wrote that would be able to write absolute crap in any programming language.


    Real WTF Programmers can write Visual Basic in any language ;)
  • (cs) in reply to Andy
    I have pretty much respect for people like Francesco because they have the perseverance to hunt down 6271 lines of code in a stored procedure just to find out that their colleague obviously is an idiot.


    lol,
    say that to my IT manager.

    The trick here is that that Stored P. is a huge T-SQL  IF divided in 3 specular pieces, one for every period of 4 months in the year(quadrimestre?) Jannuary-April, May-August ecc.

    The vb snippet here is only an example, it's not a real piece of code, couse i've found only 4 or 5 functions in the Projects that are less of 40 lines ...the rest is 150 or bigger.

    Francesco.

  • valerion (unregistered) in reply to Vaitrafra
    Dim antony


    Truer words have never been spoken.
  • (cs) in reply to Martijn
    Anonymous:
    Alex Papadimoulis:

      Dim antony, gruppo1, gruppo2, gruppo3 'ED: group

    Didn't anybody notice the variable are declared as "gruppo", but named "grouppo" throughout the code? Is this some creative editing by the poster? Wouldn't be fair to judge code which was modified to look worse than it actually is.

    Anyway, looking at all the examples given on this site, I'm quite happy I've never even touched VB.

    Alex anonimizes the posts by changing the variable names or even changes the whole code so it appears to be written on a different programming language. The causes the code to be sometimes wrong because Alex sometimes screws up a name or two, forgets to close a brace, or screws an if conditional that happens to be basic to understand the WTF.

    On more complex functions, he sometimes breaks the code flow, so that the code would no longer execute correctly and it would get stuck into infinite recursion if it was ever compiled and executed, or parts of it would never get reached. This, of course, causes lots of complains and WTF? comments :)

  • Gaz (unregistered) in reply to Enric Naval

    Heh, can't blame an Italian for taking a dive and giving up in this case.

  • Acrobatic Monkey (unregistered)

    Wow, the arrow has such a fancy shadow!

  • Erik (unregistered) in reply to snoofle

    Can't it always be worse?

  • Profpylons (unregistered) in reply to rusty
    rusty:
    /snip

    His only defense against coding standards was that writting code any way a programmer wanted guaranteed "job security" and this was more important that anything else.  So, I'm guessing this guys was thinking the same thing... "heck, anybody could do this, better make sure I'm indespensable by making the code as unreadable as possible".


    I don't know about anyone else, but having this attitude on my team is one good way for "Job Security" to evaporate very quickly...


  • (cs)

    Famous last words...

  • (cs)

    You're only supposed to <font face="Courier New">ALTER TABLE truck DROP COLUMN doors</font>!

  • anonymous (unregistered) in reply to Acrobatic Monkey
    Anonymous:
    Wow, the arrow has such a fancy shadow!


    But the font is not antialised, and is a serif font. Seems very readable anyway. Maybe because the capital leeters soo big.
    The 3D buttons looks like Windows ME or 2000, maybe ME. And thats the Real WTF, there are people out here that use Windows ME.  (W98SE or 2000 will be a better option).
  • sazoo (unregistered) in reply to pfy

    pfy:
    You're only supposed to <FONT face="Courier New">ALTER TABLE truck DROP COLUMN doors</FONT>!

     

    LOL!!  Though reading back I'm surprised it took anyone that long!

  • Patrik (unregistered) in reply to maht
    Anonymous:

    antony = True
    ' set this here to force miaFunzioneSecondo_3 = 1

    If (grouppo1 = grouppo3) Or (antony = True) Then
    miaFunzioneSecondo_3 = 1

    antony = True
    ' set this here to force miaFunzioneSecondo_3 = 3

    ElseIf (grouppo2 = grouppo3) Or (antony = True) Then
    miaFunzioneSecondo_3 = 3

    antony = True
    ' set this here to force miaFunzioneSecondo_3 = 2

    ElseIf (grouppo1 = grouppo2) Or (antony = True) Then
    miaFunzioneSecondo_3 = 2
    End If



    ' though as it is a wtf one cannot say why not just set it here

    miaFunzioneSecondo_3 = whatever





    It seems you haven't understood exactly WHY that keyword is named ElseIf.

  • (cs) in reply to rusty

    rusty:
    Holy crap...this is exactly the sort of code that a comment from a former colleague brings to mind.  We were discussing coding standards, and I was of the opinion that they're a good thing because even the most technicaly proficient coders have a habbit of writting unreadable code, that may have to be fixed or altered by somebody else.

    His only defense against coding standards was that writting code any way a programmer wanted guaranteed "job security" and this was more important that anything else.  So, I'm guessing this guys was thinking the same thing... "heck, anybody could do this, better make sure I'm indespensable by making the code as unreadable as possible".

    ISO 9001?  ISO 9001?  We don't need no stinkin' ISO 9001!!

     

  • Tox (unregistered)

    There's a reason Antony's on a honeymoon. Lousy programmers get married; good developers stay coding in the basement and spend time with their imaginary girl friends (preferrably capable of web2.0)

    captcha: truthiness
    indeed

  • BAReFOOt (unregistered) in reply to Gareth

    LOOOOOOOOOL! You made my day! :D

  • BAReFOOt (unregistered) in reply to BAReFOOt
    Anonymous:
    LOOOOOOOOOL! You made my day! :D


    Damit! This was a reply to 84986!! This forum "software" must come straight from paula...
  • (cs) in reply to AhnfeltVB2k
    Anonymous:
    Anonymous:

    Bus Raker:
    Alex Papadimoulis:

    Within them he found hundreds of thousands of lines of VB6 code with no indentation, no comments, meaningless naming, event-handlers calling other event-handlers, and eleven different projects named

    How long until the first anti-VB comment?  I guess 3 posts.



    I'm sure the person that wrote that would be able to write absolute crap in any programming language.


    Indeed, vb is a great language. It just makes more sense! Just consider this:
    If VB Is Nothing Then
    compared to  if(VB == null)
    Set VB = VB.next
    compared to VB = VB.next
    Do While Not VB.next Is Head
    compared to while(VB.next != head)

    It's much closer to natural language, and I think it really is the way to go. I think an improvement would be Set VB To VB Dot Next and Do As Long As Not VB Dot Next Is The Head Of A List. Especially "The" and "A" is missing from most languages, giving them a childish apperance.

    Congratulations! You've just re-invented Applescript!

  • DaveK (unregistered) in reply to Bus Raker
    Bus Raker:
    Alex Papadimoulis:

      If (grouppo1 = grouppo3) Or (antony = True) Then
        miaFunzioneSecondo_3 = 1
      ElseIf (grouppo2 = grouppo3) Or (antony = True) Then
        miaFunzioneSecondo_3 = 3
      ElseIf (grouppo1 = grouppo2) Or (antony = True) Then
        miaFunzioneSecondo_3 = 2
      End If
    
    So, if group 1 = 3 then the 3rd 2nd function = 1
    If group 2 = 3 then the 3rd 2nd function = 3
    And if group 1 = 2 then the 3rd 2nd function = 2
    Guess that covers all three possibilities.  Would have been better written as:
    <font color="#000000">Public Function RockPaperScissors(superfluoParametro As Variant)
    If ("rock" = "scissors") Or (antony = True) Then miaFunzioneSecondo_3 = "rock" ElseIf ("paper" = "scissors") Or (antony = True) Then miaFunzioneSecondo_3 = "scissors" ElseIf ("rock" = "paper") Or (antony = True) Then miaFunzioneSecondo_3 = "paper" End If End Function</font>


      Blimey.  Utter gobsmack time.  Antony may be a lousy coder, but you just made him look like a genius.


      At least he knows what a "variable" is.





      And if anyone else is having difficulty guessing what this function is about, it looks an awful lot to me like a majority function.

  • Gli occhiali di protezione... (unregistered)

    Non fanno niente!

  • NotQuiteReal (unregistered)

    I thought those Europeon employees were pretty job secure w/o the obscurity, however.

  • Hairy Monkey (unregistered) in reply to BAReFOOt
    Anonymous:
    Anonymous:
    LOOOOOOOOOL! You made my day! :D


    Damit! This was a reply to 84986!! This forum "software" must come straight from paula...


    Unlikely! I'm quite sure she was on honeymoon with Antony! A well-matched pair, obviously.

  • (cs) in reply to Hairy Monkey
    Anonymous:
    Anonymous:
    Anonymous:
    LOOOOOOOOOL! You made my day! :D


    Damit! This was a reply to 84986!! This forum "software" must come straight from paula...


    Unlikely! I'm quite sure she was on honeymoon with Antony! A well-matched pair, obviously.


    <font size="6">
    LOL!
    </font>
  • (cs)

    gargh!...

    the scale of it reminds me of 1700 lines of JS form validation written by the boss's son (serious) that I replaced with 180....

    wrestles as with straitjacket

  • Bill gates (unregistered) in reply to Bus Raker
    Bus Raker:
    Alex Papadimoulis:

    Within them he found hundreds of thousands of lines of VB6 code with no indentation, no comments, meaningless naming, event-handlers calling other event-handlers, and eleven different projects named

    How long until the first anti-VB comment?  I guess 3 posts.



    Such venom, on the second post!  Lay your fears to rest ye doomed.  As you can see, posts 3, 4, and 5 included 2 posts from VB apologists.  You'll be fine as long as there are thousands of you idiots.

    Why are you guys so defensive?  Is it because some of you are good enough to realize VB is a terrible language ?  Are you insecure because you're limited to Winblows technology?  Maybe it's just the personality type bullsh*tters need to survive.  I mean seriously, how amiable to criticism can you afford to be when you do drag-and-drop programming? 

    Lets face it, VB is just a giant macro language for the windows GUI.  Arguably useful, but horribly ugly and limited.   ... much like yourselves.

  • (cs) in reply to mnature
    mnature:

    ISO 9001?  ISO 9001?  We don't need no stinkin' ISO 9001!!

    Sorry to hijack the thread to ask a potentially-stupid question, but what's with the ISO 9001 references? I know what ISO 9001 is (I'm the systems admin/programmer for an ISO 9001:2000 certified facility), but is there a WTF related to ISO 9001 that I'm missing?

    Regards,
    Brad Williams
    Northeast Metrology

Leave a comment on “The Italian Job”

Log In or post as a guest

Replying to comment #:

« Return to Article