Comment On The Italian Job

One early Monday morning, Francesco awoke to the sound of his alarm and, instead of slamming the snooze button down, he eagerly jumped out of bed. What else could he do on such a beautiful day? The sky was clear, the sun was shining, the birds were chirping, and he had day three of a brand new job to look forward to. [expand full text]
« PrevPage 1 | Page 2Next »

Re: The Italian Job

2006-08-07 15:02 • by JBL
Last! (Unlikely.)

Re: The Italian Job

2006-08-07 15:02 • by 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.

Re: The Italian Job

2006-08-07 15:04 • by snoofle
84891 in reply to 84890
Could've been worse - it could have been buried with cursors for each stored proc that handled each of the tmp tables...

Re: The Italian Job

2006-08-07 15:05 • by snoofle
84892 in reply to 84890
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)

Re: The Italian Job

2006-08-07 15:06 • by Runtime Error
84893 in reply to 84890

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.

Re: The Italian Job

2006-08-07 15:08 • by dbs
What boggles me is that this thing is probably screamingly common.  Really poor application design hidden behind pretty excel applications, macro generates, and Visual Coffeemaker 'RAD' applications.  The horror is the person that has to come after and maintain it, as is noted here.

But jsut as bad is not the code being maintained, but bogus longwinded transactions like this that no one ever looks at.  "Oh, my SQL Server 2000 is slow!  We have to upgrade to Windows DW (DrainWallet) - that's what Microsoft tells us to do!" - when in fact, stuff like what is listed above is what's happening.

No server, no platform, no tool in the world can compete against incompetent tool users, aka the 'programmers'.

----
dbs
<a href="http://planet-geek.com/">planet-geek.com</a>

Re: The Italian Job

2006-08-07 15:10 • by Agamous Child
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...

Re: The Italian Job

2006-08-07 15:20 • by Volmarias
84897 in reply to 84895
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!"

Re: The Italian Job

2006-08-07 15:21 • by Bus Raker
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:
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
And whats up with all variants and no error handling?  
There's got to be double digit WTFs here!

Re: The Italian Job

2006-08-07 15:23 • by GoatCheez
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.

Re: The Italian Job

2006-08-07 15:26 • by packrat
84900 in reply to 84889

JBL:
Last! (Unlikely.)


lol

Re: The Italian Job

2006-08-07 15:34 • by packrat
84901 in reply to 84900

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!

Re: The Italian Job

2006-08-07 15:34 • by xrT
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


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...



Re: The Italian Job

2006-08-07 15:49 • by PCBiz
and eleven different projects named NewProject1 through NewProject17.


Shouldn't this be NewProject1 through NewProject11?

Re: The Italian Job

2006-08-07 15:50 • by DigitalLogic
Alex Papadimoulis:
and eleven different projects named NewProject1 through NewProject17.


What happened to the other 5 projects?

Re: The Italian Job

2006-08-07 15:53 • by Bob Smith
84908 in reply to 84905
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

Re: The Italian Job

2006-08-07 15:54 • by Bob Smith
84909 in reply to 84906
DigitalLogic:
Alex Papadimoulis:
and eleven different projects named NewProject1 through NewProject17.


What happened to the other 5 projects?


you mean 6

Re: The Italian Job

2006-08-07 15:55 • by John Bigboote
84910 in reply to 84906
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...

Re: The Italian Job

2006-08-07 15:57 • by PCBiz
84911 in reply to 84910
Or maybe Antony took them with him.....  Job Security.

Re: The Italian Job

2006-08-07 16:03 • by PCBiz
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"

Re: The Italian Job

2006-08-07 16:09 • by 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.....

Re: The Italian Job

2006-08-07 16:10 • by Anonymous
84914 in reply to 84913
I meant to say Ia neve learnde to speaka ina V-a B-a

Re: The Italian Job

2006-08-07 16:11 • by Bob Smith
84915 in reply to 84914
Anonymous:
I meant to say Ia neve learnde to speaka ina V-a B-a


or to type English for that matter

Re: The Italian Job

2006-08-07 16:17 • by OneMHz
Did I miss the part where "antony" is ever set to true? I'm guessing no.

Re: The Italian Job

2006-08-07 16:25 • by Carnildo
84917 in reply to 84913
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.

Re: The Italian Job

2006-08-07 16:29 • by John Bigboote
84919 in reply to 84916
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.

Re: The Italian Job

2006-08-07 16:38 • by PatMetheny
84920 in reply to 84905

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


 

Re: The Italian Job

2006-08-07 16:46 • by Bus Raker
Alex Papadimoulis:





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


 


 

Re: The Italian Job

2006-08-07 16:48 • by snoofle
84923 in reply to 84920
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...

Re: The Italian Job

2006-08-07 16:51 • by Yaytay
84924 in reply to 84899

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?

Re: The Italian Job

2006-08-07 17:08 • by whisk3rs
Did Francesco exclaim "MI SCUZI!" when he learned that Antony was also "Brillant"?

Re: The Italian Job

2006-08-07 17:14 • by AhnfeltVB2k
84930 in reply to 84893
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

Re: The Italian Job

2006-08-07 17:15 • by John Bigboote
84931 in reply to 84924
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.

Re: The Italian Job

2006-08-07 17:38 • by Krane
84936 in reply to 84890
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 ;)

Re: The Italian Job

2006-08-07 17:40 • by StupidPeopleTrick
84937 in reply to 84899
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...


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…


 

Re: The Italian Job

2006-08-07 17:47 • by qbolec
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

Re: The Italian Job

2006-08-07 17:48 • by an user
84941 in reply to 84922
How can this query ever run?

Re: The Italian Job

2006-08-07 17:49 • by John Bigboote
84942 in reply to 84937
Anonymous:


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…


 



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

Re: The Italian Job

2006-08-07 18:02 • by StupidPeopleTrick
84944 in reply to 84942

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

Re: The Italian Job

2006-08-07 18:04 • by Gareth
Obviously the key to the whole procedure is in this line

Alex Papadimoulis:

  Dim antony

Re: The Italian Job

2006-08-07 18:39 • by deltreme
84947 in reply to 84945

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

Re: The Italian Job

2006-08-07 19:34 • by rerun
84953 in reply to 84898
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 :)

Re: The Italian Job

2006-08-07 19:37 • by rerun
84954 in reply to 84953
oops, just found where Carnildo noticed this... carry on!

Re: The Italian Job

2006-08-07 20:08 • by olddog
84955 in reply to 84942
John Bigboote:
Anonymous:


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…


 




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.

Re: The Italian Job

2006-08-07 20:19 • by olsner
84956 in reply to 84954
goggles:
    db 90h
    jmp goggles

Re: The Italian Job

2006-08-07 20:36 • by Hardcore Rhymer
84957 in reply to 84956
olsner:
goggles:
    db 90h
    jmp goggles
"Up jumps da boogie, boogie jumps me"
- timbaland & magoo

Re: The Italian Job

2006-08-07 21:36 • by pbounaix

thatsa spicy meataball!


 


lol, had to...

Re: The Italian Job

2006-08-07 22:08 • by SP
So it seems that Francesco is getting f***ed  at work while Antony is getting f***ed on his honeymoon.

Re: The Italian Job

2006-08-08 01:20 • by 4tehwin!!!
see, if only you all spoke italian, you would realize 'lmmt' makes the entire program make sense....

Re: The Italian Job

2006-08-08 01:22 • by 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.
« PrevPage 1 | Page 2Next »

Add Comment