‭🙅 THE BAD IDEAS THREAD



  • Discourse: proof that the hardest bugs to fix are the ones between the developer's ears.


  • Discourse touched me in a no-no place

    Bad idea: Trying to do certain kinds of programming without understanding nuances of the languages you're working with, that will affect the code you've written. A client asked me if this would work:

    for each person where [...],
        each benefit of person where [some fields]:
    
        delete benefit.
        display person.id person.name benefit.description.
    end.
    

    After the delete statement, the record no effectively longer exists (of course, the transaction hasn't been committed yet, so that's not strictly true). This means that the display statement will fail. This raises an error. Nothing too weird, yet, right? Except in Progress, a for block has an implicit "on error rollback". This means that the runtime pops up an error message stating something like "no benefit available", the action is undone, and the benefit record is resurrected. The proper way to do this is to swap the delete and display statements.


  • Discourse touched me in a no-no place

    @FrostCat said:

    Except in Progress, a for block has an implicit "on error rollback".

    That sounds like it is Doing It Right. I approve. That someone can't handle the truth consequences of this… well, they're the fools with the tools.


  • Discourse touched me in a no-no place

    @dkf said:

    That sounds like it is Doing It Right. I approve.

    Yep--this is something it does really well.

    @dkf said:

    they're the fools with the tools.

    Well, to be fair, this is an IT guy pressed into service as a part-time programmer. He had actually sent me that code asking if it would work.



  • @FrostCat said:

    The proper way to do this is to swap the delete and display statements.

    Maybe he wanted it to say...

    128318144 Jane, Nancy [null]
    

    ...so he could be sure the record was actually deleted. :trollface:



  • @ScholRLEA said:

    Tuck

    I would like to acknowledge that I have recognized amd appreciated this pun.


  • Discourse touched me in a no-no place

    Not in this case, but that's funny.


  • Notification Spam Recipient

    @FrostCat said:

    The proper way to do this is to swap the delete and display statements.

    I tried something like this in C#. Apparently, modifying a collection inside the loop is a Bad Idea.


  • Discourse touched me in a no-no place

    @Tsaukpaetra said:

    I tried something like this in C#. Apparently, modifying a collection inside the loop is a Bad Idea.

    It probably is, but that's not the same model Progress is using.



  • @Tsaukpaetra said:

    I tried something like this in C#. Apparently, modifying a collection inside the loop is a Bad Idea.

    Modifying the collection by updating it directly while iterating it is bad.

    In Java, the Iterator class offers a remove() method, and that can be used to remove members of the collection while iterating. But I don't see anything similar for C#, because obviously it is lame.

    Build a separate collection listing the items to be removed, then iterate the second collection, removing from the first.



  • On a guess, that's probably what the remove() method you mentioned actually does. Would you happen to know if that's the case or not? Just curious.



  • It immediately changes the backing collection http://groovyconsole.appspot.com/script/5097739230642176

    l = [1,2,3]
    println l.class
    println l
    i=l.iterator()
    while (i.hasNext()) {
      println i.next()
      i.remove()
      println l
    }
    

    Output:
    class java.util.ArrayList
    [1, 2, 3]
    1
    [2, 3]
    2
    [3]
    3
    []



  • Bonus: Map iterate & remove (I was struggling to think of a case where you couldn't just iterate by index)

    m = [a:1,b:2,c:3]
    println m.getClass()
    println m
    i=m.iterator()
    while (i.hasNext()) {
      println i.next()
      i.remove()
      println m
    }
    ​
    

    class java.util.LinkedHashMap
    [a:1, b:2, c:3]
    a=1
    [b:2, c:3]
    b=2
    [c:3]
    c=3
    [:]



  • Time for y'all to learn some bad COBOL. From a program that failed this week.

     01  MY-DATE.
         05 MY-DATE-MM        PIC XX.
         05 FILLER            PIC X.
         05 MY-DATE-DD        PIC XX.
         05 FILLER            PIC X.
         05 MY-DATE-YR        PIC 9999.
    
    ** FIND DATE 2 YEARS BACK
         SUBTRACT 2 FROM MY-DATE-YR
    

    Anyone care to take a guess how well that works when MY-DATE is 02/29/2016? (SQL error, invalid date.)

    👎 with shortcuts.



  • But does cobol have a remove method on its iterator class?



  • I'd just where away the lame things, unless theres a good reason to do a remove.



  • @Buddy said:

    But does cobol have a remove method on its iterator class?

    Iterator class in COBOL... 😆 good one!



  • Yeah, well, if you're trying to pass, a proper tuck is important.

    Bad Idea: Making out on your best friend (and sometimes lover)'s bed with your new boyfriend during a party and forgetting to lock the door (NSFW for mild teen sex stuff):
    [spoiler] "Just leave your fingers in there a minute," she gasped as she
    collapsed back on the bed. I shrugged mentally, but did like she
    wanted.
    She wanted me to hold her like that, so we rearranged ourselves on
    the bed so we were pressed together. My fingers were still inside her.
    She wouldn't let me take them out. I really wanted to find out what it
    tasted like. Call me sick, I guess. On the other hand, almost
    everything else I'd heard about sex and girls so far had been proven
    wrong tonight. It figured.
    We heard the click at the same time, but we were both so tired that
    we didn't react fast enough. I managed to pull my hand out right when
    the light came on.
    "Oooh, sorry!" said Lisa. The guy behind her was staring at both
    of us, and starting to grin. Debbie pulled her tights back up quickly.
    I was covered already, thank God.
    My hand was sticky, and I couldn't figure out what to do with it.
    I figured wiping it on me or Debbie was gonna get me in trouble with
    Debbie, and the bedsheets were out because of our hostess standing right
    there. So I licked 'em clean without thinking too much about it.
    Lisa's eyes shot wide open.
    It didn't taste at all like fish, either. It figured.[/spoiler]

    Fortunately, it isn't as bad as it sounds, sort of:

    [spoiler]"Anyway," she said after she got done laughing, "Gary won't say
    anything. Nobody else has figured it out, I've been checking. So it
    just looked to him like Debbie and some girl, and he won't say anything
    about that. She'll just threaten to stop dating him, and he'll fall
    into line."
    I wanted to laugh at Gary being pussy whipped, but I was in no
    position. Not in this dress.[/spoiler]



  • Good Idea: Redesigning maintenance procedures to reduce time and cost.

    Bad Idea: Improvising a new maintenance procedure for a mission-critical hardware system, then spreading the procedure industry-wide without checking if it causes problems.

    Worse Idea: Using a forklift to do an improvised maintenance procedure on hundreds of large passenger aircraft, for engine assemblies that require millimeter-precise positioning, without telling anyone that you've thrown the scheduled maintenance directives out the window:

    https://www.youtube.com/watch?v=Ksshgqx72r8


  • ♿ (Parody)

    The proposed law calls for the repeal of multiple pieces of legislation in order to allow consensual sex between siblings over the age of 15. The proposed laws would also allow for people to “bequeath” their dead bodies for intercourse by giving consent while they are still alive.



  • D'oh! I forgot to include the relevant quote regarding Tuck and.. tucking. This is while Tuck is changing out of his dress the day after Halloween, after spending the night (as Valerie) at Debbie's house, having breakfast with the Sheriff's deputy (Debbie's mom), and getting chased around a mall by an enraged linebacker (the one whom Val had handcuffed to a post in the school courtyard the day before when he hit on her). Tuck's closest friends, Mike and George, are watching:

    [spoiler] "Where's your dick?" asked George, staring at the G string and
    its lack of a bulge.
    "Oh, believe me, it's in there somewhere," said Debbie, and
    snickered.
    "Come on, Debbie, take it off..." I whined.
    "I want to see how she did those boobs," said Mike.
    She reached behind me and fumbled with the laces for a very long
    time before it loosened. She had to peel it off.
    "Ahhhhh....!" I said as it painfully unstuck from my skin.
    The bags of pink goo fell to the floor. Mike and George stared at
    them like they were snakes.
    "Okay, this is gonna sting a little bit," said Debbie casually.
    Then she ripped off one of the strips of duct tape.
    "AHHHH!" I screamed, leaping straight up.
    "Ah!" said Mike and George, startled.
    "Oooh," remarked Debbie. "Maybe we'd better get it all off quick."[/spoiler]


  • ♿ (Parody)




  • Discourse touched me in a no-no place

    Bah, no mayhem. I rate that 0 on a scale of 1 to ... well, it doesn't really matter, does it?


  • Notification Spam Recipient

    @ScholRLEA said:

    [spoiler]had been proven wrong tonight. It figured.[/spoiler]

    That's mildly horrifying.

    @ScholRLEA said:

    [spoiler]taste[/spoiler]
    Wait, why would it taste... 😕

    Maybe I've heard different things?

    @ScholRLEA said:

    [spoiler]stared at them like they were snakes.[/spoiler]
    Are they afraid of... what? :/ :/

    @ScholRLEA said:

    [spoiler]Maybe we'd better get it all off quick.[/spoiler]
    Oh. Is that the punch line?
    Well, then. Hahahaha! :D :D :D :D
    And :giggity:.



  • Not sure which thread this belongs to, but:



  • Red Faction: Guerilla!



  • 46:57? Come on, I just want to see the explosion(s?)...



  • https://what.thedailywtf.com/t/dumb-and-random-videos-thread/15459/284?u=scholrlea

    Bad Idea: Letting an unrelated company rush a holiday special based on your hot property out the door without viewing it before it is broadcast.

    I know! We should do a Kickstarter to produce a Battlefield Earth/Leonard Part 6/Pluto Nash crossover set on Kashyyk! With Kevin Costner, Pauly Shore, Tommy Wiseau, and Adam Sandler in the lead roles, and Michael Cimino co-directing with Uwe Boll!



  • Bad Idea: leaving your dressing room unlocked while you are out, when the co-star who has been crushing on you for months is known for her pranks and innuendos:

    [Tallulah] Bankhead had more luck with [Marlene] Dietrich, with whom she enjoyed, at the very least, a long and flirtatious friendship. In the '30s, Bankhead's dressing room adjoined that of Dietrich's , and accounts in movie magazines discuss their whiling away the hours drinking champagne. One account in McLellan's books says that Bankhead liked to apply some of Dietrich's signature hairdressing gold dust to her pubic hair, open the door and flash anyone who passed by, asking them what they thought she had just finished doing.
    Apparently, this set off a bit a snit from Bankhead's ex, Mercedes Acosta, who was seeing Dietrich at the time - according to Hollywood gossip, Acosta didn't mind it too much when Marlene shacked up with some guy, but she would get furiously jealous if another woman entered the picture, even her old girlfriend (it's pretty well known that she was the same way when she was together with Bankhead during their time working on Broadway). OTOH, some versions of the story hold that Tallulah later found a rather, ah, intimate way of making amends with both of them a few nights after pulling this stunt, though no one knows for sure if she ever really hooked up with Dietrich or not.


  • @boomzilla said:

    The proposed law calls for the repeal of multiple pieces of legislation in order to allow consensual sex between siblings over the age of 15.

    That part is creepy.

    @boomzilla said:

    The proposed laws would also allow for people to “bequeath” their dead bodies for intercourse by giving consent while they are still alive.

    But I don't really see the complaint for this one. They aren't using it anymore and if someone is saying it is OK (by donating it) then you aren't offending their religious sensibilities.



  • Breaking news from 1979!


  • I survived the hour long Uno hand


  • ♿ (Parody)

    And, sure, it’s fun to be defecated at, but some of this stuff seems questionable.



  • As inappropriate workplace behavior goes, that one ranks up there with hiring Byron Hall to staff a Rape Crisis Hotline.


  • :belt_onion:

    @abarker said:

    it appears that they are loading from the front of the truck semi-trailer.

    P<edanted>TFY



  • That's just fucking insane! Bombs? In the land of the free and the NSA a guy is blowing up the nerves of employees and gets a PROMOTION?!?
    That guy would have got more money if the supervisor touched his ass.



  • I wonder why they did not indict the guy - I mean, even the article states that he was notified of his 5th amendment rights which means that they knew this was at least an iffy issue.

    I mean, reckless discharge of a firearm is a felony in quite a lot of places. Blowing up a bomb intentionally in the vicinity of humans which is omnidirectional by design should be even more of a problem.

    Then again, he wasn't a muslim. He'd probably be on his way to Gitmo by now if he was.



  • @ScholRLEA said:

    I know! We should do a Kickstarter to produce a Battlefield Earth/Leonard Part 6/Pluto Nash crossover set on Kashyyk! With Kevin Costner, Pauly Shore, Tommy Wiseau, and Adam Sandler in the lead roles, and Michael Cimino co-directing with Uwe Boll!

    Huh, I was expecting to get at least one good "Why would you do that?" out of this. SON I AM DISAPPOINT.



  • Possibly the worst idea.


  • Discourse touched me in a no-no place

    @ScholRLEA said:

    I was expecting to get at least one good "Why would you do that?" out of this.

    Too obvious. ;)



  • That's even worse than St Pigeonations.



  • @dkf said:

    @ScholRLEA said:
    I was expecting to get at least one good "Why would you do that?" out of this.

    Too obvious. ;)

    Just so, just so.



  • Now if M. Night Shamallamadingdong or however his name is spelt was directing...



  • Of these, you consider the worst director:
    [poll]

    • Roland Emmerich
    • M. Night Shamylan
    • Uwe Boll
    • Michael Cimino
    • Michael Bay
    • Ed Wood
    • Kevin Reynolds
    • ERR_WORSTNOTFOUND
      [/poll]v

  • Notification Spam Recipient

    @ScholRLEA said:

    v

    I don't recognize any of these entities.



  • I find it interesting that out of 5 votes so far, there are zero votes for Ed Wood, Jr., director of such masterpieces *cough* as Glen or Glenda, Jail Bait, Bride of the Monster, and the movie widely considered the worst film ever made, Plan 9 from Outer Space. The other candidates may be bad directors, but are they really worse than that?



  • I was thinking of including Harold P. Warren on the poll, too, but I didn't think dignifying his one effort in the field as 'directing' was justified.



  • No Colman Francis? No Rick Sloane? NO ROGER CORMAN? THE GREATEST 'B' MOVIE DIRECTOR OF ALL TIMES?!

    Pfft.

    Anyway Colman Francis is the clear winner. And unlike Harold P. Warren he didn't give up after just one flop, he kept going.

    BTW there's a lot of overlap with the "Worst Producer" list, except you gotta add Golan Globus' Cannon Films, makers of some of the worst schlock of the 80s (including The Apple) and as an added bonus, guilty of stealing money from their few quality films (like the Superman series) and directing it into their shitty flop films (like Alien from L.A.).



  • Emmerich - 2012, The Day After Yesterday, Independence Day - not a bad director if all you want is action and explosions, but still basically a second or third rate Michael Bay at best.
    Shyamalan - The Sixth Sense, Unbreakkable, The Lady in the Water, The Last Airbender - once the hottest new director in Hollywood, he's gotten more and more self-indulgent (not to mention incompetent) since his breakout films Sixth Sense and Unbreakable.
    Boll - Bloodrayne, Alone in the Dark, Far Cry - and those are his better films. He specializes in films based on video games, despite having a professed hatred of them. It shows.
    Cimino - The Deer Hunter, Heaven's Gate - proof that no amount of talent can overcome rampant egotism without someone else being there to put on the brakes. Went from a Best Director to single-handedly driving an established Old Hollywood film giant (United Artists) into bankruptcy in two years flat. While Heaven's Gate surely could not deserve the rep it got as the worst train wreck in cinematic history, the fact that he spent two years and $45 million (1981) to put out the most over-hyped art-house film in history (lavishly shot and immaculately detailed, but still shoddily written and acted) with a film that could have been done in 16mm on a sound lot for a twentieth of the cost, meant his name was shit for over a decade afterwards. At least some industry wags claim that half the money went up the noses of the cast and crew, and apparently that may not have been too far off - the one-horse Wyoming town it was shot in had more arrests for possession during the shooting than the entire rest of the state did.
    Kevin Reynolds - Waterworld, Robin Hood, Prince of Thieves - Aren't those enough for him to qualify? OK, he's done a few good films, but the bad ones massively outweigh those.


Log in to reply