Treo 650 SIM tray update

Last night I received a small envelope in the mail from Palm. It was stamped “Replacement parts enclosed” and I was puzzled because I didn’t remember ordering any parts from them.

It turns out that they’re sending out replacement SIM trays to all Treo 650 Cingular Wireless customers. Apparently, the original tray doesn’t provide a tight enough fit for some SIM cards and can cause malfunctions. The new SIM tray has some additional ribbing to hold the card in place.

Kudos to Palm for supporting their customers and simply automatically sending out the part to those affected.

Beyond the C++ Standard Library: An Introduction to Boost

I just finished reading Beyond the C++ Standard Library: An Introduction to Boost. A really interesting read. Some of the more interesting things that I picked up:

  • boost::shared_ptr – like auto_ptr on steroids, a very nice reference-counted smart pointer. Not only can it clean up memory allocated with new, but you can pass in a custom deleter and thus use it to clean up anything, such as close a file or database connection, etc. The book also covers shared_array, intrusive_ptr, weak_ptr, scoped_ptr, and scoped_array
  • boost::numeric_cast can warn you when you’re casting a number to a smaller number type that will truncate.
  • boost::lexical_cast can convert back and forth between strings and numbers, thereby accomplishing in one concise line, conversions that I normally do with a few lines of stringstream code.
  • boost::regex can do all kinds of interesting things with regular expressions.
  • boost::any is an interesting variant type that allows storing several types of values, but is type-safe in the sense that it makes the caller specify the correct type in order to gain access.
  • boost::tuple is a logical extension of std::pair and allows a nice way to get multiple return values from a function:
    boost::tuple gcd_lcm(int val1, int val2);
    boost::tie(gcd, lcm) = gcd_lcm(15, 20);
  • boost::signal is an interesting “signals and slots” (or “publish and subscribe” or callbacks) implementation.

X11 ssh forwarding

Since I’ve been running Eclipse on my FreeBSD box and displaying it over X11 to my PowerBook, I wanted to enable X11 forwarding over ssh so that I wouldn’t have to manually set the DISPLAY environment variable. I tried ssh -X and it wasn’t working, until I realized that I had X11Forwarding No in the /etc/ssh/sshd_config file on my server. Once I changed it to “Yes” and HUPped the sshd, things started working.

Great Sudoku freeware for Palm

This weekend I discovered, and became addicted to Sudoku.

My family was sitting around the table doing Sudoku puzzles on paper that we had printed out from Web Sudoku and I was sitting there making little pencil marks with the possibilities and then erasing them and making a mess and it made me think how much better it would be if I could do Sudoku on my Treo…

A few minutes later, I had downloaded an excellent, color, freeware Sudoku game from Andrew Gregory. Very nicely done. The color makes it really easy to spot the numbers and there is excellent 5-way navigator and keyboard support on the Treo so that I can just move around and type the number I need to pencil it in or erase it. Hitting the number again marks it as permanent if it’s the only one left and it automatically fills in a number when all of the other possibilities have been eliminated. It’s a little bit hard to describe, but suffice it to say that the UI is very intuitive.

It’s freeware but Andrew asks for donations and I’m definitely going to send him something to thank him for the time he invested in this great app.

Master Sudoku : Step-by-Step Instructions for Players at All LevelsBrown Belt Sudoku (Martial Arts Sudoku)Black Belt Sudoku (Martial Arts Sudoku)

Boxwave adBoxwave ad