Local browsing with CoolIris

UPDATE: You can simply use CoolIris 1.10 for the same purpsose

Full-Screen, 3D — Cooliris transforms your browser into a lightning fast, cinematic way to browse online photos and videos. Our “3D Wall” lets you fly through thousands of items in the blink of an eye on an infinitely expandable wall. To enjoy Cooliris on Google Images, Facebook, YouTube, Flickr, and hundreds of other sites, click the Cooliris icon that appears when you mouse over media on the supported site. Or enjoy Cooliris anytime by clicking the browser toolbar icon. See http://www.cooliris.com/product for details.

I was looking for an app that let me browse through my image gallery Apple style – PhotoFlip™, but there seems to be none, unless I download Safari :-/. I don’t want a new browser right now, so I turned to the next best thing: CoolIris. Somehow I vividly recall this is a project started from Microsoft Research but I can’t find any trace of Microsoft there. Maybe the Cooliris team doesn’t like Microsoft in the end. 😛

Well, at least I expected it to be able to automatically detect links to picture on a page and then let me view them. It supported Flickr and Google Images off-screen loading, which is much more complicated than a list.

What a shame it doesn’t.

I’m not the only person looking for a “standalone CoolIris” to view my files, the CoolIris forum is filled with similar requests but the best response they can give is “wait” and an “CoolIris Lite” in which the effect is much simple and you seems to have to add files manually.

No problem, I can fix that.

I tried the “quick” option from the developer’s site but that turned out to be the more complicated option since I have to generate both the expression and the gallery for it to work, so I tried the full option: I created a C# application that will read files from the directory you want, write two files “media.htm” and “media.rss” to the output directory.

  • Media.htm contains one picture to activate the CoolIris icon on the toolbar, links to media.rss.
  • Media.rss is the feed that lists the files which will let CoolIris know the full list of images.

The core part of the application follows

            // Read jpg and jpeg from target directory
            string[] Files = Directory.GetFiles(textBox1.Text, "*.jp*");
            // Prepare the feed
            StreamWriter writer = new StreamWriter(textBox2.Text + "media.rss");
            writer.WriteLine("<?xml version="1.0" encoding="UTF-8" standalone="yes"?>");
            writer.WriteLine("<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss" xmlns:atom="http://www.w3.org/2005/Atom">");
            writer.WriteLine("<title>Generated photos</title>");
	        writer.WriteLine("<link>file:///" + textBox2.Text.Replace("\","/") + "</link>");
            writer.WriteLine("<description>Photos from my trip to Africa.</description>");
            int Counter = 1;
            foreach (string FileName in Files)
                FileInfo Item = new FileInfo(FileName);
                writer.WriteLine("		<title>" + Item.Name + "</title>");
                writer.WriteLine("		<link>" + "file:///" + FileName.Replace("\","/") + "</link>");
                writer.WriteLine("		<guid>img " + Counter.ToString() + "</guid>");
                writer.WriteLine("		<media:description>" + Item.Name + "</media:description>");
                writer.WriteLine("		<media:thumbnail url="file:///" + FileName.Replace("\","/") + "" />");
                writer.WriteLine("		<media:content url="file:///" + FileName.Replace("\","/") + "" type="image/jpeg" />");
                writer.WriteLine("	</item>");
            //Prepare the HTML file
            writer = new StreamWriter(textBox2.Text + "media.htm");
            writer.WriteLine("  <head>");
            writer.WriteLine("    <link rel="alternate" href="media.rss" type="application/rss+xml" title="" id="gallery" />");
            writer.WriteLine("  </head>");
            writer.WriteLine("  <body>");
            foreach (string FileName in Files)
                FileInfo Item = new FileInfo(FileName);
                writer.WriteLine("<a href="" + "file:///" + FileName.Replace("\", "/") + "">");
                writer.WriteLine("<img alt="[Image]" src="" + "file:///" + FileName.Replace("\", "/") + "" class="photo">");
            writer.WriteLine("  </body>");
            //Open the HTML file with the default browser, hopefully it's the one with CoolIris installed
            System.Diagnostics.Process.Start(textBox2.Text + "media.htm");


Application interface

Fill in the directory containing the pictures you want to view in the first text box, the second could be your temp directory. Click generate to generate the files mentioned above and open them in your default browser, click the CoolIris to activate CoolIris (this extra step is required because I don’t know how to call CoolIris on a file directly; the “Launch CoolIris” application seems to open Cooliris.com only).

I also made a command line interface with which you can call the app with 2 parameters. The first will go to “Directory” and the second to “Output”. If you run the app this way it will generate, open the file and then close itself.


Download the application


  • .NET Framework 2.0
  • CoolIris enabled browser

Something you may not know about your HDD

It’s inside your computer, and it doesn’t care whether you are a gaming maniac or an internet a holic. As long as you have to turn on your computer daily, one day it will make Murphy’s Law apply to you too: bad stuff will happen when it can cause the most damage.

Take a look around the internet; you’ll see you are not the only one concerned about how long your data will live. The crude fact is: your drive is not immortal. For most people who uses their computer daily, their HDD (from this point, it means magnetic platter drives)’s life will span from 3 to 5 years [4], really short if you ask me. If you don’t have enough money to replace a drive every time this period comes around, you’d better not store anything important there.

Besides obvious factors that will damage your data like a magnetic field, electric shock or physical shock, an invisible element could be temperature [5]. There are HDD fans to address this issue, those fans are quite cheap, they cost from $2 to $5. Others claim those fans will blow dust to other components. Well, if they would mitigate the heat issue that would not be a problem with me, since I take my time to physically clean my computer’s components every 3 months.

From the above source [5], there is also a ridiculous sounding argument: spinning drives will cause drive motor’s lubricant’s to spit out and condensed on the platters, making the drive crash. If that were such the case, why would they use such a lubricant in the first place? However, the spin may have something to do with it, as with every motor, any kind of movement would wear them out over time. It’s possible to stop your drive from spinning when you don’t use it through power management or some utilities. You can’t use this however, if your drive is frequently read from or written to [6].

Years ago, some guy from Quantum claimed that there’s little can you do to prolong your hard drive’s life span [1], so does Google’s 2007 research [2]

Failure rates are known to be highly correlated with drive models, manufacturers and vintages. Our results do not contradict this fact For example, Figure 2 changes significantly when e normalize failure rates per each drive model Most age-related results are impacted by drive vintages. However, in this paper, we do not show a breakdown of drives per manufacturer, model, or vintage due to the proprietary nature of these data.

You may think that high usage will make your drive fail you sooner. Actually the situation is more complex than that.

Hard drives less than three years old and used a lot are less likely to fail than similarly aged hard drives that are used infrequently, according to the report.

“One possible explanation for this behavior is the survival of the fittest theory,” said the authors, speculating that drives which failed early on in their lifetime had been removed from the overall sample leaving only the older, more robust units.” [3][7]

So, use your drive frequently when it’s still have warranty to make sure they are good, before giving them a rest :P. Some may say drives nowadays’ lifespan is shorter than before because of their high spin rates. That may be true though, but I can recall I hardly have my hard drive read or written when I was programming Pascal on a ram drive back in my 486 time :). As a matter of fact, the two hard drives I have back then still work now, a 200MB and a 800MB with spin rate somewhere below 5k. Sadly, you can’t have Visual Studio 200x to compile anything without writing to your HDD, even if you lay all your files on memory, VS would never fit csc there.

Back to the main topic, Google’s report also reveals that the temperature – failure correlation is complex too.

As you can see, the lowest failure rate is reached when the drive is around 40 degrees Celsius, be careful applying HDD fans. Though I think I will need one when my drive get older. When transferring the aftermath remains from the crashed drive to the new drive, I noticed the older drive (Samsung) is hotter than the newer (Seagate), though I’m unsure this is because of their age or being a brand matter like Google said.

Even though they say SMART failure somehow correlated to actual drive failure, you can’t depend on that not-so-smart feature to know when your drive is going to fail you. Actually, Google can’t even model how SMART errors affect failure rates

The attribute with highest failing rate is “anything” :P.

Google’s research shows that drives which have their first bad sector have 10 times probability to fail that intact drives. I may agree with this. The first time you hear a click from your drive (I mean a clear click you can hear from half a meter away, from outside the case), you can start backup your data, as your drive may fail you anytime from the next 2 weeks.

In the end, what you can do, you don’t know (because Google is mean :()! Despite being extensive and well conducted, Google’s research can’t accommodate every possible use case a normal user (e.g. you) will encounter. You can’t just stop yourself from turning the computer on (to control drive usage) those days, the net has become something you need like air, water or food! Thus, it’s best to simply do what you feel best to keep what you value most with you. There is a tip that works for everyone though: backup early, backup often and make as many backups as possible.

For a conclusion, there is a Wikibook dedicated to this topic, which I would recommend. [3]

Side story

When netbooks comes out, a new kind of HDD is introduced for the public too: solid state drive or SSD (my definition for a hard drive is something fixed in your computer and is not a removable media drive). My first opinion about them is that they won’t last long, since their life depends on the number of times data is written on them, what would happen if you download stuff, short on memory and the OS have to swap, or surf the internet with them (in which case the cache will get written and rewritten, again and again). Some of my colleagues already have their pen drives (which is basically the same technology as SSDs) failed after about 2 or 3 years usage. And lastly, the netbooks are cheap, the pen drives are cheap to, and cheap stuff rarely had high quality. 😛

However, some folks from a Mac forum may have proved that I’m wrong [8]. SSD can be written around 1 million times, plus they have 25% bonus capacity for wear leveling. They calculated that SSDs could outlive the owner if used sparsely. Well, time will tell.


(Don’t flame me for not having them sorted)

[1] Why good hard drives go bad

[2] Failure trends in a large disk drive population

[3] Minimizing hard disk drive failure and data loss

[4] How to Take Care of Your Hard Drive to Prevent a Crash

[5] BAD SECTOR: bn cht, nguyên nhân và phòng tránh

[6] Using spin down to prolong the life of old hard disks

[7] Hard disk test ‘surprises’ Google

[8] Replace Hard Drive with Flash Card “SSD”

The webgame storm

It was not so long ago the web was still a bunch of text-only HTML without CSS and stuff. Now it can open your documents, let you communicate, catch the latest scoop on entertainment, then why not play games on it?

Before, the web was designed to deliver text-based content. Most related technologies are also text-oriented: CSS, XML, AJAX, and JavaScript. But now, as browsers have got more mature and text features are saturated among competitors, there goes the performance race. JavaScript got faster, as JIT compiling and other interpreted language technologies are improved. Now games are feasible and the web game industry began to rise. GIF for sprites, PNG for effects, JavaScript is capable of image processing is far than enough to make a game possible.

For web game, you know I don’t mean those simple flash games you play at work to make your boss mad, but instead role playing games that will take you an indefinite amount of time to play, just like Lineage or Ragnarok. Those game is also a kind of society, where players can communicate with each other, thus games could be considered a part of the 2.0 hype.

This is far from being an exhaustive review of web games, but instead the experiences I have with them.

Gaia online

Possibly the most influential web game now is Gaia Online, a collection of game and community activities. As the biggest, it also causes most controversial problems (say pedophilias). It’s not a single game with a single story but it does have role playing elements like quests. Nevertheless, it’s nice interface and huge community is quite attractive to those who have nothing else to do. Gaia also sure inspired a lot of modern web games.

Gaia online town

Gaia online town

Image: CNET


Gameforge is an influential game maker emerged recently. Though their games are pretty much in beta stage, their international approach (provides as many language as possible) seem to be effective. Based on the number of new games they release each year, it’s clear that they made quite a lot selling enhancements to their games. Those enhancements does not provide a real advantage over those who don’t have time, but that’s a right move: they attracted a huge number of free players that even the slightest advantage will have effect toward thousands of another players.

Most of their games are real-time. That is, moving armies or explore and area will cost you hours in real life. It’s up to you when to care about the game but the more you care about it, the more successful you are. It’s like the Japanese’s Tamagochi where your chicken is now a gladiator or an empire :P.

They also don’t have a nice interface like other producers. I’m unsure why but all their games look pretty clumsy to me

Ikariam is the most recently Gameforge game I played. You can build cities in an ancient Rome theme. You build cities on islands with a specific resource. Among them: Wine, Marble, Crystal and Sulphur. You can freely develop your empire, research to improve technologies, build troops to defend your empire or wage war at another, trade and exercise diplomacy with other empires. Addictive and time-consuming. Though you don’t have to wait for the buildings to build, you are always at risk getting attacked if you are not prepared; and even if you did prepared, you might get attacked by someone stronger anyways :p

Ikariam city view

Ikariam city view

Before, I have also played Gladiatus, where you play the role of a Roman gladiator. You can fight others, work to earn money, do quest to gain fame etc. Simple interface, you don’t actually see the gladiators combat and I get bored after a while doing repetitive actions: work – quest – explore – buy / sell items – dungeon – work, and get bashed by stronger players (though their levels are lower). It’s still a mystery how they get so many gold to win at auctions ;).

Other Gameforge games include bitefight, kingsage and ogame.

Though those games are of great entertainment value, Gameforge is quite stingy to rely that much on volunteers to exercise control on the game. Even when it cost them almost nothing hiring those volunteers (they pay by in game bonuses), they are still reluctant to hire some more. It’s funny when they don’t allow multiple accounts in their rules but doesn’t have any automatic control over user registration. Instead they rely on 5 game operators to ban each of the violating accounts. Imagine when 30% of the server of 10 thousand players decide to go against the rule, what will happen?

Well, that is happening already and it made those games tasteless to me now, since Vietnamese are so clever to dodge the rules to satisfy their deflated self-esteem in games :(. What’s the good for that anyways? Games are games and they still spend hours to fight in game, and then take another hour to fight on the forum. In the end, it turns out that all the big shots are multis 🙂 (Note that multi account players have a huge advantage over those who don’t, say, a 1000% increase in resources by manipulating the clones).

I’m off until those games get better so I can play it the way I want, undisturbed by idiots who have no reasoning capabilities. I’m giving away my accounts for Ikariam and Gladiatus for someone who can take care of them under one condition that I can borrow them sometimes :). My Ikariam account is 4 months old on Gamma and has 3 cities: level 16 -16 -15. The Gladiatus one is somewhere around level 19. Email me if you have inquiries about this.

Aurora blade

A RPG, where you can actually cast spell, do action and handle items, which you once thought it wouldn’t possible without a 2 GB client :P. Its graphics is quite nice though the image compression is somehow flawed (you can see jagged JPGs all around). Nice game with rich content, from monster fighting, quests to game events. Though it’s criticized for copying many designs from Ragnarok and WoW, it still take quite a lot of effort to build this game and integrate all the graphics. Cheers for the Chinese! (IGG is founded by Chinese).

In Vietnam

Though the big guys have developed quite a stand in this business with quality games and strategic moves, smaller publisher and developers still find their foothold somewhere. Sadly, most of the games in Vietnam are still just translations from foreign developers (again, Chinese). Though they employed large advertisement campaign and sexy cosplayers I still find little interest in them. First, they are from China. What’s so great about Chinese games? Or are they paid by the Chinese to accomplish the cultural elimination the Chinese was unable to complete years ago? Second, under their colorful interface, you can barely find the register link (sometimes you actually have to ask to be shown the register link :P).

There are quite a lot of stuff to entertain you on the net already. Web games are still at the beginning of their era. Even though they have come over technical challenges, most of them still don’t fit the average user’s playing habit. For any SimCity fanatic out there, Ikariam is like a disater where your beloved city get ripped of its bone by aliens from the next planet :P. Each of the game has its own strength and weakness, competition between them would be a fun thing to watch in the future.

In Vietnam, I don’t think any of those games will make a difference.

  1. The current economic crisis have driven away some hardcore player. They have to make a living!
  2. There are fewer clients who is willing to buy virtual stuff to support a game.
  3. Unless Vietnamese gamers’ barbaric and lawless attitude is changed, those game won’t attract the more educated classes. Playing along with idiots is pretty irritating. (LEEEEEROY!)

End of another lengthy post 😛


Tumblelog is a term coined in 2005[1] to denote blogs which favor short posts, most of the time sharing only a single item. I encountered the first such blog on 2007[2] but it didn’t really impressed me. Not until last night, when I was shown a comic translation blog [3]. Tumblelogs are just great for the purpose! It allowed instant sharing of daily comic (one thing jumps right in my thoughts: there is a bookmarklet somewhere) without any comments, category or other hassles. On the other hand, perhaps the comic blog above is too simple it don’t tell us where the comics come from, nor mention Garfield’s author (so I’m not condoning it at all, just an example).

It’s also worth a note to distinguish between tumblelog and microblog. While microblog is primarily aimed at status updates, it also allows you to post multimedia content like tumblelog. But your status could change anytime, anywhere, so you’ll need an equivalent update convenience (e.g. mobile updates). On the other hand, tumblelogs are designed to share content, and as you may encounter most content while surfing, think bookmarklet and email-to-post. You can see the gap between two services is not big, and as this article is being written, more features are being stuffed to twitter (that’s why its interface has turned in to a big bunch of text instead of one line of status :P)

Okay, too much ranting again. I only wanted a short review about current tumblelog services when I started writing!




Not the first Tumblelog software, but the first one is currently down so I can’t test it :P.

Tumblr seems to be the most popular tumblelog service around. Clean interface, but there are only a few themes available. None looked good enough for me :/. The theme installation from theme garden worked erratic somehow. For the functionality, Tumblr is pretty good, it pulls the page to its server after you add it with the bookmarklet; analyze the page to find contents you may want to blog about on the page.

Tumblr could be linked with twitter so that all twitter updates will be copied to your Tumblr and vice versa. Also, you can import feeds, bookmark from social bookmarks and posts from other blogging services (thus Tumblr could also act as a bridge to let your twitter followers know when you write a post or bookmark something).

Media could be uploaded to Tumblr but there is a 10MB file size limit (I’m unsure what the storage limit is, see quote below). If you want to post bigger stuff, you are on your own.

Tumblr retains the right to create limits on use and storage in its sole discretion at any time with or without notice. [Terms of service]

The bookmarklet is in the “Goodies” tab; there you’ll also find your email-to-post address, iPhone app and third party apps. The dashboard interface is a little clumsy, functions are distributed on tabs, sidebar, and a menu; but that doesn’t seem to limit Tumblr’s popularity.

You can customize the theme with HTML and CSS. You can also attach your Tumblr to your domain as long as you are able to modify A records (it took a really long time to propagate through the nameservers so you may be unable to view your blog for one or two days if you use this). There are APIs available, but I haven’t looked to see what they can do (yet).



Quite a competitor for Tumblr, most of the features are the same. The interface has more web 2.0 slides and fades, but the page still refreshes to update itself so I’m still not completely satisfied with this service. It allows you to import from more services (say furl or weheartit) but its bookmarklet isn’t as good. It will only detect media on popular sites; it does not analyze the page so it’s very likely that you’ll have to prepare a link to the media first.

The basic theme structure seems to be fixed. However you are allowed to theme it with CSS


Seeing Tumblelogs in action somewhat annoy me why such a small amount of content take a whole page load? Isn’t some AJAX to flip pages are better? Then I went to the usual developer’s craze wanting to develop a whole new service that satisfies my every need, since the above are hosted by the blog provider. And as paranoid as a user may be, leaving data on a stranger’s server just doesn’t bring a nice feeling :P.

Fortunately, thank to the free culture (as in free beer :P), someone must have done the job for you! In this case it’s Pedro Santana: from Gelato’s homepage you can download the source (latest at the time of writing: 0.95).


Pretty close clone of Tumblr. To the average user Gelato only provides basic features. You can blog, change the theme, use the bookmarklet but that’s all. The advantage is you have full control over it. Its template share similarities with WordPress.

Still no AJAX for page transition, which I’m pretty disappointed since it advertised itself “built upon AJAX”. But I don’t think that would be a problem though, you have the source of a working Tumblelog!

Location service emulation on popular platforms

This post in a nutshell: How to run GPS emulation with several mobile platform and a short evaluation of each.

Windows Mobile

On Windows Mobile 5, you get a “GPS” settings applet but there is no GPS emulation tool. The attached documentation (GPS sample) state that you’ll need a real GPS device for the sample to work (and remember to configure it for develapment!); then I downleaded a new version hoping for better support. The first thing I noticed touching the WM6 SDK is the vast amount of tools added: Cellular network emulator, package tools, test framework, and of course among them: a GPS emulator. Looks like Microsoft has finally started to fear Sun.

The GPS emulator is in WM6 SDK folderGPS. Access the CAB file from your device to install it. Additionally, the settings.exe can only be run inside the device and is the same things as the GPS applet. The documentation is still vague, but the tool works.

Here’s the interesting bit: The WM6 FakeGPS work perfectly well on WM5, so you don’t need the new (and huge) SDK to work on location services, just copy the FakeGPS from someone who installed (it’s around 1MB)


The data file structure is pretty clueless, but I may eventually figure that out after some more searching :/


What left to be wondered is, why GPS is taken out of Smartphone and available only for PocketPC? While it’s true that a phone ‘s functionalities are not as easily extended with cards and stuff like a PDA but some of them can locate themselves; or Microsoft thinks 3G should not include location services? Oh well…


Given the previous experiences with Symbian, I expected this platform to be the hardest to configure. Looks like I worried too much :). You can select the emulated location service from the phone’s settings. Just go to settings / general / positioning and select simulation, choose settings on this mode to choose emulation data.

Symbian’s emulator can read 2 types of data: the one Windows Mobile used above (nmea.nme is included with the demo) and .sps files. Sps files seem to define non-deterministic movement, like this:

Horizontal accuracy=10;
Vertical accuracy=16;
TimeToFix min=2;
TimeToFix max=7;
Powerup time=5;

Getting the sample application running is pretty easy too. They even have 4 more examples for this topic and each comes with detailed information on how the classes work.



The most straightforward platform! The Location service example is there (called CityGuide), Location and landmark service is built-in with the emulator. To simulate movement, from the emulator choose MIDlet/External events, toward the bottom you’ll see the “Location” group, click Browse to select the path file (City guide comes ready with a path file, citywalk.xml), press play and you are on the move!

The data file is different from both of the above platforms, which belongs to some kind of standard, which is good but to me J2ME’s xml is the best! It’s the cleanest and most human-readable data. Ph34r the power of XML!

<waypoint time="6500" latitude="14.394759972655674" longitude="50.10266737954043" altitude="310" />
<waypoint time="1500" latitude="14.395190022566581" longitude="50.102641304996304" altitude="310" />
<waypoint time="1500" latitude="14.395487422916618" longitude="50.10265163602227" altitude="310" />
<waypoint time="1500" latitude="14.395935213738783" longitude="50.10265925148049" altitude="310" />


I think the landmark tool is build for some purpose, but clearly the sample work well without any tweaking by this tool.