There's a Lot to Learn From Even Simple Puzzles

  • Comments posted to this topic are about the item There's a Lot to Learn From Even Simple Puzzles

    Best wishes,
    Phil Factor

  • Congratulations Barry! Now, I've gotta go see what the hell you did! 😛

    --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)

  • Phil and Joe, thanks for having that contest. There was a huge amount of participation, debate, and code comparison! I know you guys had to spend a heck of a lot of time wading through all of that and it's much appreciated!

    Well done to all who took part, as well. Some really great concepts bubbled to the surface.

    --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)

  • :w00t: Woo-hoo! Finally, my name in lights!

    Thanks, Phil and Joe. You too Jeff. 🙂

    Fast though it was, my submission was far from elegant or simple. Despite our head-knocking and despite even the loop in it, I would say that Mike Ross's last submission impressed me the most for simplicity and elegance.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • It was a tricky competition to judge for several reasons. Firstly, the entries were of such a high standard. Then they evolved, forked and cross-pollinated. It was also interesting to see the mutual help going on. It was like watching a horse-race where the front-running horses harnessed themselves together and crossed the finish line together. Actually, there were horses everywhere since some people seemed to end up with three or more submissions.

    Joe was very taken by the way that everyone had taken the trouble to read up on the theory of calculating primes and brought that knowledge to the task.

    We certainly agonised about whether the use of the number table should have been taken into account in the timings. however, we felt that because Joe had hinted that we wanted contestants to use that, we felt we should take a broader view of the general presentation, portability, documentation of the code etc, as well as sheer performance, so it never became the key issue.

    Well done to all the contestants; even the solution that I killed after it had taken 17 hours to calculate primes below 1000. It was fun to judge.

    Best wishes,
    Phil Factor

  • I, too, was amazed by the response to this. My initial thoughts were that the 10 people that enjoy math and SQL would jump in and most would ignore it, but there is some great work in the comments there. When Phil pointed this out to me last week that there were 20+ pages of comments, I was stunned.

    I think there is definitely something to learn, especially the thought process as people collaborated with each other to improve solutions.

    Great Job!

  • Congratulations Barry!

    It's a good thing they accepted your late submission 🙂


    N 56°04'39.16"
    E 12°55'05.25"

  • I loved your routine, Peso. It was great to follow the forum postings, and see the way that you quietly submitted it but it seemed to take a while for the other contestants to see how radically it performed!

    Best wishes,
    Phil Factor

  • Peso (8/11/2009)


    Congratulations Barry!

    It's a good thing they accepted your late submission 🙂

    True, and thanks again to you Peter for pointing out the bugs in my original solution so that I had a chance to fix them! 🙂

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Thank you!

    You did the hard work. I did nothing but finding some "edge" conditions for you to fix.


    N 56°04'39.16"
    E 12°55'05.25"

  • Speaking of puzzles, I am pretty good at them. One time, I put together a puzzle of a map of the United States in only 3 days, even though on the box it said "2 to 4 years".

    😀

  • Phil had mentioned something about the documentation in my code... It's nothing compared to the absolutely incredible documentation that some others included in their code. For example, you could probably teach a trimester of a math course with the documentation Barry included.

    What really amazed me is how that, even though it was a competition, everyone was helping everyone else. It was an absolutely amazing display. Like Phil said, all the lead horses crossed the finish line arm in arm.

    --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)

  • Jeff Moden (8/11/2009)


    Phil had mentioned something about the documentation in my code... It's nothing compared to the absolutely incredible documentation that some others included in their code. For example, you could probably teach a trimester of a math course with the documentation Barry included.

    ...

    Thanks, Jeff, I don't usually get compliments on my comments. :blush: Something about math puzzles that just makes me loquacious.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • ...makes me loquacious

    I believe they have a vaccine for that now... keeps mosquito's from landing on you, too. 😛

    --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)

  • A previous exercise elsewhere, which I think was about testing for primes in the fewest characters of script, was where I learned you can use @ as a variable name (and # as a temporary table name). That you almost always shouldn't is probably pretty clear!

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic. Login to reply