Scariest software development tool



  • So, I was just introduced to the scariest software development tool of all time

    What it does is autocomplete code fragments based on code posted on StackOverflow.

    Sure, the post has to have more than 50 upvotes, but keep in mind that if this had a PHP version, it would include things like truthiness just because it was popular.


  • :belt_onion:

    That is one of the top 10 funniest programming-related things I've ever seen.

    ... oh wait, it looks like they're actually completely serious about it....


  • sockdevs

    @powerlord I have the perfect reaction GIF for this, but I can't post it because GIF isn't a permitted upload ( @ben_lubar)


  • :belt_onion:

    It's pretty much useless except for the single specific example he uses to demo it. Tried out a couple of things just to see what it would do, and it returns a list of like 500 code samples that barely have any relation to the name of the function that I typed in.

    At least it won't be abused since it's utterly unusable.


  • sockdevs

    @darkmatter said:

    At least it won't be abused since it's utterly unusable.

    Since when has that stopped anyone? :P



  • PROPOSAL:

    Evolutionary AI. Will grab a swath of code from Stack Overflow using this tool. Attempt to compile and see what happens. Keep switching out "unfit" code.

    Run over a few million iterates. See what we get.



  • @powerlord said:

    So, I was just introduced to the scariest software development tool of all time

    What it does is autocomplete code fragments based on code posted on StackOverflow.

    Sure, the post has to have more than 50 upvotes, but keep in mind that if this had a PHP version, it would include things like truthiness just because it was popular.

    Truthiness?

    That is scary. The post notes that truthiness is set to True, but it looks like the result of the expression returns False. So that could be a terrible thing to debug...



  • @xaade It's broken operator precedence. = binds stronger than and for whatever reason. The second expression is what sets it to false as expected.

    Truthiness is a fairly common term for bool coercion, I believe it originated around Lisp.


  • :belt_onion:

    @Lorne-Kates do you even need an AI? I mean, a million monkeys already finished all the typewriter pounding, you just need to shuffle it into Hamlet now!



  • @CatPlusPlus

    I'm saying, pseudo code.

    if (!(result = a and b))
    {
       messagebox.show("I tested for result == false, but result is {0}.", result);
      assert(result == false);
    }
    

    I tested for result == false, but result is true.

    :wtf:



  • @xaade You tested for !((result = a) and b) because of operator precedence. And it assigns a to result, obviously. It's fairly stupid operator precedence to implement, but they really wanted that x or die() idiom to work, I guess.



  • This is supposedly just a showcase of the abilities of the author of the page, right? Nobody is seriously going to use this, right?



  • @powerlord said:

    So, I was just introduced to the scariest software development tool of all time

    What it does is autocomplete code fragments based on code posted on StackOverflow.

    Sure, the post has to have more than 50 upvotes, but keep in mind that if this had a PHP version, it would include things like truthiness just because it was popular.

    I would like to see a tool that did the same thing, but based on what's in
    Pastebin rather than StackOverflow.



  • @Lorne-Kates

    Be careful in what you ask for :smiley_cat: , because such a proposal is not only eminently possible, it is also irresistibly enterprisy...



  • @CatPlusPlus
    No, the operator precedence is like it is for a reason. Originally the idiom was introduced in Perl as $x || die;, but in cases like @info = stat($file) || die $!; you get the undesired side effect of forcing scalar context on the list expression so you end up with a single boolean in @info. That's why they introduced the ultra-low precedence logical and/or/(xor) operators. man perlop says

    Due to its precedence, you must be careful to avoid using it as replacement for the "||" operator. It usually works out better for flow control than in assignments
    and you get a "Useless use of a variable in void context" warning if you try and use something like `$a=$x and $y`.
    [^^^^^^^^^^^^^^^ @ben_lubar: markdown bug. Seems like the parser thinks we're still in the HTML block.]

    Of course PHP had to copy that stuff as badly as they always do.



  • @LaoC said:

    [^^^^^^^^^^^^^^^ @ben_lubar: markdown bug. Seems like the parser thinks we're still in the HTML block.]

    Either use Markdown or use HTML. Don't assume mixing them is going to do something other than what it shows quite clearly in the preview.



  • @LaoC said:

    No, the operator precedence is like it is for a reason.

    "Perl did it" only reinforces that it's a bad idea. :p



  • @loose said:

    @Lorne-Kates

    Be careful in what you ask for :smiley_cat: , because such a proposal is not only eminently possible, it is also irresistibly enterprisy...

    The monkey population in India is in decline.



  • @darkmatter said:

    That is one of the top 10 funniest programming-related things I've ever seen.

    ... oh wait, it looks like they're actually completely serious about it....

    I, too, am not sure whether this is meant to be a joke or not. I mean, on one hand, it looks too clever to be written by someone who would think this is seriously a good idea. On the other hand, it looks clever enough to be written by someone who spends their entire career copy-pasting code from SO.


  • Grade A Premium Asshole

    @Nagesh said:

    The monkey population in India is in decline.

    Stop eating them.



  • @Polygeekery said:

    @Nagesh said:

    The monkey population in India is in decline.

    Stop eating them.

    That is from Indian Jones. Total fakery. apart from some tribal and really backward people, nobody is eating monkeys.

    Reasons for Endangerment

    1. Loss of habitat is one of the primary reasons for the endangerment of species. Today, human intervention plays a major role in the destruction of the natural landscape. Human activities like removal of trees that provide both food and shelter for innumerable number of species, mining and agriculture.
    2. Over hunting and poaching has a very destructive and catastrophic effect on the number of animals and fishes all over the world.
    3. Pollution like air pollution, water pollution and waste pollution, especially in the form of plastic plays a very dominant role in the endangerment of animal species. Pollution not only causes health hazards for humans, but it affects the animals also.
    4. In a robust and hearty environment there is always an accurate balance between the number of predators and their prey animals. The predators who are natural enemies of their prey animals choose the old and sick preys as they cannot keep up with their group. In this scenario the relationship between them is totally healthy as the predators only eat these prey animals that are already nearing the end of their life. But the problems become more apparent when the predators wander in such an area where they will get only a few numbers of their prey animals.
    5. To save the animals from poaching and hunting they are often kept in a sanctuary and shelter. Though for some animals it has proved to be very much beneficial, there are other animals too who suffer and are in trouble for being endangered. The main two reasons are overcrowding and overgrazing. Usually there are too many animals that are enclosed in small areas. These animals often eat the same grass and trees in a limited area whereas in natural surroundings the grazing animals keep on changing the landscape while eating and keep on moving for most of the time. But in an enclosed and small area they eat from the same plants repeatedly which finally destroys the plants due to over-stress.

  • Grade A Premium Asshole

    @Nagesh said:

    That is from Indian Jones. Total fakery. apart from some tribal and really backward people, nobody is eating monkeys.

    I thought Temple of Doom was a documentary? TIL...



  • @loose said:

    @Lorne-Kates

    Be careful in what you ask for :smiley_cat: , because such a proposal is not only eminently possible, it is also irresistibly enterprisy...

    Not quite the same. They're just generating one line:
    Solving the Shakespeare Million Monkeys Problem in Real-time with Parallelism and SignalR



  • soon there will be npm based projects that download stackoverflow snippets as dependencies



  • @fbmac said:

    soon there will be npm based projects that download stackoverflow snippets as dependencies

    And soon after, 80% of the web is filled with interlinked dependencies like a big ball of spaghetti



  • @LaoC
    Section 4.6.6 of the spec explicitly permits this, just like Gruber's Markdown has for more than a decade. Well, maybe I was missing the blank line after the block, there's no way to check afterwards here, right?



  • @loose

    Could not decide: Here or "in Other News"? In the end, putting it here would be more in keeping with the general WTFy meme.

    INB4: CBA to see if anybody had posted it anywhere else.


  • Discourse touched me in a no-no place

    @loose

    Its official account @TayandYOu described it as "Microsoft's AI fam from the internet that's got zero chill".

    Is that English? I have been assured by people hipper than I that "chill" means sex. That makes things even more confusing.

    Do I need to start telling people to get off my lawn?


  • Winner of the 2016 Presidential Election

    @Weng said:

    "chill" means sex

    Only when combined with Netflix. Amazon Prime video and chill just means eating ice cream


  • Discourse touched me in a no-no place

    @Jaloopa said:

    @Weng said:

    "chill" means sex

    Only when combined with Netflix. Amazon Prime video and chill just means eating ice cream

    But I only have a Prime account! There's no Netflix exclusives I care about!


  • :belt_onion:

    @Weng said:

    Do I need to start telling people to get off my lawn?

    I started years ago. Once I get into the age where it becomes mandatory I'll surely be too lazy to learn how to do it properly, so I decided to get a head start.


  • Discourse touched me in a no-no place

    @Weng said:

    Do I need to start telling people to get off my lawn?

    Welcome to the :belt_onion: club!


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.