It’s an interesting question. I wish I could have seen the image below when I was trying to make sense of it:
All three print a count from one to fifteen. When the count is evenly divisible by 3 and 5, it prints ‘fizz_buzz’, when evenly divisible by 3 it prints ‘fizz’ and when evenly divisible by 5 it prints ‘buzz’. If none of those, it prints the number. You can see the count listed at the bottom of the image.
This is a classic computer programming exercise.
Aesthetics of Code
Whenever anyone shares their opinions on aesthetics, it’s important to remember that there are no right answers. Aesthetics are a matter of taste. So I’m just sharing my taste for code here.
Python is clearly the most concise. The Python code is three lines shorter than the other programs.
I like that Ruby doesn’t require semi-colons or colons. These symbols are annoying and require a close look. For me, it’s easy to mistake a semi-colon for a colon.
There is a question about how to write variables. One way is camel case (writingVariablesLikeThis), another option is to use underscore case (wirting_variables_like_this). Camel case is more concise, but I think it’s less aesthetically pleasing than the alternative.
Does that mean that I recommend learning Ruby as a first language?
What Programming Language to Learn First?
Do this in order:
Also, I’d suggest learning using Free Code Camp. I’m making a series of videos which I hope provide some special insights into the course work.