Why is Hello World considered a good "first program" instead of FizzBuzz?

Why is Hello World considered a good "first program" instead of FizzBuzz?

Hello World sets the standards way too low and does not tell nearly anything about the language itself; only tells the command to output a message to the terminal.

Other urls found in this thread:

css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/
twitter.com/SFWRedditGifs

>Why is Hello World considered a good "first program" instead of FizzBuzz?
Because it tests if the compiler was set up correctly. It's not about actually programming.

I've never heard of fizzbuzz, honestly. Don't even know what it means.

It's basically an extremely simple logic problem used by graduate/entry level interviews to rule out morons.

I doubt it's still used because capitalism piguu actually started making TUTORIALS for pajeets to learn specifically how to fizzbuzz.

It is a training program for beginners to distinguish those who can actually solve problems. Basically you loop trough 0 to 100 and output either Fizz or Buzz on specific iterations. Probably the most common rules are:
>if current iteration is multiple of 3 print "Fizz"
>if current iteration is multiple of 5 print "Buzz"
>if both print "FizzBuzz"
>if none print the current iteration number

Because it checks that the developer can debug with print statements.

Only the specific string they are told though.

All you need to do is change FizzBuzz to something verrrrrrrrrry slightly different. It will be equally effective.

I use: Count from 1-100, and say whether each is odd or even.

That's enough for debugging.

Because printing something to the screen is the most basic task that almost every program is going to do. It's something to learn and something to check that you're not an absolute retard, and something that you can use afterward to check everything you make to see if it is working properly.

FizzBuzz needs to print output to work. If you try to code that without learning how to output first then you won't know what the fuck is wrong when you bugger something up.

Universal interface of program is standard input and output. Hello World mostly uses standard output.

FizzBuzz is usually simplified by "just print" the sequence on screen, while it can go slightly deeper with separating logic from side effect. You can create function that gives you result for arbitrary input; create array of results or iterator over result.
It might be good standard second program.

Because Hello World tests that you can make a program that compiles, compile it, and run it. It's not meant to test knowledge of actual coding.

This

mostly tradition: the hello world script was used as an example in early C books and it stuck, because while writing it you can give a very good introduction to the basics in coding in any language

Let's just see how many concepts you get when writing your hello world to the console in any language:
>#include statements or equivalent
>(namespaces)
>main method
>method return value (types/void)
>how it interprets strings ("")
>learn what the console is if you don't know already
>putting a line to the console output - introduction to functions, the ; symbol (if not python or similar where ";" is not used)
>pausing the program
>actually returning a value in languages where the main method is not void
>ending the program and when it ends
>how to compile/run the program

A very good intro to any language and you can immediately go to more language specific topics like data types, loops, conditionals etc.

Also as said: there will be people whose first encounter with programming will be a hello world script. They probably don't possess algorithmic thinking yet.

>there will be people whose first encounter with programming will be a hello world script. They probably don't possess algorithmic thinking yet.
No, what I meant is that even if you're an experienced programmer it helps to write a hello world program when learning a new language because it familiarises you with the process of compiling/running programs in this language.

In fact, if you're not learning some esolang or something like lisp, chances are the syntax for a fizzbuzz is going to be bog-standard in whatever new language you're learning, so for experienced programmers a fizzbuzz carries unnecessary complexity with no added value compared to a hello world.

When you see stuff like this that teaches none of that. What does "puts" mean? Why is the 1 there? It tells nothing, just shows how to output a string of text. Doesn't introduce you to classes or namespaces.

anyone that thinks fizzbuzz rules out morons is also a moron. seriously doing fizzbuzz proves that you can rote memorize a solution to widely known problem. basically it says the candidate has read about programming on the internet, or done some research on possible interview questions. it is another cancer on our industry.

puts="put string"
the number denotes the device it will be outputted to. 0 is STDIN, 1 is STDOUT, and 2 is STDERR. Now I can explain to you what these are, but you probably know it. A newbie will not.
Also, Euphoria is an imperative language and not object oriented and doesn't have OOP elements, so your point is moot here.

It's a meme you dip

Do some languages not have the modulus operator? Can't you just use if x%3==0 and if x%5==0?

Isnt this incredibly simple?

Now imagine people apply for jobs and can't do this.

t. Enterprise SW dev

>sets the standards way too low
Standard is just right for "first program". Less things involved = less things that could go wrong.

>does not tell nearly anything about the language itself
It's not intended to do that. First program is first program. The task is to make it work.

>only tells the command to output a message to the terminal
Which is enough for the user to receive visual output to confirm success.

What the fuck. I can do this and I was a chemistry major who hasn't written a program since jr high.

well, some 70s processor designs didn't have a modulus command, but still stored the remainder somewhere when their divide command is called (6800, 8080, Z80, 1604, etc.), but by the 80s, the 8086 and 8088, as well as the Motorola 6809 had a dedicated modulus command in them
Literally every modern language has a modulus operator but it's not always "%", sometimes it's "mod" or similar.
Those without modulus operator have a mod() function or similar for that purpose.
In Haskell and Clojure, there are two functions to get the remainder of an integer division, "mod" and "rem" and they differ in how they handle negative numbers:
user=> (mod 1 5)
1
user=> (rem 1 5)
1
user=> (mod -1 5)
4
user=> (rem -1 5)
-1

dubs confirm my trips, so only quints can tell that's wrong

I know, but I bet you've never met a pajeet with a masters degree applying for a job... I have

t. Enterprise SW dev

what kind of questions do they ask in an interview for a programmer position? I'm stupid as fuck and even I can solve fizzbuzz. Is that truly enough to get a job in that field?

well memeded frend

You must act as a corporate dick sucking employee.

[spoiler]Sorry for the homophobia metaphor.[/spoiler]

All I know do have it
But it would still be pretty easy without modulus

I did it fist time before knowing modulus is even a thing (used whiles to count down and check if it matched zero or went over)

Well then allow me!

off by two
good try, though

FPBP

Which is why the "sum the first two million primes on the whiteboard" meme is not a bad idea if you remove the whiteboard bit. A small variety of simple problems rather than a well-known test with countless online solutions.

It doesn't rule out morons, it rules out people who are completely fucking incompetent and hopeless. Morons can at least be taught.

css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/