2009-01-26

How to export data to one big XML file


My company had to add extra export format for data in a system I'm working on. I get specification and XML schema and started analyzing it for best fast solution. Data was ready to export so there left decision about choosing right way to make XML. Deadline was imminent, and everybody was really busy at work. Making export file - was good task for our newest programmer. He never parsed/created XML using SAX/DOM or other libraries, but was envy to use and learn one of the standard.

The main technological problem was the size of output XML. For biggest data case it would generate over 500MB XML with about 50000 nodes at highest level. It would be efficiently generated using only writing partially to stream technique like SAX. I have chose two options- use SAX or own similar simple API - realization time was crucial. Because XML structure was relatively easy - all tags without attributes, so we decided to use plain string buffer technique with addition of couple helper functions.

At the beginning I had objections about not using standard libraries that should help. But the implementation of XML format moved forwards, output file was easy to validate with XML schema. The most time was committed to handle non existing or incomplete data cases. The export function was ready before time. That is one of examples where using simplest tools, meets desired goal.

What are your choices in similar situation?

2009-01-19

Successful simple web based MMORPG

Massively Multiplayer Online Role Playing Games are at the peak of popularity. People like to play with other live players and compete with them. Game producers are gaining more and more profits from that kind of games, giving better and better visual and audio experience in pseudo 3d worlds. Is there a place for a technically simpler web based games?

One of my friends told me to look at the one classic game of that type: Fallen Sword produced by Hunted Cow Studios Ltd.. Game started, as I know in 2006 and today has about 2 700 000 registered accounts. There is probably massive amount of inactive players, but the number is still impressive. As I checked during day there were always above 2000 players online. So people like not only WoW 3D style games.

The main game concepts remind some of popular MUD games, with added graphics, auction house and trade between players suport. You can buy special game money units, for real money using for example PayPal account. Those units called Fallen Sword Points maybe used to boost game character skills or other attributes. Although there is no way out for money as company states in terms of use, in game economics is quite strong. People are playing game for fun, but sometimes are trying to trade game money for little services, like giving temporary skills boosts called buffs, or "selling" fan-art avatars. Those gray areas are acceptable, in other cases the real winner is producer.

The game lacks some responsibility that can be gained through more AJAX like components, but overall speed is acceptable. I'm trying to figure out other interesting features - and ideas for game people may have. I like those kind of the non highest tech but very playable games. I had one web based game started and unfinished prototype in past, so I'm interested in subject from a business point of view too.

2009-01-12

Dual boot system failure - Man and Machine tale

I have get a computer with relatively small HDD (only 80GB). It hosts Windows and Linux OS with GRUB boot manager. I needed more disk space so I decided to remove linux, and create new NTFS partition in that place. It looks simple. So I run the partition manager and checked what is what. First 100MB small partition looked like linux boot directory. Next was windows and then linux and swap partitions. Easy. Remove linux and windows partitions, format. All done. I played with Windows settings and decided to reboot.

Then I saw my mistake. I accidentally removed GRUB stage and config files with linux partition. The first one partition does not contain those needed files. I should check it more thoroughly. It sucks. I suck.

The first thought was, get the windows CD and rewrite master boot record with windows boot loader. But I have no cd/dvd drive in that machine. I don't have spare one in that location. But I have my laptop and USB pen drive. So maybe another option. I will install small linux distro as a power utility and reinstall GRUB. That's I like more.
The first thing I tried to do was creating bootable USB flash drive. I have used couple boot images, and Puppy Linux distro, different BIOS settings - my machine does not allow me to boot from USB. Not good.

So I decided to boot windows by manually configuring GRUB. After little research and experimenting I have booted into Windows. Now every time I want to boot that machine I have to:
  • get into GRUB prompt by pressing 'e' key
  • write GRUB commands
root (hd0,1)
makeactive
chainloader --force +1
boot

Nice "hacker" style setup. It was definitely not finished yet.

I next part I write how I made that system more usable.

2009-01-05

Happy New Year 2009!

Begin of the year is the magic time of new commitments and promises.

I'm going to fulfill my professional goals and having more fun in life, doing that in a healthy way.

Greetings.