April 2007 - Posts
I've just started a new section for this blog: Book reviews.
As the name hints, I'm going to review some books I read. The topics? Development, Game Development, Security and stuff related to work or useful for it.
The first review available is of a french book about Mind Maps. Here's an example of a "posting mind map" xD

Note: If you send me a copy (electronic or paper, I don't care) of a book, I will review it as soon as I can. I just ask to keep the copy for myself ;)
Yesterday I finally installed XNA Game Studio under Vista... and today comes the 1.0 Refresh. Someone did it on purpose :D
Anyway, here it is (at last), Windows Vista fully supported, 3D Audio and sharing of binaries (currently just between developers, but at least you don't need to share the full sources).
You can read more about it here and on the readme.
XNA Game Studio Express 1.0 Refresh can be downloaded here (beware, Visual C# Express SP1 is mandatory), and the redistributable XNA Framework runtime only refresh is here.
Yesterday I had to find a way to get the second row in a SQL query (but the same can be applied to a table). But it should be clean and should work with the third row, fourth, and so on.
We start by having this table:

And this starting data:

And this is the SQL query that would give us the 2nd row of that table ([34, 1] with our sample data):
SELECT
TOP 1 NumberOfPosts, UserId
FROM
(
SELECT
-- Here change the "2" for the desired Nth position
TOP 2 NumberOfPosts, UserId
FROM
TopBloggers
ORDER BY
NumberOfPosts DESC
) AS NPOSTS
ORDER BY
NumberOfPosts
It's curious how even in internet "the news" manipulate and tergiversate information to make it more interesting, dramatic, or like in this example, worse than really is.
Let's take a news post from The Register (a sensationalist site which from time to time says something useful, the rest of the time wastes bandwith of its readers): Program Names govern admin rights in Vista.
The article says:
"[...] If Vista sees that you have created a Microsoft Visual C++ project with install in the project name, then that .exe will automatically require Admin Rights to run. Create exactly the same project, but call it, say, Fred, and the problem disappears," he explained. "Vista's security isn't just concerned with what an .exe is doing to your PC, but what it's actually called. [...]"
F**k! All that UAC and security stuff was for nothing? Oh, we're doomed!!!
But wait... What if we dig a bit and read something about installers, UAC and Vista? Maybe we should try msdn.microsoft.com/windowsvista?
Ok... we can find a lot of info, and we can download all of it in CHM. Let's do it.
We open the CHM file, and navigate to Fundamentals -> Secure Applications -> Developing Secure Applications -> User Account Control (UAC) -> How UAC Works -> New Technologies for Windows Vista
Mmm... "Installer Detection"... What can this topic title mean?
"[...] Windows Vista heuristically detects installation programs and requests administrator credentials or administrator approval in order to run with access privileges. Windows Vista also heuristically detects updater and un-installation programs. A design goal of UAC is to prevent installations from being executed without the user's knowledge and explicit consent since installations write to protected areas of the file system and registry."
"[...] Installer Detection only applies to:
1. 32 bit executables
2. Applications without a requestedExecutionLevel
3. Interactive processes running as a Standard User with UAC enabled
Before a 32 bit process is created, the following attributes are checked to determine whether it is an installer:
-
Filename includes keywords like "install," "setup," "update," etc.
-
Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
-
Keywords in the side-by-side application manifest embedded in the executable.
-
Keywords in specific StringTable entries linked in the executable.
-
Key attributes in the resource file data linked in the executable.
-
Targeted sequences of bytes within the executable."
So, what do we have here... So it's not just the name. And more important, to make an application friendly to Vista's UAC you should create an application manifest and specify the requestedExecutionLevel.
Then, maybe this "installer name stuff" is not only part of additional security countermeasures, but a way to try to "catch" old installers and possible malware...
I've seen this news changed to even telling that UAC is "more or less just related to the exe name".
I don't think about myself as a "pro-MS" developer (excepting that I love C#), I don't love Vista and prefer Windows XP, but I'm actually working with UAC and developing a Vista-compatible application and the truth is that it may not be perfect, but it's a good improvement from the XP security model.
And I hate information manipulation ;)
Sometimes you need to copy some files to the output folder before executing your application from Visual Studio. This isn't a problem, unless you're going to execute a VS2005 unit test battery, because it creates a custom output folder before launching the test battery, so it's no easy task to move for example a xml file there.
This is an example of how a test output folder looks:

In the Test menu -> Edit Test Run Configurations -> (your .testrunconfig file)

Select the Deployment item, and here we are, all the files and directories added will be automatically copied before executing the tests.

Many thanks to Sibille for pointing me to the original source of this.
Few days ago, I installed a phpbb forum system for the UO shard I used to play on. This forums allow a lot of features and customization, from posting in different colors to changing the forum theme/style on a per-user basis.
I installed a dark, WoW-style theme, and the staff created a variant with brighter, brown colors.

Click on the image to see the real forum
The problem came when the users started writing posts in colors. Ones writing in dark green, others in pink, bright red... All who used bright colors were readable with the dark theme, but not on the brown/light one, and viceversa.
We tried telling the users to respect their companions and writing in standard/default color only (as the default color changes with the theme to be readable always), and the effect was the opposite: even more people writing in colors and trying to force the rest of the users to use their chosen theme.
So... we had to cut off their freedom, and after a bit of research I found and installed the User Disable Colored Text MOD. Now everyone writes in the default color, and while it's a bit monotonous, at least we enforce respect for the rest of the users.
It's a pity to have sometimes to force respect, when you've got the option to do whatever you want.
Some weeks after the official announcement of the Playstation Home "virtual world", now I've seen (at last) the official video/trailer:
I think that it is a fantastic idea to improve the social relations of gamers, who sometimes are a bit anti-social, and to make new friendships (even if just for playing online).
It is curious how things evolve with time:
- First, Microsoft creates the concept of Gamertag for its XBox 360. It is simply an online profile with an associated gaming scored that 360 games give when specific goals are met.
- They also have a 2D, tabbed (they call the tabs "blades") menu/interface, the XBox dashboard, where you can see your gamertag, send text/voice messages to your friends,and visit the online marketplace to download and buy stuff.
- Then, Nintendo liked the idea of the 360's Gamertag and created the Wii, a customizable 3D representation/avatar of the player. It doesn't have a gamerscore, but definetly is more personal.
- Also, they liked the 360's dashboard... and for their Wii they created the Wii Channels, a minimalistic, very easy to use GUI, suitable for all ages.
- In fact, Wii's version of the Sims will be cartoonish too, much like the Miis.
- And now appears the Playstation Home. A place where you create a realistic 3D avatar...
- And "live" in a virtual, 3D realistic mini-world as if it were the dashboard (complete with "gamerscore" as 3D trophys)
So, I think is fantastic as a social gaming concept. But, I don't think it is revolutionary nor new.. is just getting what works from other places and putting it together: The 360 marketplace and achievement system, the Wii's 3D Avatars, The Sims customization and gaming concept, the Second Life MMOG idea... Even the dances you see on the video are a copy of the ones you can do at WoW :D
Apart from the innovation point, Playstation Home system also brings me one doubt: are we going too much "virtual"?
It is not too much having a virtual house where to chat with your friends, with virtual furniture, virtual clothing, virtual music...?
I like RPGs and MMORPGs a lot, in fact I've been playing them since 4-5 years... But nothing compares to going out with friends and having some fun. Videogames and other tools like MSN Messenger help in social relations, but shouldn't be the base of social relations...
I have friends who live more on their virtual world (inside World of Warcraft) than in the real one. I mighthave passion for videogames, but if someone phones me for a beer I don't even think about staying at home
BTW, Sony thinks is not any bad, of course ;) Mainly because you can bet most of the virtual contents (furniture, clothing and so) will be sold, not free. So the more time you spend in the virtual world, more money you could spend in virtual stuff. I think I prefer my "just a monthly fee and infinite monsters to kill" mode :)
So, I think it will be fun, but also that the main purpose of Sony is to build a Sims Online clone to make some money now that the "online-mania" is high, so don't expect a revolution ;)
...then you can watch some films, like:
Or maybe go to the theater to see a spanish remake of the best Monty Python sketches...
Or travel a little to eat some delicious lamb...
Anyway, I hope that my finger is better and that tomorrow the doctor will allow me to remove the bandages... I want my fingers! :P (and I've got tons of things to do)
As you may have noticed, thes past days the portal has been offline most of the time. My hosting provider had a hardware failure, and the worst part is that they lost the data and had to restore a backup from the 10th of april. While may not be too much, We've lost 4 or 5 posts, plus 4 "concept posts" I had saved (but not published) as ideas to expand. Also, the phpBB forum I'm hosting for my friends had configuration changes, a MOD installed, and us heavly used (around 4k page visits per day and people is still coming and registering from the old forum)
So, to prevent further disasters, here are the instructions to setup the fantastic Windows Live Writer tool to have local copies of our posts while posting in this portal (or any CS 2.1 portal ;)
After installing WLW or choosing to add a new weblog account, we choose another weblog service.

Our weblog full URL, and our portal username and password.

It won't get our settings so we chose Community Server and put the host name at the start of the url.

And finally give it a name :)

We can use F11, Ctrl+F11, Shift+F11 and F12 to switch between views and control precisely how the post will look when published.
Also, I've installed Scott Water's CS Module to enable using the CS MetaBlog plugin for Live Writer, that allows to change our post name and/or the associated tags (which is what I wanted, to be able to add new tags from Live Writer).

Note #1: For Kartones.Net bloggers, just remaind you that you've got a ftp account to upload images of your posts and then link to them from here ;)
Note #2: Apart from Windows Live Writer, which is free, this post has been made with Faststone Capture (for capturing screenshots, free for home/personal use) and Paint.NET (opensource alternative of Adobe Photoshop, and better IMHO than GIMP). No need of commercial software ;)
While reading my feeds, I've found this interesting How-to article: How to become a Pixel Artist.
Pixel drawing would be obsolete, a legend in this days that everything is in 3D, but thanks to the mobile phones, it still lives.
As I grown up playing videogames (starting with a green & black screen Amstrad PC/W and the mighty Pong), I've seen the graphics evolve from 2 color to 16 color (NES, Spectrum), 64 color (AMIGA), 256 color (x86) and high-color before coming to 3D games. I've never been good painting, but when I was a child I spent tons of hours copying sprites from Monkey islands to a paper grided notepad, and then drawing them on my AMIGA with Deluxe Paint 2.
Apart from all this useless speech about my geeky childhood, I wanted to post the article link plus a few more pixel drawing links, just in case someone likes to learn more about it:
- Derek Yu's Pixel Tutorial: An excellent, step-by-step tutorial to pixel drawing. Very visual.
- The Complete Guide to Isometric Pixel Art: Another fantastic tutorial, this one oriented to learning how to draw isometric sprites (perfect for videogames ;)
- Gaming World: A massive 2D resource website, targeted for 2D RPG games. Contains thousand of sprites for characters, enemies, backgrounds, items...
- Game Sprites: Another huge collection of game sprites, both commercial and freeware/public domain.
Here's an example (from Derek Yu tutorial) of how a sprite is made:

It is well known that WEP encryption isn't very safe. The problem is that now it can be done in less than 2 minutes with a 95% of success :O
It works as previous attacks, by taking traffic and analyzing it to obtain the cypher key.
And that's not all... all of these being done with a normal laptop (Pentium-M @ 1,7GHz), which means anybody can do it.
Time to switch to WPA, or better, WPA2.
Source: ars Technica
Last weekend was quite complete of things... On saturday I had a barbaque (on a garage because it started to rain a lot) with some of my girlfriend's friends. Lots of food and nice drinks:

At night, I went with some pals from ilitia to see the Night of the Proms concert. It was quite good, with artists like John Miles or Tears For Fears, but my main "target" was Mike Oldfield...
And on sunday, we went to Toledo to walk a bit. Quite beautiful place, with big medieval walls and very narrow streets.

The only bad thing was that, when coming back, I got my finger slammed with the car's door and I almost broke it. I've got a fissure and the nail is quite damaged, plus the doctor put me a syringe on the right arm to avoid infections. So one week without coding nor playing videogames :(

I will try to post something this week, but writing this post took me a lot of time (not counting the photos...)
Note: As part of my "unification process", I'll probably talk from now on here about some offtopic subjects and leave my MSN Spaces blog (both because I still have too many blogs and because it is easy for beginners but crappy for anyone who wants to personalize his/her blog to some degree).