Friday, December 29, 2006

More anagrams

See if you can guess who is who without using an anagramming tool.
  • Aha Mist
  • A Maple, or Ale Map
  • I Rap
  • A Crier, or Racier
  • Orb Head, or Ah Bored or Do Rehab
  • A Tense Hip, Pains Thee, Apish Teen or Hate Penis

Hmm, that last one might be too crude to actually use much.

On hoboes

Did you know that a hobo once ran the US treasury? That, and more, may be learned by reading the excellent book by John Hodgman, The Areas Of My Expertise.

Even though he can't read, Army Don* seemed quite happy when Yum Lass** and I gave him a copy of this very book for Xmas. When he got to the list of 700 Hobo Names, he couldn't help reading the first few out aloud, and we all agreed that the best one (at least on the first page of the list) is All-but-dissertation Tucker Dummychuck. You can see the full list online here, along with pictures of the hoboes submitted by real people.

And as an extra treat for those that can't read or like listening to things, KUOW's The Beat featured a repeat of an interview with John Hodgman. It's fun.



* An anagram of his real name, to protect the innocent.
** Another anagram.

Thursday, December 21, 2006

Christmas comes early for tech support

It seems our company tech support guys are on vacation already. My main computer's power supply seems to have thrown a wobbly (technical term) after the winter storm last week knocked out power in Seattle.

I managed to call tch support a few days ago and get a real live person to open a case for my issue, but since then no-ones been over to fix the machine. Calls to tech support over the two days are met with 30+ minutes of the most God-awful musak ever. Every few minutes a lady's calm voice tells me all analysts are busy, and my call is very important to them, but I know the truth: They're all drinking eggnog at home!

In the meantime I managed to use my computer kung-fu to get 50% of my drives online in a temporary machine. Stay tuned for the next exciting installment!

Update: As luck would have it, I made it through to a real person after another long wait, and this time gave my cell number to the tech. I got a call over lunch, and came back to find my machine ready to go with a new power supply. Woohoo! Thanks Mr. Tech Guy, and happy Chrismahannukwanzaa!

Thursday, December 14, 2006

Retro games

I recently came across Retrospec, a group of hobbyists dedicated to recreating classic Spectrum and Commodore 64 games.

They have several completes games available on their website, including one of my all-time-favourites, Head Over Heels. I'm happy to report that Head Over Heels works well on Vista! :)

Then of course, there are emulators that let you run the original C64 and Speccy games on your PC. Some quick links: Gamebase64, Lemon64, C64.com, VICE

Somehow I'm more inclined to play remakes of the classic games that use the improved graphics and sound capabilities of modern PC's, but every now and then it's fun to fire up the originals and bask in their SID-tuney glory!

Wine Atlas

I've been enjoying one of my birthday gifts a lot recently. A bought me a copy of The Wine Atlas, and it has a lot of great general information on wine and grapes, as well as detailed maps of the great wine-producing regions of the world.

The southern hemisphere gets a bit of a short shrift (as usual), especially South Africa, which gets very few pages and only a map of the Paarl region. (What, no Stellenbosch, Franschoek, not to mention the other up-and-coming regions in the Western Cape, like Durbanville?)

Possibly one reason that the book spends less time and paper on the southern hemisphere (and even the USA) is that "new world" wines are much easier to understand simply by looking at the label. You'll usually be able to tell (unambiguously) the winery, grape type, vintage, and area the wine comes from. The back label will usually tell you even more (like climate conditions in the year of harvest, wine-making technique used, type and length of barrel conditioning, etc.)

Old-world wines are much more confusing. Most label have no grape type listed. Instead you'll get the chateau/winery name (sometimes), sometimes with a whimsical name, the vintage, and appellation/regional origin. The appellation, if you have an encyclopedic knowledge, will tell you what grape type(s) are used, and usually the style of wine.

Having the atlas means I've actually been able to begin to understand where the various French AOC/Vin de Pays and Italian DOC/DOCG regions actually are, what wineries are part of them, and what rules regulate the wine made there.

For example, take a recent French wine I drank: 2003 Domaine des Baumard Anjou Clos de la Folie. It's quite fun being able to look up the Anjou region in the atlas, read about the history and traditional wines made there, and see maps of the towns and vineyards/chateaux. I also found out that Anjou is mainly known for its rose and white wines, but that more wineries are experimenting with red wines nowadays.

For Italian wine, the atlas helps to seperate wines with similar-sounding names, like Montepulciano d'Abruzzo versus Vino Nobile di Montepulciano. It was also fun to look up Asti and see the familiar winery names (like La Serra, which belongs to Marchesi di Gresy).

It would be cool if there was an online wine atlas. (Google Maps or Virtual Earth maps overlaid with winery and vineyard info? Region names and borders, AOC/DOC/DOCG info. Maybe a nice mash-up to try to implement in the future?)

The Pinotage Club

(From Spittoon): Wine writer Peter May recently launched a blog dedicated to Pinotage (the uniquely South African grape variety).

I was pleased to see that Pinotage is being grown outside SA (in New Zealand and the US, based on the articles on the blog). Horton Vineyards, a US winery, plan to launch their first Pinotage next year.

Updated: 1/9/2007. Fixed Peter's name - thanks for the correction!

Wednesday, December 13, 2006

Credit-card fraud

Last night a friend was telling me about a recent surprise call she got from the Visa Fraud department. One Friday she had donated some money to four charities online, using her credit card. At 5AM the next morning, Visa were calling her to inquire about suspicious charges on her credit card.

That's a pretty quick turn-around and seems to implicate one of the charities she donated to. Either the charity was hacked, or a 3rd-party they contract with to process credit cards was hacked, or an employee somewhere along the line leaked the information.

All of this reminded me of how stupid and weak the current credit-card system is (and online shopping in general). Online merchants should not be able to store information in their systems that can later by used to charge you
A few years ago I was also the victim of credit-card fraud after vising South Africa. (The most likely point that my card information was "stolen" was when I bought some CDs in a store at JHB airport - I'm guessing my card info was copied down there or the card was cloned).

Online credit-card fraud seems to be the most rampant - and there's a large underground market in stolen card numbers and customer information. So why is it that Visa, Mastercard et al haven't come up with a more secure solution?

One-time use cards (1, 2, 3)have been around for a while now, and sound like a good stop-gap solution, since the underlying credit-card processing system can remain unchanged. Some card issuers (MBNA, Discover, CitiBank) offer this to their customers, and some banks that issue Visa cards offer it, but not all. (Not mine).

"Verified by Visa" is another solution, but doesn't seem to be being used by many people.

PS: If you're using a debit card for online purchases, be aware that the bank will not cover you for fraudulent charges (beyond a tiny amount, I believe). You're much better off using a credit card online - if fraudulent charges are made, you will not be held liable.

Friday, December 01, 2006

Blood Diamonds

Anil Dash has a post today about diamonds, following up to a post he did four years ago. I'm not sure how I feel about buying diamonds myself - I oscillate between not-so-bad-if-you-know-they-are-conflict-free to industrial-diamonds-only to none-at-all.
I definitely think it's worth knowing where they come from if you are intending buying them, though.

I was looking forward to seeing the movie, but after reading the first comment on Anil's blog, I'm less inclined. If Warner really did promise artificial limbs to amputees they hired as extras, and has reneged on that promise, they can whistle for my $9.

Snoek


Cooksister has a great entry on snoek, a fish commonly eaten in the Western Cape in South Africa. In a way, snoek is to the W.Cape what salmon is to the Pacific Northwest. Cooksister was lucky enough to find some in the UK (despite most Brits not liking the stuff - it was imported in canned form during WWII, and probably didn't taste great. Plus it's associated with deprivation and hard times - a bit like SPAM). I haven't seen any for sale in the USA (not that I've asked around too much).


I really like snoek and have fond memories of snoek braais when I was growing up. There's nothing quite like a half snoek, basted with butter and garlic, grilled on a charcoal fire. My aunt's mom used to make a mean snoek pate too... And then there was the frequent outing to Hout Bay to buy snoek in all shapes and sizes at Snoekies (a large seafood processor that had a "factory shop" open to the public).


It was also common to see people selling fresh snoek from the back of their bakkies (USA: trucks) during the summer, but my mom could never bring herself to buy fresh snoek. She had a really bad experience once with a snoek my dad brought home from the harbour, the rule being she had to clean and cook the fish and he would take care of the fishing or buying. this particular snoek turned out to be full of worm-like intestinal parasites, the sight of which was permanently engraved on my mom's brain. Luckily my uncle and his friend Michelle provided fresh braaid snoek on several occasions after the gruesome event, or I would probably never have had any!

Thursday, November 30, 2006

Bjarne Stroustrup interview

Something for the geeks out there: an interview with Bjarne. As Ali G might say "He's the geezer wot gave us C-plusity-plus".
Why's this article interesting? From the subtitle: "the inventor of the C++ programming language, defends his legacy and examines what's wrong with most software code."

Every few weeks there'll be a flare up of the old C/C++-vs-Managed-Code argument on the programming lists at work. It's certainly true that C and C++ both let you shoot yourself in the foot easily (and have nice exploitable security bugs in your code, such as buffer-overflows), but C++ also has the added tendency to introduce really nasty, hard-to-track-down bugs when you don't really understand what's happening under the covers. As long as you know exactly what you and the compiler, and the standard libraries (if you use them) are doing, you'll be fine.

C#/managed code generally isolate you from the nasty details of what's happening under the covers (at least, if you just use managed code and don't need to interoperate with native code). You don't need to worry about the difference between a container of objects and a container of pointers. No smart pointers to use or not use. And generally great built-in standard libraries.

Although I am not a C# and managed code expert, my take (and most other peoples) is that they're definitely a move in the right direction in terms of preventing stupid bugs from having security impacts. No more BO's and memory-management woes. Managed code is not automatically free from security bugs though...

Just 'coz it's green, doesn't make it guacamole

This is not exactly earth-shattering, I know, but it struck me as amusing anyway. From R:

http://seattletimes.nwsource.com/html/nationworld/2003454425_guacamole30.html Kraft guacamole is essentially a whipped paste made from partially hydrogenated soybean and coconut oils, corn syrup, whey, and food starch. Yellow and blue dyes give it the guacamole green color.

Shocked! Shocked, I am!
If you've ever tasted Kraft guacamole and real guacamole (or even just real avocado), you'd know it has barely a passing resemblance to the real thing. More like green cream-cheesey-type-stuff. The lawsuit is silly, but hopefully this will encourage more people to RTFIL (Read The Flaming Ingredients List).

For better pre-made guac, I heart Trader Joe's. As usual, they had some fun naming their's and called it Avocado's Number. From this article:
This dip pays homage to you mathe-magicians out there; the name is a play on Avogadro's number. As the label says, "Admittedly, there aren't 6.0221367 x 10^23 avocados in here, but 5 plus avo's isn't bad!" At $2.99 apiece, this godsend of modern grocery goodness costs less than if you bought the five avocados fresh.

My favourite guac from TJ's, though, is the one with fire-roasted tomatoes on top.

Tuesday, November 28, 2006

Darn, Steph got the easy test!

Steph became a US citizen a few months back. Now it looks like they're about to make the test a bit harder (probably to keep twits like me from becoming citizens, heh...)

See how well you do on questions from the current test here. (Uh-oh... I only got 35%)

Disposable email addresses


I noticed this on /. : 10-Minute Mail, a new service that lets you create a "throw-away" email address to use when signing up with a new online service. Most services require you to "verify" your email address by clicking on a link they send you, and usually once this is done, you don't want to ever get email from them again. (If you do, you would consider it spam).

As the name indicates, your 10-Minute-Mail account is only valid for 10 minutes (you can extend this if needed). That is normally plenty time to validate the address. There are two big disadvantages with this system, though:


  1. Sometimes you may actually want to get email from the online service, for example if you forget your password and they email you a new one. I don't know if 10-Minute-Mail lets you re-activate an email address when you know it is about to receive email you want to read?

  2. The email address generated is not very easy to remember (e.g. mail44901@10minutemail.com). If your email address is your sign-in/account name, you're stuck remembering a seperate, cryptic email for each service.

An alternative is http://www.dodgeit.com/, which provides free, receive-only email accounts. You can choose the address (good), and subscribe to a RSS feed to get notified when new mail arrives (nice). A slight downside is that since everyone shares the @dodgeit.com domain, you probably won't be able to get bob@dodgeit.com or amazon@dodgeit.com.


A solution that myself and a few friends use requires having your own domain (quite cheap), and having the domain set up to allow "catch-all" email forwarding. The way this works is that any email received by you domain that doesn't match a real account is forwarded to a real email address you specify (and that no-one can see publicly).


So, if you are signing up with CoolNewStuff.com, you could use an email address of CoolNewStuff@mydomain.com. Then, the few initial emails you get from CoolNewStuff.com would be sent to your real address. If at some point you start getting spam sent to this email address, you can filter it out easily.


Why not just use a single fake email address for all your online services? So that you can figure out who to blame if your account starts getting spam (usually this means the company sold your information, is spamming themselves, or has been hacked).

Winter is here!

Wow! November has been quite a month in the Pacific NW.
First we had record rainfalls and flooding, now an arctic storm has dumped several inches of snow around the Puget Sound and left the streets treacherously icy. I worked from home today and took a stroll at lunch-time to enjoy the sunshine. Despite being clear and sunny, the peak temperature today was in the low 20's F.

Here are some pics:


A patch of thick ice that had been broken up into chunks by a car


A snow-covered tree


The outside of our house

It looks like it we're in one or two more nights of below-freezing temperatures (which should make the morning commutes interesting), and maybe even more snow tomorrow night.

In the meantime, my mostly-snow-capable car (a Subaru) is stuck in the garage with a smashed rear windshield*, so I've been taking the bus to work for the past few days. With a bit of luck the windshield will be replaced on Thursday and I will be more mobile come rain, sleet or snow.

(* I parked outside a house near Cafe Flora and got a rock thrown through the window by a lawnmower... Lucky me!)

Thursday, November 23, 2006

Lillet, Kina Lillet...


From this article on IOL, it looks like the new James Bond film has caused increased interest in Lillet.

On-screen Bonds have usually ordered a "vodka martini - shaken, not stirred". But in Casino Royale, which premiered earlier this month, actor Daniel Craig lists Bordeaux aperitif Lillet as an ingredient of the spy's favourite tipple."Three measures of Gordon's (gin), one of vodka, half a measure of Kina Lillet, shake it over ice then add a thin slice of lemon peel," Bond asks a waiter as he duels with his adversary in a high-stakes game of poker.

That repeat of the recipe from Ian Fleming's first Bond novel has prompted viewers to contact the firm, which has just seven staff and has dropped the word Kina from its name.

Wednesday, November 22, 2006

More on Allegro

A few days ago I wrote about Scrabble and mentioned the Allegro graphics library.
It turns out that the creator of Allegro, Shawn Hargreaves, is now at Microsoft and has a blog.

He works on XNA Game Studio Express which looks quite interesting. Read his introductory blog post here, and there's lots more info on XNA on his blog.

Bits and bobs

Here are a few random bits and bobs, hand-culled from the Internets for you my faithful readers.

From the girls-you-ought-to-know-about department:
  • CNet has published a list of the top 10 girl geeks throughout history. Someone must have been sitting on their brains when they compiled the list, since Paris Hilton is included. I was also surprised to see Daryl Hannah, but she actually sounds far geekier than I gave her creditfor. (Liebrary, a game she co-created, sounds like fun). Who would you like to see on this list?

From the I-can't-believe-I-missed-this department:

  • The Decemberists played at the Paramount on the 17th of November. The Seattle Times has a glowing review. I need to hear/purchase their new album, The Crane Wife. Got that, Santa?
  • Prime Suspect 7 was recently aired on PBS. Now I need to wait for the DVD to be released (or pray for a repeat broadcast).

From the funny-stuff-that-will-offend-someone department:

  • Wolverine_nun had a link to this Harry Enfield video on YouTube: "Women, Know Your Limits". There's a lot of other good stuff from him on YouTube - all of it new to me. I'd heard of Spitting Image (which he did voices for), but otherwise not seen him before. Other triva from his Wikipedia entry: He was the first guest on BBC's Top Gear in 2002.

From the penny-stocks-and-sexy-pills department:

  • EWeek has a good article describing the link between botnets and the recent surge in spam. It's sobering to see that almost 50% of the infected hosts are running XP SP2 - despite all the security improvements Microsoft made. Vista will fare much better, I'm sure, but it will take a good many years to get those SP2 machines retired/upgraded.

Monday, November 20, 2006

New RSS feed

I noticed that FeedBurner (and/or Outlook12) wasn't too happy with the new feed from the beta Blogger, so I've switched to this instead:
http://beta.blogger.com/feeds/11494708/posts/default?alt=rss

If you notice bogus dates (1/1/2006) for all new posts, then please switch to the above feed.

Best use of a "Tears for Fears" song in advertising

... has to be the advert for the XBO 360 game, "Gears of War". (YouTube version)
PS: The game's website is pretty cool - scary, though.

The song is "Mad World", Tears for Fears' debut single. The version used in the advert is a cover by Gary Jules. It originally appeared at the end of the movie Donnie Darko. (Which I still need to see).

I was a huge Tears for Fears fan growing up - the first album of theirs I bought was "The Seeds of Love" and I loved listening to the "set" of 4 songs that flow together. After their breakup, they disappeared until "Tears Roll Down" came out in '92 (Orzabal was basically a solo artist using the Tears for Fears name still).

The next two albums ("Elemental" and "Raoul and the Kings of Spain") didn't make much of an impression on me. Orzabal and Smith finally reunited and released a new album in 2004 ("Everybody Loves a Happy Ending") which I've listened to a few times but didn't really love. Perhaps I've just outgrown my earlier tastes?

Saturday, November 18, 2006

Scrabble: Man vs. Machine


The Seattle Times today has a story about recent man-machine match in Seattle. Jim Kramer is the 2006 U.S. Scrabble Open champion, and played a best-of-3 match against RealNetwork's new Scrabble game. Jim managed to beat the computer 2-1, and walked away with the $10,000 prize.

Jim said:




...it was a victory that he wouldn't expect five years from now. The computer programs will be much more sophisticated, he said. "They'll just have much more brute force."


I'm not sure how much stronger Scrabble games will be in 5 years - Scrabble is a fairly simple game for computers to play (unlike, say, Go). The mechanics of the game have documented algorithms that can be used (Appel & Jacobson's "The world's fastest Scrabble program", for example). The tricky bit is the strategy - often playing the highest-scoring move will not ensure a win against a strong human opponent.

This is the algorithm I implemented for fun many years back when I was in university (as a hobby). The project was really fun and had some interesting challenges, the first of which was filling in the few gaps in the above paper so that the algorithm was clear. Other fun things (at least they seemed fun to me at the time):




  • Where to get words from? The most essential part of a Scrabble game is having a good list of words - they should be legal Scrabble words of course. I found a few free word lists online and used them, but had to try to prune out invalid words (proper nouns, acronyms). Eventually I found a nice OWL/OSW word list (I think it was 2-8 letter words) and augmented that with some longer words from my other source. I think in the end I had 130,000+ words.


  • Storing the dictionary in a file. The naive solution is to use a big text file. The program would then read this in and build a DAWG ("directed acyclic word graph" incase you care) for use when searching for words. However this was slow, and the file was huge. So, I started playing with ways to build the DAWG once, and save it as a binary file that was smaller and could be loaded quickly.


  • Compressing the dictionary. It turns out that there is a lot of redundancy in English words, and the DAWG has lots of sub-graphs that are redundant. This means wasted space on the disk (not such a big deal) and wasted memory (more of a big deal). I was coding all this in C/C++ and DJGPP (a free 32-bit compiler and port of the GNU C libraries). This meant I could use more than 640kb in DOS/Windows, but my home machine was not that beefy. (It was a 486SX with 4MB of RAM if I remember right). So, the huge dictionary I was using actually had problems fitting into memory unless I reduced it's size somehow. The solution was to look for the redundant parts of the DAWG and "fold them" onto themselves. Finding matches for sub-graphs was fun, and I had many iterations of my "dictionary builder and packer" tool. Initially it would take an overnight run for it to produce the final output file, but in the end it did its job in an hour or so! :)


  • Graphics. Since the DJGPP compiler and libraries I was using were pretty basic, I didn't have fancy Windows-style graphics I could use (no menus, windows, etc.) I used the fantastic free graphics library Allegro instead. This still meant I had to cobble together my own menus and code to handle the placement of Scrabble tiles. I also had a feature that would let you ask the computer for "hints". It would basically figure out all the possible moves you could make, and sort them in descending score. You could then drag a scrollbar and flip through all the possible words - really quickly.


  • Strategy. I left this to last and never really did anything wonderful (by this stage I was ready to move on to something else...) My game simply chose the highest-scoring move it could find and played that... It was still pretty hard to beat.


Sadly, the code to my Scrabble game disappeared when I upgraded to a new machine (stupid me for not having enough backups)!