The real value of the Ask Slashdot article, however, is that people are suggesting actual Distros. So far xubuntu doesn't get a lot of hits, suggesting that perhaps I didn't select the very best option for my own head-to-head tests. If you do decide to install Linux on your low end laptop, you should check it out:
Sunday, October 26, 2008
Best OS for low-end laptops: take 3
Just a quick update: less than a month after my two posts on the topic of the best OS for low end machines, somebody posted an Ask Slashdot on the same question. A quick glance thru the comments suggests that Linux is the most popular option, which isn't surprising given the audience.
Friday, October 24, 2008
Converting Windows filenames to Unicode
Let's say you used FindFirstFile, etc to get a list of file names. What character set will those files be in? Evidence suggests Windows code page 1252. Now, let's say you want to convert those 8-byte chars into Unicode. One easy way that almost works is:
wchar_t tmp[256]; // potential buffer overflow exploit here
swprintf(tmp, L"%S", name); // %S (note caps) converts narrow (8 byte) to unicode
This will fail, sooner or later, because this conversion only seems to work for ASCII defined characters (ie char values less than 127). WinLatin (1252) has plenty of characters which are not ASCII. You might think you'll never encounter them, but one way that they can creep in is if you use MSWord's smartquotes, and then paste text from Word into your filename. Probably filenames written by people outside of the US also tend to have these characters.
I don't know what would happen with swprintf if you had some other code page, but I'm guessing it also would be bad.
Here's the proper way to do it.
Not only does this work for 'fancy' characters, but it also prevents the buffer overflow bug.
Wednesday, April 30, 2008
Tribal Wars free browser game review
Tribal wars is a free, real time strategy game that you play from your browser. It feels a bit like single-race WarCraft 2, adapted to play in your browser and running about 100 times slower. Tribal wars (hereafter TW) is completely free, but has a premium mode which makes the game interface easier to use once you become a more powerful player. The game is quite popular, with over 500k players, spread across 15 different servers, each with slightly different rules.
The mechanics of the game are based around villages on a map. You start out with one village, which can produce troops, generate and store resources, etc. You can upgrade the village in lots of ways, and there is also a simple tech tree for your troops, at least on some servers. While there is some strategy in what upgrades you pursue, esp. at first, in the end you'll want most of them. One key aspect of the game is that everything takes time, from upgrading, to building troops, to sending the troops to other villages . Early upgrades take 30 minutes. Later, an upgrade can take 12 or more hours. Nearby villages can be reached by your troops in an hour, but soon you'll be attacking villages that are 5 hours away, and eventually you'll send your troops on attacks that take more than a day to reach their destination. This means that you'll never have a marathon 5-hour session of TW. At most, you'll log in for an hour at a time to upgrade you village, build up some troops, and launch a new attack. But, you'll need to log back in again later that day to keep things on track. Generally, 3 logins a day is sufficient. You can start to see how this game can be time consuming, and not so friendly to going on vacation. Luckily, there's a way to have another player in the game "account-sit", which means they can temporarily play as you, but don't need your password to login.
The other major aspect of the game is the tribes. While you can play alone, you won't survive long. You'll need to join a tribe, which I suggest you do early on, as it's a good place to ask for advice. Your tribe is made up of other players in the game, which you can email using the in-game mail system, or chat with using the in-game forum. The forum gets a lot of use, for planning attacks and co-ordinating on-going attacks. There's the potential for a lot of diplomacy in this game, as the only way you grow, more or less, is by taking over other people's villages. The art of it all is selecting villages you can take over with minimal risk to yourself and your tribe, and likewise, preventing other tribes from attacking you. Generally lots of alliances, and other loose agreements are made between tribes, and this aspect is as important as growing your army. While the game is most certainly PvP, it's important to note that there are protections that prevent new players from being wiped out, and really strong players from killing really weak players. The art of growing your empire in this game is selecting opponents who are weaker than you, but not too weak, and have a puny tribe.
Graphically, the game is good enough - not spartan, but definitely not flashy. If it weren't for the real-time aspects of the game, I would say it's a lot like playing a board-game with 30 other people (since the world is so large, you don't tend to interact with players that are more than 2 days away from you, in terms of time it would take to send an army).
Finally, I would like to stress that the focus of the game changes a bit as you play it, and your empire grows. The changing focus helps keep the game fresh, at least for a while.
I played the game for about 6 months, during which it went through about 3 distinct phases. At first, during the first 2 months, I spent all my time growing my one village, learning about the upgrades, and farming (sending attacks to NPC villages which do not fight back, but which produce resources that you can steal). New villages are started at the edge of the map, which slowly grows as more players are added. Thus, at first you are surrounded by players who are all the same strength as you, and all very weak.
Sometime in my second month I was able to take over my first village from another player, but the dynamic didn't change much. Once I had about 4 villages, however, I was able to start using them together to make it much easier to take more villages. This does change the strategy a bit. There were still lots of easy targets, because most of the players around me still didn't have strong tribes to defend them.
After another 2 months or so, however, every village/player was a member of a tribe, some much larger than mine, and some a bit smaller. At this point, the diplomacy aspect of the game became really key, because you need the other members of the tribe to help you gang up on the tribe you want to attack next. You can no-longer go it alone. I think this was the most fun part of the game. Around this time, it became more or less impossible to play for free, because you really need the premium features that make it easier to manage all those villages. Premium costs about $5 a month.
Note that I say was. After about 6 months I found the game was starting to lose its appeal. It got a bit tiresome to manage all 30 villages. I was spending about 2 hours a day on the game, and a lot of that time felt like work: logging in to build troops, upgrade my new villages, etc. Not so much of the time was spent on the strategy of deciding who to attack, and which alliances to strengthen.
I decided to quit playing at that point, though I don't regret the time I put into the game up till then.
Thursday, March 20, 2008
Canon camera (SD850is) and Win2k3 do not work
After installing the drivers and applications for my Canon camera, I get the following error on each bootup:
The Canon Camera Access Library 8 service depends on the following nonexistent service: SSDPSRV
Using regedit I searched for SSDPSRV, and removed this dependency (see thread that suggested this) so that the Camera Access Library would load, but apparently it really does depend on SSDPSRV, or there is another incompatibility with Win2k3. Turning on the camera does load the Windows Image acquisition manager (after I enabled that service), but does not load the Canon tool for downloading images.
The Canon Camera Access Library 8 service depends on the following nonexistent service: SSDPSRV
Using regedit I searched for SSDPSRV, and removed this dependency (see thread that suggested this) so that the Camera Access Library would load, but apparently it really does depend on SSDPSRV, or there is another incompatibility with Win2k3. Turning on the camera does load the Windows Image acquisition manager (after I enabled that service), but does not load the Canon tool for downloading images.
Subscribe to:
Posts (Atom)