Comment On Smells like ...

... well, I'll let you be the judge of that. Atanas Korchev provides us with this compiler error from a project that I'm a bit afraid of seeing. As it would seem, 70 is the number of arguments in this case ... [expand full text]
« PrevPage 1 | Page 2Next »

re: Smells like ...

2004-11-03 12:44 • by Phil Scott
well, i'll sit back and wait for the political flames.

Oh, and someone defending this by saying that this could be a wrapper around 69 column table and they see nothing wrong with the function in that case.

re: Smells like ...

2004-11-03 12:54 • by G Dawg
This indicates the caller was supplying 69 comma seperated values,... this could simply be a missing semicolon somewhere. It doesn't mean that the method actually takes 68 or 70 whatever arguments...

re: Smells like ...

2004-11-04 11:10 • by Texas Programmer
Lunchbox ......

Just when I think, "Surely this person has reached and encapsulates the limits of Internet tedium" you go and push the boundary even further. Your post is an orgy of stultifying cacophonous verbal depravity; an exercise in literary impotence, and an offense to all of good taste and decency.

Why don't you shrink your head and use it as a paperweight? It's not much use for writing intelligent posts with, that's for sure. Is that a conclusion or simply the place where you got tired of thinking? A long period of non-posting would be most welcome on your part. How true is Stanislaw J. Lec's famous remark: "Every now and then you meet someone whose ignorance is encyclopedic."

You are being a bigot yourself, you moron.

re: Smells like ...

2004-11-04 11:15 • by Democratic Republican
Crush your enemies, see them driven before you and hear the lamentation of the women.

re: Smells like ...

2004-11-04 11:16 • by Texas Programmer
Oh, Lunchbox, in case you did not know the meaning of bigot :

http://dictionary.reference.com/search?r=67&q=bigot

re: Smells like ...

2004-11-04 11:16 • by Disda
Iraq Population:
24,001,816 (July 2002 est.)
10,000,000????
ummmmmmmm.... dont think so

here, this link might be abit more accurate..

http://english.aljazeera.net/NR/exeres/66E32EAF-0E4E-4765-9339-594C323A777F.htm



sorry for posting more political issues, ignorance gets me riled up

re: Smells like ...

2004-11-04 11:21 • by WanFactory
I come here to see crap code, not crap comments about crap politics - I can read about crap politics in the newspaper. This blog used to be my escape from the idiocy that goes on on both sides of the political fence and allow me to enjoy the idiocy in the coding world.

re: Smells like ...

2004-11-04 11:23 • by Hello Lunchbox Fold Threadle A Port B!
Disda: Those were hard numbers and shrewd, realistic extrapolation. No speculation there, no guesses. Scientific proof, not wishful born-again hysteria. Read 'em and weep.

Programmed Texan: Bigotry is mindless, religious warlike hatred for "the other" -- the belief that anybody who doesn't think and act like you is somehow less than human. That description fits you to a T, and you've just proven it. It's just the opposite of me, of course: I am neither religious nor warlike. I am, in fact, a vegetarian. Unlike red-staters, I can accept and celebrate people who differ from me. That is why I hate them.

re: Smells like ...

2004-11-04 11:38 • by Texas Programmer
Lunchbox :
"Unlike red-staters, I can accept and celebrate people who differ from me. That is why I hate them. "

MUAHAHAHAHAHA - Oh, I get it now.... You are joking!?!? As only either someone who is joking, or is a failed lobotomy operation could contradict themselves so completely in the same sentence.

"I am neither religious nor warlike. I am, in fact, a vegetarian."

How does being a vegetarian contradict the religious, or war-like tendencies???? ROTFLMAO

re: Smells like ...

2004-11-04 11:50 • by AndrewSeven
Is 30 better?

Argh!!

re: Smells like ...

2004-11-04 11:52 • by AndrewSeven
Why is he looking for experienced c# developers to do VB6/VB.Net?

Is that the WTF?

re: Smells like ...

2004-11-04 13:46 • by Mike R.
I think the WTF was making an offhand post-election political comment...

re: Smells like ...

2004-11-04 16:16 • by e. thermal
I guess that's the problem with democracy there is nothing to protect the people from themselves. To someone's point earlier, if something takes the popular vote it doesn't mean it should be law. That is why there is a constitution, to try and protect people from themselves. And yes judges are there to uphold the constituion. I would bet, if left to a vote, most basic rights every American enjoys would be taken away. One really springs to mind "Freedom of speech".. exactly the thing the moral majority work very hard to abolish.

re: Smells like ...

2004-11-05 01:23 • by Brent Railey
Awesome! Now I am a redneck hillbilly from backwoods nowhere! Only those with the intellectual capacity of Sherlock Holmes could use such astute deductive reasoning to conclude that I am a redneck merely from my stance on gay marriage.

Wait...

I have to go brush my tooth, clean my belt buckle, and polish my snakeskin boots. I have a banjo recital tonight!

Texas Programmer, you cracked me up. Thanks for coming to defend with such eloquence!

re: Smells like ...

2004-11-05 08:11 • by Adrián
My opinion: I string with missing quotation marks!!!!!.

Harrrrdcoddde!!

re: Smells like ...

2004-11-07 00:26 • by foobar
I think the original blog post was fair. He didn't make his opinion as to whether he thought the choice was good or bad, he was merely pointing out that some people thought the choice was bad.

Fair enough, I think. And just enough politics to be appropriate and funny for a programming blog, but not enough to be inappropriate.

Please take your political views to the political blogs. Lord knows there are enough of them to go around.

Why does the ultra-right think that this election is a Sign From God to change everything and why does the left continually blast the right (99% of whom aren't radical fundamentalists) as stupid gun-toting religious freaks?

It's funny how the left stereotypes, pigeon-holes, descriminates against, and down-right insults the right while claiming that the right is intolerant, "us-vs-them", demonizing, etc.

The left really needs a wake-up call here. At least the ultra-rightists know that they're biggoted, stereotyping, full-of-hatred fundamentalists and proud of it. The ultra-left still seems to be in denial of this fact. Especially when they throw around words like 'religious and warlike', etc. in the same breath as accusing the right of being intolerant.

I suggest to all the lefties here that before you start stereotyping and being biggoted ignoramouses, you should take a look at your own stereotyping, biggoted, ignoramic behavior and maybe that'll give you a clue why the left is losing so much power today.

re: Smells like ...

2004-11-07 00:35 • by foobar
One other thing, why do people who are against the Iraq war lament the death of possible 15,000 Iraqis (a number I question, but for the sake of argument...) but were strangely silent when, for the past 12 years or so, Saddam was averaging a slaughter of around 5,000 a month.

Last official body count was around 300,000 - 350,000 dead at the hands of the Saddam since Gulf War I. This is under the Oil for Food program, mind you. No telling how many countless people he slaughtered before 1991. A million Iraqis and Iranians died in the Iraq/Iran war according to various sources (UN, Amnesty International, etc).

The Right and the Left both choose when and what numbers they will use to defend their cause. For example, the Right conveniently forgets the Reagan/Bush support of the Iraqis in the Iraq/Iran war to get back and the Iranians and to cause problems for the Soviets, and the left conveniently forgets all the corruption in the UN by the French, Russians, Germans, and Iraqis under the Oil for Influence -- I mean Food program headed up and profiting Kofi Anan's own son and probably himself, not to mention the 300,000+ slaughtered under this program by Saddam. The left idly sat by and did nothing and now lament a few 15,000 dead in a war to save umteen million people?

Face it, the Right made a big mistake in the 80's in the middle east by supporting Iraq, by supporting the Mujahadeen (Bin Laden), etc, and the Left made a big mistake in the 90's by letting Bin Laden get away 3-4 times, by not doing something about Iraq and making the UN look like an idiot the entire middle east and the terrorists, and seem to be making it worse now by blaming Bush for everything which is unfair. He was merely the last idiot to come along and mix things up. The blame goes back long before Reagan, Carter, etc. At least now the Iraqis are free, Saddam is out of power, we know there are no longer any WMDs (where they went is troubling -- they didn't just disappear after the UN inspectors found them in 1998 and were promptly kicked out of Iraq), AND we know that the UN, French, Russians, and Germans had their red hands in the Iraqi cookie jar, stabbing us in the back all along.

All the cards are on the table, so we can finally begin to get some truth.

re: Smells like ...

2004-11-11 08:02 • by Ian T
@ Bill B ... way back

> Like Mayor Daley of Chicago said, if you want to defend marriage, start with divorce..

and like Bill Hicks said "if you want to be so pro-life, blockade the cemetary"

DailyWTF rocks... when the ego contest doesn't get in the way! : )

re: Smells like ...

2004-11-12 11:14 • by ScanIAm
Concering the comment by Andrew about a case statement having 256 cases:

State Machines are very easily written using switch/case statements. For large and/or complicated systems, you can end up with many huge switch/case statements. It is even possible to have your 'default:' statement jump to a second function that again contains a huge switch/case statement.

This may not seem like a good idea for applications that handle user input, but systems that deal directly with hardware almost require it.

re: Smells like ...

2004-11-03 13:07 • by Sergio Pereira
I see Phill's point, but the screaming WTF comes when you notice that the method name is "add" !!! I can only hope that "add" is used in lieu of "insert" or "append".

re: Smells like ...

2004-11-03 13:43 • by Barry Dorrans
It could be adding a record to a database you know, where the record has a large number of fields.

Not that odd. Ugly, but not odd.

Dude ... Low Blow

2004-11-03 13:49 • by Brent Railey
-- THE FIRST POLITICAL SPARK --

This blogs cracks me up on almost a daily basis. I LOVE it...and I won't stop reading it. It's addicting. LOL!

Just a warning...

I fall into the "Moral America" category, and I am sure I'm not the only one who reads this blog who does. You have the right to post whatever you want here--it's your blog. But, if you don't want a political fire pit here, try not to take a cheap shot at many in America who do vote based on "moral" values by branding them as hypocrites.

re: Smells like ...

2004-11-03 14:03 • by Dave Mays
@Republican:
Don't demean the GOP by taking cheap shots like that. It's unbecoming.

I'm surprised when I meet programmers who are Democrats, but more because programmers tend to make a pretty high salary compared to the average in the country.

Anyway, on the WTF:
I'd really like to see the source of the function before we go saying it's wrong. This is, IMO, a pretty low-quality WTF. I've come to expect much, much better. (Worse?) ;-)

re: Smells like ...

2004-11-03 14:12 • by foxyshadis
I didn't notice any calling of names whatsoever, at least until the comments. All he said was moral america - if that's a perjorative to you, then I don't understand why you take it as a label. (Short of a moment of oversensitivity.)

I wonder if someone has actually made 69 copies of an add method, wach with one more argument than the last.

add(int a1, int a2, int a3, int a4, int a5) { return a1+a2+a3+a4+a5; }

re: Smells like ...

2004-11-03 14:19 • by Alex Papadimoulis
Original Text:
"And on another note, if you're one of those Americans not too happy with the choices* made by moral < http://www.ncpa.org/pd/social/pd111999g.html > America this election time, Gabriel is still looking for some C# developers in the great white north, aye!"

To clarify, I'm referring to the "protect the sanctity marriage" amendments. It seems to me that, perhaps, addressing the exceedingly high rate of divorce may be a bit more effective at this than ensuring some folks who couldn't get married under law anyway really can't get married. Hence, the use of the ironic link.

But, I do believe that the post should be free of politics .... hence the revision of the post. Being one a part of one of those "unmarried couples" whose most basic rights (such as hospital visitation) are now threatened, I get a little touchy.

I feel very lucky that my union can legally be recognized as marriage with a simple trip to the courthouse, but I feel terrible for the 1/10 of the population who cannot.

And naturally, sensless flame-comments removed ;-).

re: Smells like ...

2004-11-03 14:26 • by Brent Railey
@Dave Mays:
Thanks for stressing fairness. :-)

@foxyshadis
You can't deny Alex's tone in the WTF, and when you read the href on "Moral", it's clear it was a jab.

@Eh, who cares
Touchè. That was pretty clever! :-)

@The WTF
It was a parameter issue... if you read the WTF, 70 parameters cleared the compiler error. Therefore the method required SEVENTY PARAMETERS! That's just plain silly, and indicative of poor design. When you have object arrays/collections available in C#, and the ability to read schema info from databases... There should be LITTLE if ANY need to use SEVENTY FREAKIN' parameters.

re: Smells like ...

2004-11-03 14:28 • by WanFactory
69 is just wrong!

sorry, are we talking about marital relations or number of arguments for a method?

re: Smells like ...

2004-11-03 14:34 • by A.Sleep
Good call removing that text. I know I appriciate it. I love this blog but wouldn't keep reading (and laughing my arse off) if I thought there was some political motive or agenda behind it.

Thanks and keep up the good work.

re: Smells like ...

2004-11-03 14:35 • by Chris
i thought 69 was funny.... =x

take off to the great white north

2004-11-03 14:41 • by j
is is just me or should 'aye!' -> 'eh?'

re: Smells like ...

2004-11-03 14:42 • by Trevor Adams
Alex -

I really like reading your blog. In my opinion, your jab against the "Moral" was "out of place". It is your blog, and you have the right to post whatever you want. However, I have always liked coming here to get a good laugh, nothing more. Thanks.

To those complaining

2004-11-03 14:54 • by lagroue
Remember http://www.oreillynet.com/pub/a/oreilly/news/feuerstein_1000.html ?

Keep on the good work, dailywtf !

re: Smells like ...

2004-11-03 15:38 • by jasmine strong
@ the 'moral' choice-
if you're so moral, why do gay marriages matter more to you than the lives of 130 000 innocent people in Iraq?

@ the WTF:
As for the message, the quotes around '69' are interesting. Does this mean that no overload accepts arguments of type '69'? I have seen the message "no overload accepts 'int' arguments"...
either way, it seems more than likely to be a punctuation bug rather than a logical coding error.

re: Smells like ...

2004-11-03 15:50 • by Dave Mays
@Brent
"the ability to read schema info from databases"

That technique, while useful, is not recommended for production systems, because of performance issues.

If you have a stored procedure that takes 70 arguments - or God-forbid, a parameterized SQL statement with that many - at some point, you are going to have to pass all 70 of those arguments.

A clean design would wrap that sproc or (*gasp*) query in some sort of method with all the necessary arguments as parameters.

Also notable is the fact that if many of the parameters are value types, you don't really want to box/unbox them to put them in an object array, just to cut down on the number of parameters on a method.

It also doesn't take too much imagination to come up with systems that might require very wide tables. A real-time data acquisition system is the first thing that comes to my mind. The second is some form of data parser/loader that is dealing with a flatfile for input.

So today, I guess I will wear the "Defender of the WTF" hat. :-)

re: Smells like ...

2004-11-03 16:02 • by Bill B
You shouldn't have removed the link and the "moral" comment. This is precieley what scares me most about the direction of our country. Are we moving in a direction of less tolerance of others opinions?

You don't have to keep my posting, I just wanted you to know that I thought it was funny. Like Mayor Daley of Chicago said, if you want to defend marriage, start with divorce..

I like reading you blogg, it makes me laugh almost daily.

keep it up

re: Smells like ...

2004-11-03 16:04 • by Jason
If any of you have ever programmed against the Microsoft Office API's (namely Excel) in C#, then 69 method parameters doesn't seem like all that many ;)
Theres one that that is 100 times better to do in VB.Net, because of the optional parameter support that C# lacks. If you do program agains microsoft office, just remember Type.Missing, because thats what you'll be using for the 50+ optional parameter methods ;)

re: Smells like ...

2004-11-03 16:06 • by Jason
Forget -> Maybe this is an optmization technique, most of us would have created a data, or business layer object to handle all that data, and passed that object. This way, he allocates 1 less item on the heap :P

re: Smells like ...

2004-11-03 16:07 • by foxyshadis
Actually I hadn't read the href, and kind of glossed over noticing it. I know I'll wake entirely up soon... hopefully before sunset. ;_;

Still, even if it's easier, it must be nearly impossible to figure out which parameter your forgot. Even with intellisense, you have to move over and check every parameter to make sure it matches the definition, unless it uses named parameters, in which case you only have to look over them all (possibly all out of order). (Does C# support named arguments?)

re: Smells like ...

2004-11-03 16:19 • by Andrew
I once had a colleague show me a "compiler bug" in MSVC++ 6. The error was something like "switch statement cannot have more than 256 cases".

He had about 300 or 400 cases, from memory, and they were largely copied and pasted from each other, i.e.:

case BS_FOO:
val = DoSomething(x, BS_FOO);
break;
case BS_BAR:
val = DoSomething(x, BS_BAR);
break;

Even though I didn't work on that project -- heck, I didn't even work in that language, I still went away, grabbed the source out of our sourcecontrol, and replaced the whole mess with three functions (one for each variant of the contents of the cases), and lookup in a static array of function pointers (using the STL's binary search, of course). I felt much better.

That guy was getting paid far more than me, too.

re: Smells like ...

2004-11-03 16:20 • by 4MoreYears
1. Let religions marry and the state notarize contracts
2. Keep the courts away from legislating their activism. Laws are made by representatives elected by the people - Judges must rule based on law.

re: Smells like ...

2004-11-03 16:30 • by Defeated
Although I absolutely agree with "4MoreYears" first statement (keep Marriage in Church, Rights at the State), let's remeber that so-called "Activist Judges" were responsible for highly unpopular decisions (at the time) such as "Brown vs Board".

re: Smells like ...

2004-11-03 17:15 • by fluffy
For things like adding records to a database or whatever, people really need to consider the merits of using associative arrays instead. I don't know if C# or VB or whatever provide that, but PHP and C++ both do, and it's a pretty good (from a maintenance perspective, even if it's slightly less-efficient) to cram your various parameters into an associative array and then pass that in as a single parameter. That way you also don't have to worry about making 25 different ambiguous specializations when there's optional parameters or whatever, and changing things later on is way less of a hassle (and it's also no longer order-dependent).

phpBB's template system uses this kind of setup, and it works extremely well, especially for situations like various mods and hacks adding parameters which won't necessarily be in other peoples' boards.

re: Smells like ...

2004-11-03 17:26 • by Brent Railey
@Dave Mays
I could understand that it could cause performance hits if you hit the database for Scehma EVERY TIME you perform similar tasks, but that's true for any redundant task. However, getting schema info for a given table / view once per web session / application instance, loading the schema into a DataTable or DataSet could be that much of a performance drag, and it is much more manageable code...

@jasmine strong
Just because one issue may be more important than another does not mean we should ignore other issues. The Iraq situation is very important, but so also is protecting the will of the people from judicial legislation. (the purpose of the amendments) Where I live, we passed a "traditional marriage" amendment by 79 percent. SEVENTY NINE PERCENT! One judge has attempted to overturn that amendment, and now it's stuck in litigation. One person should not have the power to overturn popular vote.

@Defeated
Brown vs. Board, though unpopular, was constituional. Popularity is not a measure of "judical activism." It's making "constitional decisions" on issues that are neither mentioned nor implied in the language of the Constitution...and the "decisions" end up legislating law, instead of interpreting law.

re: Smells like ...

2004-11-03 17:42 • by Dissenter
@Brent Railey
Ahh ... "Preventing Judicial Legislation". My #2 favourite rationale for being a homophobic bigot. Well, I hope you're happy with what the new supreme court chooses as your state's religion ...

http://caselaw.lp.findlaw.com/scripts/getcase.pl?court=us&vol=000&invol=02-1624

"[i]t is also conceivable that a government could 'establish' a religion by imbuing it with governmental authority, ... or by delegating its civic authority to a group chosen according to a religious criterion."

Yeeeeeeee-haw!

re: Smells like ...

2004-11-03 18:01 • by Brent Railey
@Dissenter
Have I made one statement about hating homosexuals here (or on my site if you went to it)?

Can you really accurately assume my feelings about individual homosexuals from what I've said?

Do you really think flippantly dismissing me as a homo-hater religious nut is fair?

If you want to have fair and meaningful discussion email me here: brent@brentrailey.com

re: Smells like ...

2004-11-03 18:03 • by Brent Railey
LOL! You peaked my interest... What's the #1?

re: Smells like ...

2004-11-03 19:12 • by asdf
So, what did the front post look like before the religious nuts got it censored?

re: Smells like ...

2004-11-03 19:20 • by Dissenter
@Brent

Not calling you a homophobe, mate. The argument you use happens to be the same one homo-hating bigots use. In order:

#1 Protecting Sanctity of Marriage
#2 Stopping Judicial Activism
#3 Keeping moral tradition

re: Smells like ...

2004-11-03 19:27 • by k
j, you're absolutely right... too many people do this, and it bugs the hell out of me. "Aye" is what a sailor says on a ship - "aye aye cap'n".

re: Smells like ...

2004-11-03 23:46 • by Matt
I'm happy to call Brent a homo hater nut/bigot.
Being nice to the homos you know and meet face to face is just cowardly, given you're happy to deny them certain civil rights, bitch about them being undeserving of those rights to your redneck friends and at the ballot box. (I use civil rights as a juxtaposition to the religious right of marriage, perhaps somewhat outside it's traditional use.)
I don't care what you do in your churches or your "morally" inclined peer groups, but you have no right to deny others the same governmental recognition, respect and rewards as you expect for yourself, basing that discrimination solely on their sexuality.
« PrevPage 1 | Page 2Next »

Add Comment