• Blarg (unregistered) in reply to Sum egghead
    Sum egghead:
    durnurd:
    I'm just curious, how can max(x) + 1 make a duplicate key?

    racist condition.

    If he's curious it might be a sexually discriminatory condition

  • James Whales' Marmot (unregistered) in reply to Jimbo
    Jimbo:
    (It all reminds me of "Bill Posters will be prosecuted"....)

    Who the hell is Bill Posters? And what did he do?

  • Anonymous (unregistered) in reply to DeepThought
    DeepThought:
    I agree. An experienced developer would have leveled with the boss and told him that while it can be done, the quickest solution is not the ideal one. He should have also spelled out the deficiencies he found and given the boss some idea of the amount of effort required to set things right or at least requested permission to do a thorough review and analysis of the code in order to come up with a more accurate estimate.

    TRWTF was simply telling the boss that he couldn't do it.

    Actually I did tell my boss what the problem was. I explained it in great detail. However since I was new he didn't believe me.

    The biggest challenged I faced was that the previous developer basically told my boss that a ton of processing was happening at the Aggregator which was crap. The truth of it was no processing was happening at the Aggregator, it was all being done at the websites. This meant that any business logic that he thought the Aggregator did was all implemented through the 25 sites, which were all different in their own little way.

    They had been told that this system was completely independent of everything else. They were told that any site out there could just point itself to this Aggregator and utilize it, which they could then sell the services of the Aggregator which was basically a rudimentary CRM system. However that was completely not true.

    What they also wanted was to purchase leads from other "gyms" and have those "gyms" send them the leads to their site. However, they wanted to be able to run third party checks against those leads. If the third party checks didn't pan out then they wanted to be able to reject the lead. None of this would work well, or should be done, through the SQL Server or the 25 independent sites.

    Perpetuating bad code with good code is not the solution. If the boss says I need the site to do this, and you have an idea where they are wanting to go and you know that to get there you need to make major modifications to the architecture then you need to start that battle right away. If you don't you end up with the crap that gets submitted here. Just because you can write great code doesn't mean that the architecture isn't crap.

    We ended up creating a massive XML posting service that handled all the business logic where the business logic should be handled, which then allowed them to sell out the Aggregator's services to other companies. It also allowed them to check a lead and instantly reject it, among MANY other things that just wouldn't have been possible with direct writes to the database.

    Oh yeah and it was all ASP/vbscript spaghetti code that did direct writes to the db without using as single stored proc (there were NONE throughout the entire Aggregator code OR the 25 sites).

    my 2 cents....

  • fdizzle (unregistered) in reply to D. Travis North
    D. Travis North:
    the real wtf fool:
    Ant:
    No he wouldn't - Waluigi has an inverted "L" on his cap. </pedantry>

    Just wasted half an hour of my life looking at the super mario wiki - thanks to you...

    And I'll be spending the next half hour there, thanks to you...

    So shall I, in between playing Super Mario Bros 3 on my phone ^_^ thankyou very much :)

  • Not as DULL as you (unregistered) in reply to Anonymous
    Anonymous:
    Actually I did tell my boss what the problem was. I explained it in great detail.

    I have just re-read the article to verify and can assure you that you didn't. The boss interupted you before you could explain. Remember?

  • (cs) in reply to Prosthetic Lips
    Prosthetic Lips:
    Fred Burns:
    Completely irrelevant to the article, I really enjoy the new Irish Girl ad. Improves the site aesthetics immeasurably.

    The real problem is those **@#$&@#^ random ads. I think I refreshed 20 times before the ad came up.

    <me needs_a_life="true" />
    So do the rest of us a favour and post the image.
  • (cs) in reply to Neil
    Neil:
    Uber:
    I was wondering why my gym was spamming me with male enhancement emails.
    Perhaps its just that guess they have genital size recognition software on the cameras in the locker room.
    The Grammar-Nazi Police is after you.
  • (cs) in reply to fdizzle
    fdizzle:
    D. Travis North:
    the real wtf fool:
    Ant:
    No he wouldn't - Waluigi has an inverted "L" on his cap. </pedantry>

    Just wasted half an hour of my life looking at the super mario wiki - thanks to you...

    And I'll be spending the next half hour there, thanks to you...

    So shall I, in between playing Super Mario Bros 3 on my phone ^_^ thankyou very much :)

    Ha ha ha my evil plan to bring capitalism to its knees by getting all developers to waste their time on video game sites is working - Waluigi.

  • (cs) in reply to lolwtf
    lolwtf:
    Prosthetic Lips:
    Fred Burns:
    Completely irrelevant to the article, I really enjoy the new Irish Girl ad. Improves the site aesthetics immeasurably.

    The real problem is those **@#$&@#^ random ads. I think I refreshed 20 times before the ad came up.

    <me needs_a_life="true" />
    So do the rest of us a favour and post the image.

    Got it in 9 refreshes: [image]

    Although I don't think she's a patch on the original. And the ad copy sucks.

  • (cs) in reply to Fred Burns
    Fred Burns:
    Completely irrelevant to the article, I really enjoy the new Irish Girl ad. Improves the site aesthetics immeasurably.
    Really? *tries to check* I've refreshed a couple of dozen times and seen a lot of useless ads but haven't found an Irish Girl yet :(
  • (cs) in reply to DeepThought
    DeepThought:
    > Um, the real WTF is that the kid didn't automatically see that the > code would be handled like that. In a coding environment that badly > done, you don't try to fix everything first day or say to the boss 'I > can't see how it could be done' simply because it can't be done the > ideal way. You work on the problem, fixing what you can when you can. > At the end, you end up with better code. For now, you end up with a > job and a boss that doesn't think you are incompetent.

    I agree. An experienced developer would have leveled with the boss and told him that while it can be done, the quickest solution is not the ideal one. He should have also spelled out the deficiencies he found and given the boss some idea of the amount of effort required to set things right or at least requested permission to do a thorough review and analysis of the code in order to come up with a more accurate estimate.

    TRWTF was simply telling the boss that he couldn't do it.

    An experience developer that REALLY wanted to get his point across would have gone to see his boss and vomit down his back, then returned to work without saying a word.

  • paratus (unregistered) in reply to durnurd
    durnurd:
    I'm just curious, how can max(x) + 1 make a duplicate key?
    Two instances running at the same time maybe?
  • dolor (unregistered) in reply to Anonymous
    Anonymous:
    "I'm just curious, how can max(x) + 1 make a duplicate key?"

    If you remove some entries.

    Say you have 50 entries max(x) + 1 will be 51.

    Say you remove entries 12 and 13, max(x) + 1 is now 49, but 49 still exists unless you renumber the whole table.

    Max not Count.
  • nobis (unregistered) in reply to chrismcb
    chrismcb:
    Vic Tim:
    Waluigi is retarded, and so am I since I don't know anything about OOP but it seems:

    Mario = subclass of player Luigi = subclass of Mario Wario = subclass of mario? or should be also subclass of player? Waluigi = wtf???

    It is obvious that you don't know anything about OOP. But Mario and Luigi are brothers, so Luigi isn't a subclass of Mario. Wario is an evil Mario, and Waluigi is an evil Luigi (and possibly Wario's brother?) You can make Wario a subclass of Mario with the evil bit set.

    If the only different is the evil bit is set then the you have two instances of the same class but with the variables set differently.

  • (cs) in reply to the real wtf fool
    the real wtf fool:
    lolwtf:
    Prosthetic Lips:
    Fred Burns:
    Completely irrelevant to the article, I really enjoy the new Irish Girl ad. Improves the site aesthetics immeasurably.

    The real problem is those **@#$&@#^ random ads. I think I refreshed 20 times before the ad came up.

    <me needs_a_life="true" />
    So do the rest of us a favour and post the image.

    Got it in 9 refreshes: [image]

    Although I don't think she's a patch on the original. And the ad copy sucks.

    I prefer Mozy girl.

  • (cs) in reply to SoonerMatt
    SoonerMatt:
    I have seen the same problem with incrementing primary keys using "MAX(intuserid) + 1".

    Can't really disclose the problem that it caused, but it was very bad.

    It drives me around the twist; I see the kludge with MAX done all the time here. There are no identity columns in any of our tables and no referential constraints. I suppose I should be grateful that there are actually primary keys.

  • Anonymous (unregistered)
    [image]

    Yeah, it's been a slow day.

  • (cs) in reply to Yoshi
    But if Wario is a subclass of Mario, and Waluigi is a subclass of Luigi then Wario and Waluigi would almost certainly NOT be brothers....

    Furthermore, if Mario is a subclass of player, then Wario cannot be a subclass of Mario (excepting in the games where you can play as Wario)....

    Unless you implement multiple inheritance.

    Three super classes: Player, Character, Evil

    Plumber inherits from Character.

    Mario and Luigi inherit from Player and Plumber.

    Wario and Waluigi inherit from Mario and Luigi, and they both inherit from Evil. In this case, they are half-brothers.

    Wario and Waluigi could inherit directly from Plumber instead, and be brothers. Except that's not very good code reuse

  • Mr Smith (unregistered) in reply to ounos
    ounos:
    Neil:
    Uber:
    I was wondering why my gym was spamming me with male enhancement emails.
    Perhaps its just that guess they have genital size recognition software on the cameras in the locker room.
    The Grammar-Nazi Police is after you.

    The Grammer-Nazi Police are after you.

  • (cs) in reply to Mr Smith
    Mr Smith:
    ounos:
    Neil:
    Uber:
    I was wondering why my gym was spamming me with male enhancement emails.
    Perhaps its just that guess they have genital size recognition software on the cameras in the locker room.
    The Grammar-Nazi Police is after you.

    The Grammer-Nazi Police are after you.

    At least he spelled grammar correctly.

  • (cs) in reply to Code Dependent
    Code Dependent:
    At least he spelled grammar correctly.

    Flag on the play. Offense. Failure to include at least one spelling or grammar error on a Grammar-Nazi post. 5 yard penalty. Repeat second down.

  • (cs) in reply to cdosrun
    cdosrun:
    Code Dependent:
    At least he spelled grammar correctly.

    Flag on the play. Offense. Failure to include at least one spelling or grammar error on a Grammar-Nazi post. 5 yard penalty. Repeat second down.

    At lease he spelled grammar correctly.

  • A. Cube (unregistered) in reply to durnurd
    I'm just curious, how can max(x) + 1 make a duplicate key?

    If two or more max(x) + 1 queries run to do an insert before any records are inserted. I have been ferreting the same kind of junk out of the apps at my company. For lower loads, this will probably work fine as the odds of two requests running almost simultaneously are not likely. However, the more people there are using the database at the same time, the more likely the problem becomes. What is worse, is that, from the sound of it, multiple sites were using a single database, making this collision even more likely than if there had been only a single site.

  • Savage (unregistered) in reply to halcyon1234
    halcyon1234:
    But if Wario is a subclass of Mario, and Waluigi is a subclass of Luigi then Wario and Waluigi would almost certainly NOT be brothers....

    Furthermore, if Mario is a subclass of player, then Wario cannot be a subclass of Mario (excepting in the games where you can play as Wario)....

    Unless you implement multiple inheritance.

    Three super classes: Player, Character, Evil

    Plumber inherits from Character.

    Mario and Luigi inherit from Player and Plumber.

    Wario and Waluigi inherit from Mario and Luigi, and they both inherit from Evil. In this case, they are half-brothers.

    Wario and Waluigi could inherit directly from Plumber instead, and be brothers. Except that's not very good code reuse

    Inheritance is a horrible way to implement the relationships between Mario and Wario and friends. Inheritance from Player, Character, and Plumber is one thing. But you can't say that Wario "is a" Mario. Wario isn't a more specific instance of Mario, he can't be treated as though he is a Mario.

  • Marthinus (unregistered) in reply to WC

    I agree, that is what I was thinking, but you worded it better.

    Comes down to the big problem most software engineers have, communication. In most cases your boss is a clueless when it comes to programming so no use complaining to him, he will just hear excuses and not trust you with anything again.

    It is like cutting off your nose to spite your face.

  • Marvin the Martian (unregistered)

    Oh noes! <SFSAD> has broken the near-unbreakable captcha system and added a spam comment! What with the economy like this, gold farming isn't going well so we have conversion to captcha-cracking? Evil geniuses (or genii, dear mr. G. Rammar-Nazi?).

  • Michael Langford (unregistered)

    Step one of any problem: Solve the problem Step two of any problem: Solve the other problems you found while solving the original problem.

    The protagonist of this story clearly was a idealist, and not very useful to most businesses.

    The architect clearly did the first step. Probably should do the second step as well, but the first step was what is required to make things work. While the architect is possibly not doing his job in other areas (I don't trust this is an important system for this company), he definitely did the right thing here.

    If the protagonist had just done step one, then he'd have some political capital to possibly make the required DB changes to make this less of a clusterfuck.

Leave a comment on “Feeling Aggregated”

Log In or post as a guest

Replying to comment #:

« Return to Article