• Phil Scott (unregistered)

    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.

  • G Dawg (unregistered)

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

  • Sergio Pereira (unregistered)

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

  • Barry Dorrans (unregistered)

    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.

  • Brent Railey (unregistered)


    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.

  • Dave Mays (unregistered)

    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?) ;-)

  • foxyshadis (unregistered)

    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; }

  • Alex Papadimoulis (unregistered)

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

  • Brent Railey (unregistered)

    @Dave Mays:
    Thanks for stressing fairness. :-)

    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.

  • WanFactory (unregistered)

    69 is just wrong!

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

  • A.Sleep (unregistered)

    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.

  • Chris (unregistered)

    i thought 69 was funny.... =x

  • j (unregistered)

    is is just me or should 'aye!' -> 'eh?'

  • Trevor Adams (unregistered)

    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.

  • lagroue (unregistered)

    Remember http://www.oreillynet.com/pub/a/oreilly/news/feuerstein_1000.html ?

    Keep on the good work, dailywtf !

  • jasmine strong (unregistered)

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

  • Dave Mays (unregistered)

    "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. :-)

  • Bill B (unregistered)

    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

  • Jason (unregistered)

    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 ;)

  • Jason (unregistered)

    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

  • foxyshadis (unregistered)

    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?)

  • Andrew (unregistered)

    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);
    case BS_BAR:
    val = DoSomething(x, BS_BAR);

    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.

  • 4MoreYears (unregistered)
    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.
  • Defeated (unregistered)

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

  • fluffy (unregistered)

    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.

  • Brent Railey (unregistered)

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

    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.

  • Dissenter (unregistered)

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


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


  • Brent Railey (unregistered)

    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

  • Brent Railey (unregistered)

    LOL! You peaked my interest... What's the #1?

  • asdf (unregistered)

    So, what did the front post look like before the religious nuts got it censored?

  • Dissenter (unregistered)


    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

  • k (unregistered)

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

  • Matt (unregistered)

    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.

  • Dave Mays (unregistered)

    Stuffing all sorts of variables into an associative array, for the convenience of passing one param. to a function isn't something I would regularly condone, particularly in a strongly typed language.

    1. You lose all the strong typing advantages of the language. Your compiler now can't help you know if you have made a mistake at design time.

    2. The performance hit of boxing/unboxing all the value type variables when putting them into that assoc. array adds up.

    @Political Combatants
    Please stop it. There are plenty of appropriate places on the intarweb to argue about politics. Pick one and go there.


  • TacksMahn (unregistered)

    Original Text: "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."

    What does that have to with it? Warren Buffet was complaining because his taxes where going to go down to 3% from 33%. He felt that he was underpaying his share becuase all the things this country has enabled him to do.

    Some of us realize that the roads, military, CDC, courts, police, fire stations, etc. are funded from taxes.

    Yes, Bush cut federal taxes. You know what happened? My property taxes went up to cover the money the state use to get from the feds.

    This was a great move for him, gets credit for cutting taxes, but just made it messy for everybody else. Pretty much like everything else he has done.

  • hossa (unregistered)

    Looks like a unit test for Intellisense...

  • Vitani (unregistered)

    There was an election in America? I had no idea! It's not like it was all over every news bulettin every day for the past month or so.

    Maybe that kinda news doesn't reach the UK

  • DrPizza (unregistered)

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

    There's nothing moral about voting to outlaw gay marriage or re-electing a fiscally irresponsible warmonger.

    It's not "morality" that made people re-elect W. It's "bigotry".

    "judicial activism" is a bullshit term invented by the neocons to describe the process of judges striking down laws that are unconstitutional. Which is their fucking job.

  • Woody (unregistered)

    I know it's a little icky, but why not use a paramarray here?

  • smelly (unregistered)

    THat's some Diebold code, isn't it.

  • Hello Lunchbox Fold Threadle A Port B! (unregistered)

    The Iraq Body Count estimate was about 15,000 -- all, by definition, civilians.

    The Lancet indicates that it's really between 100,000 and 200,000 -- call it roughly a factor of ten.

    Any fool who can do math can see that if both of those are correct, then the real figure is actually greater by another factor of ten, at least: We're looking at either 1,000,000 or 10,000,000 civilians dead.

    DrPizza, you hit the nail on the head: The ignorant, brainless, half-animalistic red-state hillbilly pigs who voted for Bush are bigots who hate democracy. It's up to those of us who reject bigotry and love democracy to end once and for all the electoral power of those pathetic, laughable subhumans. As long as they're allowed out of their cages, "democracy" in this country will be a meaningless sham. Their "values" are fundamentally anti-democratic; therefore, to allow them to interfere with the vote is by definition anti-democratic as well.

    It should be obvious to anybody that a literacy and world-affairs test for voters is the only way to eliminate the anti-democratic influence of bigots from the process. The "red" center of the country hasn't yet matured enough to be trusted with the vote. We know what world opinion is. We therefore have a benchmark for political sanity and maturity. "Red-state" Americans fail that test. The only sane thing to do is to make those fat, stinking imbeciles wards of the state until they demonstrate enough mental competence to be trusted with the franchise. We can still save democracy if we're willing to grasp the nettle, but time is running out.

  • Texas Programmer (unregistered)

    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.

  • Democratic Republican (unregistered)

    Crush your enemies, see them driven before you and hear the lamentation of the women.

  • Texas Programmer (unregistered)

    Oh, Lunchbox, in case you did not know the meaning of bigot :


  • Disda (unregistered)

    Iraq Population:
    24,001,816 (July 2002 est.)
    ummmmmmmm.... dont think so

    here, this link might be abit more accurate..


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

  • WanFactory (unregistered)

    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.

  • Hello Lunchbox Fold Threadle A Port B! (unregistered)

    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.

  • Texas Programmer (unregistered)

    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

  • AndrewSeven (unregistered)

    Is 30 better?


  • AndrewSeven (unregistered)

    Why is he looking for experienced c# developers to do VB6/VB.Net?

    Is that the WTF?

Leave a comment on “Smells like ...”

Log In or post as a guest

Replying to comment #:

« Return to Article