Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. This is also a part of a basic series on git and how to use it.
There’s been a programmer test that was used for awhile to see if a simple program could be constructed. It’s FizzBuzz, after a kids game, and designed to see if someone knows some logical program construction.
The test is to produce a list from 1 to 100 and for multiples of 3, write “Fizz”, multiples of 5 produce “Buzz” and multiples of both produce “FizzBuzz”. This means you get:
It’s a simple test, but I wonder how long it would take you to write it in T-SQL? It took me about 2 minutes.
Give yourself a little quiz today. For a challenge, also produce this in PoSh or some other language. I took about 5 minutes in PoSh, mostly because I had to look up some syntax.
In case you think this doesn’t matter, I agree with Jeff Atwood. I’d like to look at someone’s code before I interview them for development. They should have some public code, maybe something they recommend.
SQLNewBlogger
If you’re looking for a blog topic, show us you can write this code.
I don’t know if it took me 2 minutes. I will say this, it ran the first time with the expected results. After reading the article it does amaze me that there are developers that would struggle over such a simple assignment.
LikeLike
I agree. Seems simple to me. we could argue slightly about the result set that should be displayed, but just getting the results should be easy.
LikeLike
Pingback: FizzBuzz in SQL | SqlSandwiches