Californian Rants

Thursday, April 05, 2007

Moving out

Welcome... and good bye! I've moved my blog to my own server. Click below to go to the new blog.

Wednesday, July 26, 2006

Microsoft ActiveSync 3.8 deleted all my files!

Now how lame of a title is that?

Unfortunately, that's what happened. I've been having problems with Microsoft ActiveSync 3.8 for a while and decided today to uninstall it from my desktop PC, delete the partnership with my PDA, and install ActiveSync 4.1, which is available but not published yet by Micro$oft.

This is exatly what I did:
Control Panel -> Add or Remove Programs
Click on Microsoft ActiveSync 3.8
Click on Change/Remove
Click Yes at the prompt
Click NO at the prompt about deleting synchronized files

... and IsUninst.exe started to methodically and silently erase every single file and folder on my C: drive, except for those that were in use (the TrueCrypt drive, thankfully).

I was reading some stuff while (I had hoped) ActiveSunk hauled itself out of my Windows, until I realized that some icons disappeared off the desktop (it had wiped out %HOMEPATH%\Desktop). I refreshed the desktop and all but the standard icons (My Computer, Recycle Bin etc.) had disappeared. A quick check of the free space on C: revealed that 150 GIGABYTES OF DATA WERE GONE, and the free disk space increased continuously.

I quickly killed the IsUninst.exe task and the deletion stopped. The files were actually deleted, not moved to the Recycle Bin.

After a few minutes of absorbing the shock and internalizing the bare fact that 150Gb of my files were trashed, I pulled the plug on the desktop PC (best thing to do so as not to write anything on the affected disk) and moved to the laptop, which is now the hard-disk-crash-recovery lifeboat.

Now I'm left with an almost "empty" 216Gb hard drive partition, NTFS formatted and chock-full of files I need recovered. And it's 4am.

Tuesday, May 30, 2006

Nonsense spam backfires amusingly

You know all those spam messages you get that abound in nonsensical phrases?
mended as well as their bruises, their tempers and their hopes. Their plans were improved with the best advice. So the time came to mid summer eve, Elrond knew all about runes of every kind.

They're composed that way to fool Bayesian filters, but sometimes what comes out is a better filter in itself:

"shame of sex? we can change it"

Sort of Darwin Awards for spam.

Sunday, May 21, 2006

The Da Vinci Code Quest: Final Challenge - Solved in 5 minutes

I've just solved in ~5 minutes the Final Challenge on Google's Da Vinci Code Quest. You can view a video of my solution below, at Google Video or on YouTube.

The movie is not accelerated and was shot using Camtasia Studio.

Did I cheat?

Where is the limit between cheating and not cheating? Some have apparently reverse engineered the Flash code behind the puzzles to basically tell the Sony servers that the puzzle was completed ("this.onPuzzleCompleted();"). Others actually took the time to solve the chess challenge instead of brute-forcing it.

If you want to win, you have to cheat somehow. Assuming that reverse engineering the code would disqualify you, the only method left is to employ some sort of automation tool (unless you have a savant acquaintance) to solve the puzzles. This in turn requires an extra finalist account to test your tool, unless you want to risk sending multiple solutions from your real account. I'd like to thank Aaron Froehlich for promptly delivering the credentials for his finalist account.

Once you have a dummy account, you can play with it however you want and take each puzzle as many times as you need. You'll quickly observe that out of the 5 puzzles, the first 4 always start with the same configuration, so you can use some software to record mouse movement and clicks, input your solution then play back the recorded sequence automatically, at high speed, on the real account.

I used Macro Express and quickly noticed that there's a limitation as to how fast you can have the mouse move around and click. The puzzles make use of some fancy animation that may delay things.

Let's see how automating works for the 4 puzzles.

Sudoku: if you drag away a Sudoku symbol from the roster to the table, it will take more than 1 second for the same piece to show up in the vacated spot in the roster. The best solution I found was to maximize the period between dragging the same symbol twice to the table. I dragged, in sequence, each of the 9 different symbols to their location on the table, then restarted the sequence. This worked rather well, but the symbols are distributed a bit unevenly:

  • only 3 chalices
  • 4 fleurs-de-lis
  • 5 or 6 of the others

This is why at the end of the Sudoku puzzle you'll see that I had to lower the playback speed to only about twice "real-time".

Painting restoration: from numerous trials, it turned out that there needed to be a 180ms or longer pause before and after clicking a paint splotch, in order for the puzzle to recognize it was clicked. Then there is some animation when you click the second splotch, and until that animation is over, you can't click the newly formed splotch.

Curator challenge (arrange paintings): pretty straightforward if you don't over-accelerate playback.

Chess challenge: no real need for mouse automation on this one; you just have to click 2, 2, and 4, and the animation is much slower than a normal human would move a healthy mouse :)

Now the jigsaw puzzle, that's a totally different business. Different each time, that is. Recording macros won't help here. There are still a few things that I found:

  • if you drop a puzzle piece over its proper location, it will remain stuck there. This means you can bruteforce the positions of each puzzle piece
  • naturally, you start with the pieces in the corners and edges. The right edge has a nice property: you can't drag a piece with your mouse beyond that edge. This means you have less pinpointing to do when guessing a puzzle piece's place.
  • if you use the dummy account to watch the shifting images on the pieces for sufficient time, you'll create mental pictures of the target puzzle.

After watching my solution movie, I saw that I missed some obvious piece matches, so I'm confident someone out there does have a better time than mine (5 minutes).

I don't mind not winning. I was not a fan of the book and didn't become one after seing the movie. But for shaking Christianity's beliefs and for exposing the fears of some fundamentalist groups, I appreciate Dan Brown's work.

A quote by Robert Pirsig comes to mind:
People are never fanatic about what everyone is sure of. They're fanatic about matters that are in doubt.

Monday, May 15, 2006

How The Da Vinci Code Doesn't Work - from

This post has been moved to My new blog

Wednesday, May 10, 2006

The Google DaVinci Code Quest - solved without reading the book

Today at 10:00 PST, Google/Sony Pictures released the last question of the DaVinci Code Quest. To complete this final puzzle, you had to watch a video and answer three questions:

1. How many books was Sophie Noveu reading at some point?
2. What words was Robert Langdon wondering if Sophie heard?
3. What work of art of Leonardo's is hosted both at the Louvre and at the National Gallery in London? Its name was an anagram of some words at the end of the video that I couldn't exactly distinguish ("source of God's power on Earth"?)

Question 2 was the simplest to answer, straight from the video: "So dark the con of man". This is a rather famous phrase that you can see throughout the puzzles, and its anagram is "Madonna of the Rocks".

Question 1 I bruteforced and the answer is 2.

Question 3: Search Google for leonardo louvre national gallery london and the first link mentions "The Virgin of the Rocks" as being hosted in both locations. Unfortunately, "Virgin of the Rocks" is the wrong answer. If you return to the search results, there's a link to Olga's Gallery and you can see there an alternate spelling of the "Virgin of the Rocks": "Madonna on the Rocks". This is the correct answer and it took me 9 minutes to solve this puzzle.

Now it seems that those "words at the end of the movie" that I couldn't distinguish were not actually targeted by question 3. Instead, it referred to the same phrase: "So dark the con of man".

OK, so there you go, I solved the puzzles without having read the book (which I do NOT plan to read anyway). Let's see if I made it through the first 10,000 people who gave away their personal details in hope for a cryptex of dubious value (might be a good sell on eBay though, for al those conspiracy freaks).

The End is Near!

Today is the last day of the DaVinci Code Quest on Google. As I said in a previous post, I embarked on a quest to see how many puzzles I can solve without having read the book.

OK, so I solved all the puzzles without reading the book or the sites/blogs with answers, except for the question on Day 14: you had to translate krhglo from [... some (psuedo-) language ...] to English. At the time I did the Google query, "khrglo" showed up a few words before its translation, so I involuntarily cheated... :-)

In the process, I encountered some references to highly controversial stuff that Dan Brown clung to, notably the Priory of Sion. To quote from the Wikipedia:

If this is not a mere marketing trick, it would seem that Dan Brown takes the fantastic claims of the Secret Dossiers more or less at face value[...]

Anyway, I've heard from people who read the book that reading the book was of almost no help in solving the puzzles, so before I declare that I wasted my time on solving some variations of symbol-Sudoku, let's see how I fare today at the last puzzle.

Wednesday, April 19, 2006

Solving the DaVinci Code puzzles without having read the book

As you probably know, on April 17, Google launched an online contest for solving a series of 24 puzzles revolving around the book "The DaVinci Code" by Dan Brown.

My quest is to see how many puzzles I can solve without having read the book.

I will only use the Internet to search for information and I do not have an electronic copy of the book. So far, I have solved the first 3 puzzles, which I found of decreasingly (intrinsic) difficulty.

Why don't I plan to read this best-seller? Some time ago on a long road trip, I listened to some parts of it in an audiobook version. In the chapters of the book that I listened to, Dan Brown mentioned the striking properties of the Golden Ratio. After reading Nature's Numbers by mathematician Ian Stewart, you'll learn not to marvel at some hidden divine meaning behind everything, but rather spend your time trying to understand why things are the way they are.

It looks to me that Dan Brown is hung up on mysteries, secrets, conspiracies, coincidences and finding meaning in anything through various interpretative means. Remember the hidden, secret "Bible codes"? If you are willing to search, you can reveal "a secret that could change the course of mankind forever" in Moby Dick. So maybe this book should be treated entirely as fiction, including the numerous appeals to science. It's precisely this perversion of science that made me decide not to read the book.