• Fun! (For me)
    • Posted on August 31st 2008 at 04:33 am
    • Coding challenge
      Update: I posted a wrap-up here.
      Here is an interesting coding challenge: write a counter function that counts from 1 to max but only returns numbers whose digits don't repeat.
      For example, part of the output would be:

      * 8, 9, 10, 12 (11 is not valid)
      * 98, 102, 103 (99, 100 and 101 are not valid)
      * 5432, 5436, 5437 (5433, 5434 and 5435 are not valid)
      Also:
      * Display the biggest jump (in the sequences above, it's 4: 98 -> 102)
      * Display the total count of numbers
      * Give these two values for max=10000

      Post your solution in the comments or on your blog. All languages and all approaches (brute force or not) are welcome.

      I'm curious to see if somebody can come up with a clever solution (I don't have one)...
      (from: http://beust.com/weblog/archives/000491.html)

      Here is my revised JavaScript solution (that actually works this time).

      My results

      Highest number Time
      1 0ms FF3
      10 4ms FF3
      100 29ms FF3
      1000 191ms FF3
      10,000 1,114ms FF3
      100,000 6,369ms FF3
      10^6 24,573ms FF3
      10^7 76,650ms FF3
      10^8 168,921ms FF3
      10^9 282,890ms FF3
      10^10 343,808ms FF3
      10^10 225,134ms Google
      Chrome
      10^10 198,170ms FF3 (on a faster computer)
      10^10 116,084ms Google
      Chrome
      (on a faster computer)
    • Carol James and the 'Axe the gas tax'
    • Posted on August 13th 2008 at 12:37 am
    • Carol James and the BC NDP are going on about how the gas tax is unfair and otiose. I say its a step in the right direction.

      1. The NDP constantly says that Gordon Campbell should "tax the big polluters instead". Well guess what? Automobiles are one of the largest, if not the largest in B.C.

      Read more...
    • Pandemic 2
    • Posted on August 6th 2008 at 02:37 am
    • With both the video tutorials, and the in depth guide, verily, there are no reasons to complain. If you are at least fairly competent with a computer, or have played Pandemic or other games, you probably don't need to watch the first video.


      Read more...