• (cs)

    Last! (Unlikely.)

  • (cs)
    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.

  • (cs) in reply to Bus Raker

    Could've been worse - it could have been buried with cursors for each stored proc that handled each of the tmp tables...

  • (cs) 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.

    This ain't because of the tool, it's because of The Tool (developer)

  • Runtime Error (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.



    I'm sure the person that wrote that would be able to write absolute crap in any programming language.
  • Agamous Child (unregistered)

    The words "huge favor" are code for "what we hired you for."

    CAPTCHA:stfu

    How do you NOT include the original message? Frist time poster, long time lurker...

  • (cs) in reply to Agamous Child

    Internet jesus wept.

    "Heya Francesco, We-a need you for theese-a job! The last-a pro-a grammer, he-a wears a lotsa concrete footawear!" [image]

  • (cs)
    Alex Papadimoulis:
    'ED: mySecondFunction_3, superfluousParameter
    Public Function miaFunzioneSecondo_3(superfluoParametro As Variant)
    
    So, the comments were all directly from the babelfish?
    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>
    <FONT color=#000000>And whats up with all variants and no error handling?  </FONT>
    <FONT color=#000000>There's got to be double digit WTFs here!</FONT>
  • (cs)
    Alex Papadimoulis:

    'ED: mySecondFunction_3, superfluousParameter
    Public Function miaFunzioneSecondo_3(superfluoParametro As Variant)

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

    grouppo1 = ScoprireGrouppo1(m_idA) 'ED: FindGroup grouppo2 = ScoprireGrouppo1(m_idB) grouppo3 = ScoprireGrouppo2(m_idC)

    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

    End Function



    I like how he sets a variable of his name to true so that he can debug other parts of his program that depend upon the output of this function.... Ok, so I don't LIKE it, but at least it's obvious enough so that it can't be considered THAT BAD of a wtf (still bad tho, and the rest is HORRENDOUS!).  lol... At least let's just hope that's what he was doing lol....I'd really like to see the other 6000 lines of the query though lol... bheh... lol...

    On a side note: looks like we are back to pretty decent, and not abstract WTFs!

    P.S. No, I don't blame VB on this one, I blame the developer. Even VB programmers have better design than this lol.

  • packrat (unregistered) in reply to JBL

    JBL:
    Last! (Unlikely.)

    lol

  • packrat (unregistered) in reply to packrat

    JBL:
    Last! (Unlikely.)

    lol

    A few months ago, the person in the cube next to mine had a similar problem. He needed someone to make a few changes to a PowerBuilder application. He was stuck trying to use a coder we all call Hammer ( for what he did to our baseline) . Hammer made the changes and used all default computer generated variable names. The data window was used by many parts of the application and was basically unuseable.

    CAPTCHA=perfection

    priceless!

  • (cs)
    Alex Papadimoulis:

    'ED: mySecondFunction_3, superfluousParameter
    Public Function miaFunzioneSecondo_3(superfluoParametro As Variant)

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

      grouppo1 = ScoprireGrouppo1(m_idA) 'ED: FindGroup
      grouppo2 = ScoprireGrouppo1(m_idB)
      grouppo3 = ScoprireGrouppo2(m_idC)

      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

    End Function

    ...

    Ln 6271, Col 1


    <FONT face=Tahoma>Now that's genuine WTF...

    And what's wrong with the temp table lmmtj1MancaAllPubb that it needs to be commented? Why drop lmmtj8MancaAllPubb twice? Where's lmmtj3MancaAllPubb and lmmtj4MancaAllPubb? Oh my head...



    </FONT>
  • (cs)

    and eleven different projects named NewProject1 through NewProject17.


    Shouldn't this be NewProject1 through NewProject11?

  • (cs)
    Alex Papadimoulis:
    and eleven different projects named NewProject1 through NewProject17.

    What happened to the other 5 projects?

  • Bob Smith (unregistered) in reply to PCBiz
    PCBiz:
    and eleven different projects named NewProject1 through NewProject17.


    Shouldn't this be NewProject1 through NewProject11?


    duh, in italy, there are no numbers 4 through 9
  • Bob Smith (unregistered) in reply to DigitalLogic
    DigitalLogic:
    Alex Papadimoulis:
    and eleven different projects named NewProject1 through NewProject17.

    What happened to the other 5 projects?



    you mean 6

  • (cs) in reply to DigitalLogic
    DigitalLogic:
    Alex Papadimoulis:
    and eleven different projects named NewProject1 through NewProject17.

    What happened to the other 5 projects?



    The other 5 obviously never made it into production, so they never integrated them into the NewProjectXX framework. They're probably out there, and they probably still have whatever crappy default name they had when they were created.

    Wait...

  • (cs) in reply to John Bigboote

    Or maybe Antony took them with him.....  Job Security.

  • (cs)

    Or maybe some people drove into their business in three different mini coopers and stole the other 6 projects.  After all this is "The Italian Job"

  • Anonymous (unregistered)
    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


    Now I learned VB but it seems to me that miaFunzioneSecondo_3 will always equal to 1 after going through the above code. wtf???

    Maybe I'm not seeing it properly, I'll place the code on a wooden table and.....

  • Anonymous (unregistered) in reply to Anonymous

    I meant to say Ia neve learnde to speaka ina V-a B-a

  • Bob Smith (unregistered) in reply to Anonymous
    Anonymous:
    I meant to say Ia neve learnde to speaka ina V-a B-a


    or to type English for that matter
  • (cs)

    Did I miss the part where "antony" is ever set to true? I'm guessing no.

  • (cs) in reply to Anonymous
    Anonymous:
    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


    Now I learned VB but it seems to me that miaFunzioneSecondo_3 will always equal to 1 after going through the above code. wtf???

    Maybe I'm not seeing it properly, I'll place the code on a wooden table and.....

    Only if 'antony' is set to True.

  • (cs) in reply to OneMHz
    OneMHz:
    Did I miss the part where "antony" is ever set to true? I'm guessing no.


    No. That's some godawful global or modular-level variable.
  • PatMetheny (unregistered) in reply to PCBiz

    PCBiz:
    and eleven different projects named NewProject1 through NewProject17.

    It's quite obvious. The projects were as follows:

    1) NewProject1

    2) NewProject2.6

    3) NewProect4.2

    4) NewProject5.8

    5) NewProject7.4

    6) NewProject9

    7) NewProject10.6

    8) NewProject12.2

    9) NewProject13.8

    10) NewProject15.4

    11) NewProject17

     

  • (cs)
    Alex Papadimoulis:


    <FONT color=#0000ff></FONT>[image]

    And thank god they didn't drop table #lmmtj1ManacaAllPubb ... then the procedure would crash.

     

     

  • (cs) in reply to PatMetheny
    Anonymous:

    PCBiz:
    and eleven different projects named NewProject1 through NewProject17.

    It's quite obvious. The projects were as follows:

    1) NewProject1

    2) NewProject2.6

    3) NewProect4.2

    4) NewProject5.8

    5) NewProject7.4

    6) NewProject9

    7) NewProject10.6

    8) NewProject12.2

    9) NewProject13.8

    10) NewProject15.4

    11) NewProject17

    I like folks who think outside the box...

  • Yaytay (unregistered) in reply to GoatCheez

    GoatCheez:

    P.S. No, I don't blame VB on this one, I blame the developer. Even VB programmers have better design than this lol.

    I blame VB for encouraging people to use typeless variables - who knows what grouppo1-3 are?

    Variants suck (in anything other than a <100 line script).

    But I like the parameter name.

     

    I bet there was a lovely On Error statement somewhere - how about a special WTF dedicated to error handling?

  • (cs)

    Did Francesco exclaim "MI SCUZI!" when he learned that Antony was also "Brillant"?

  • AhnfeltVB2k (unregistered) in reply to Runtime Error
    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.

    CAPTCHA: billgates
  • (cs) in reply to Yaytay
    Anonymous:

     

    I bet there was a lovely On Error statement somewhere - how about a special WTF dedicated to error handling?



    I discovered, in our code, an error handler that sent an e-mail to our group notifying us of the error.

    This would not normally be a bad thing, but it was in a CATCH block that caught errors in sending an e-mail.
  • Krane (unregistered) in reply to Bus Raker
    Bus Raker:

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

    Some questionnaire:
    - What do you think will be the next big thing in computer programming? X-oriented programming, y language, quantum computers, what?
    Linus Torvalds:
    I don’t think we’ll see a „big jump”. We’ve seen a lot of tools to help make all the everyday drudgery easier - with high-level languages and perhaps the integration of simple databases into the language being the main ones. But most of the buzz-words have been of pretty limited use.

    For example, I personally believe that „Visual Basic” did more for programming than „Object-Oriented Languages” did.

    Pretty sure you didn't saw that coming ;)

  • StupidPeopleTrick (unregistered) in reply to GoatCheez
    GoatCheez:
    Alex Papadimoulis:



    can't be considered THAT BAD of a wtf (still bad tho, and the rest is HORRENDOUS!). 

    My poor friend, you have been reading too many of these.  I fear that you have lost sensitivity.  There must be a 12 step program for such ailments.  Bottles or cans will do...<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    My question to you all is this?  How do you gracefully get out of these ‘welcome to hell’ type jobs?  I am in the middle of one right now…<o:p></o:p>

     

  • (cs)

    If you see 11 different projects, named form 1 to 17, then maybe there are also some, not-so-different projects. A safety copy, perhaps. As to the function presented, it's obvious that the aim of that function is to find the duplicated value - so it might be used to find those copies. I must admit that using 'Or debug_please_work' technique is not new to me. However, I'd rather not use my name for that purpose - it could annoy the compiler/debugger and in such a moments you'd prefer to calm the beast. The thing that bugz me is...if the script deletes some tables...than it's probably they were used during The Process, but the only process that I've learned about so far, that requires so much "Foto"s, requires also a special kind of tables...wooden

  • an user (unregistered) in reply to Bus Raker

    How can this query ever run?

  • (cs) in reply to StupidPeopleTrick
    Anonymous:

    <o:p></o:p>

    My question to you all is this?  How do you gracefully get out of these ‘welcome to hell’ type jobs?  I am in the middle of one right now…<o:p></o:p>

     



    You can really only fake your own death about once a decade before the authorities start to get wise.
  • StupidPeopleTrick (unregistered) in reply to John Bigboote

    and believe it or not, my situation is with a system that is 'new' and designed like this wtf.... 

    load, aim at foot, pull trigger...

    -SPT

  • Gareth (unregistered)

    Obviously the key to the whole procedure is in this line

    Alex Papadimoulis:

      Dim antony
    
  • deltreme (unregistered) in reply to Gareth

    I bet Antony = true when he's back from his honeymoon

  • rerun (unregistered) in reply to Bus Raker
    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

    I haven't seen anyone point out that setting antony=true will always get the first result (miaFunzioneSecondo_3 = 1). You'll never fall through to the elseif's, so why did he bother including the other "Or (antony = True)" statements?

    captcha : you have been eaten by a grue :)

  • rerun (unregistered) in reply to rerun

    oops, just found where Carnildo noticed this... carry on!

  • (cs) in reply to John Bigboote
    John Bigboote:
    Anonymous:

    <?xml:namespace prefix = o /><o:p></o:p>

    My question to you all is this?  How do you gracefully get out of these ‘welcome to hell’ type jobs?  I am in the middle of one right now…<o:p></o:p>

     



    You can really only fake your own death about once a decade before the authorities start to get wise.

    Well,  we know one trick that works... get married.  Re-marry if need be.

  • (cs) in reply to rerun

    <font face="Courier New">goggles:
        db 90h
        jmp goggles
    </font>

  • Hardcore Rhymer (unregistered) in reply to olsner
    olsner:
    <font face="Courier New">goggles:
        db 90h
        jmp goggles
    </font>
    "Up jumps da boogie, boogie jumps me"
    - timbaland & magoo
  • (cs)

    <FONT face=Tahoma>thatsa spicy meataball!</FONT>

    <FONT face=Tahoma></FONT> 

    <FONT face=Tahoma>lol, had to...</FONT>

  • SP (unregistered)

    So it seems that Francesco is getting f**ed  at work while Antony is getting f**ed on his honeymoon.

  • 4tehwin!!! (unregistered)

    see, if only you all spoke italian, you would realize 'lmmt' makes the entire program make sense....

  • Andy (unregistered)

    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.

  • heo (unregistered) in reply to 4tehwin!!!
    Anonymous:
    see, if only you all spoke italian, you would realize 'lmmt' makes the entire program make sense....

    ...explain

Leave a comment on “The Italian Job”

Log In or post as a guest

Replying to comment #:

« Return to Article