Forum Replies Created

Viewing 15 posts - 39,676 through 39,690 (of 59,072 total)

  • RE: FizzBuzz

    Steve Jones - Editor (2/22/2010)


    All things being equal, you pick the guy with the set based solution. However I've rarely seen "all things equal" between two candidates in an interview....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Steve Jones - Editor (2/22/2010)


    Jeff Moden (2/22/2010)


    ... which one do you think I'll pick?

    The one that says pork chop the most :w00t:

    Heh... nope... the one that brings in the...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    John Burris (2/22/2010)


    OK Jeff, I did the original problem in about 4 minutes. I thought it was good, but then I read the first 1/3 of your article....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    J.Faehrmann (2/22/2010)


    No offence taken, Jeff. But you made me think about my habits, thanks for that 🙂

    Being lazy and pragmatic is a very important developer attitude to me.

    I never...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    dmbaker (2/22/2010)


    In this competative world, the interviewer will pick the person who writes the best code in a reasonable amount of time and, be sure about this, it doesn't take...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Steve Jones - Editor (2/22/2010)


    No argument about the best programmer, and I'm sure I'd miss out on some jobs if this is the only criteria. In an interview, my first...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Just to be clear, folks... I'm not bad mouthing any of you for your solutions just for the sake of bad mouthing or criticizing... I'm one of "those" people that...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    J.Faehrmann (2/22/2010)


    I strongly favour the loopbased solution for this limited task. It is concise, readable without any comments and done quickly.

    It performs well enough.

    DECLARE @i INT

    SET @i = 1

    WHILE...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Steve Jones - Editor (2/22/2010)


    This isn't a test of great programming ability, it's a weed out of lower programming ability.

    I guess that would be a difference in expectations... I...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Jerry Day (2/22/2010)


    Jeff, with all due respect, I raced against the clock (5 min, 12 seconds) to complete this.

    The crux of the challenge was to code a successful solution...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Loner (2/22/2010)


    Jeff

    Why don't you post your 'perfect' answer?

    I can tell you why... people would simply memorize instead of taking the time to figure it out. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Jerry Day (2/22/2010)


    WITH bozo (i) as

    (

    select 1

    union all select i+1 from bozo where i < 100

    )

    SELECT CASE when i % 3 = 0 and i % 5 = 0 then...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    For all of those who are using a WHILE loop or Recursive CTE to perform the simple act of counting, please see the following article for a way to count...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    reidres (2/22/2010)


    Manie Verster,

    I notice that you used a temporary table rather than a table variable. Why did you make that choice?

    Thank you.

    There shouldn't be a Temp table or Table...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: FizzBuzz

    Gary Varga (2/22/2010)


    Richard is absolutely correct.

    Although I'd like to see a tribunal oversee a heated debate on coding standards - I'd be killing myself!!!

    Seriously though, it is an important issue...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 39,676 through 39,690 (of 59,072 total)