3 ms·
I hope you have your mattress ready by your chair, because I just put this prompt in AI dungeon: $ You are a fresh CS grad. You're preparing for a job intervie
by TeMPOraL 6y ago
I hope you have your mattress ready by your chair, because I just put this prompt in AI dungeon:
$ You are a fresh CS grad. You're preparing for a job interview. You ask on StackOverflow: "how to write a FizzBuzz program?"
And, repeatedly pressing <Enter>, I got the following:
> The first response is from an experienced coder who has been programming for 20 years and knows the answer. He writes: "FizzBuzz is a simple algorithm that can be written in one line of code."
> He goes on to explain how you should implement it, but he doesn't bother to give any examples or explanations. It's all very basic and obvious.
> Then comes another coder with 10 years experience. This guy has a lot more knowledge about programming languages than the first one did, so he gives you some pointers. Although his advice is useful, it's still fairly basic.
> Then, someone with only 2 years experience answers. They give you some simplistic examples.
At this point, I add:
$ The first example looks like:
And the game immediately wrote the following:
int fizzBuzz ( int number )
{
if ( number % 3 == 0 && number % 5 == 0 ) printf ( "FizzBuzz" );
if ( number % 3 == 0 ) printf ( "Fizz" );
if ( number % 5 == 0 ) printf ( "Buzz" );
if ( number % 3 ! = 0 && number % 5 ! = 0 ) printf ( "%d" , number );
printf ( "
" );
return 0 ;
}
(Yeah, I know it hasn't really learned to code, but it apparently does have it encoded in its model.)