Archive for April, 2007

Baloons!

Monday, April 30th, 2007

This game is super addictive! Click on the image to play:

Baloons Game

It is a total time sink so be warned. mrgreen

Zombie Survival Plan

Monday, April 30th, 2007

Do you have one? If not, you should start planning. I posted about this before, but I think it’s time to bring it back up again.

Previously I advocated fortifying in some well protected building with food supply. Since then I changed my mind. Think about it - what happens to all these people in Zombie movies who stay in urban areas? They die! Barricading yourself in a mall is only a temporary solution. You will soon be out of power and if the zombies figure out there are people inside the mall they will start to accumulate in the parking lots like in Dawn of the Dead.

If there are 6 zombies outside, you have a pretty good chance to escape. If there are 600 of them, leaving that mall might not be possible without some clever plan - like building a spiky armored bus with chainsaw ports or something. P

Zombies

I think the best solution is to head for the most desolate, rural area you can think of. I live in NJ - one of the most densely populated states around so I’m pretty much screwed. I think the best option for me and my family would be to try to get out of the state. Me and my dad know some nice places in Catskills (Upstate New York) where we used to hike and fish. There are few small towns in the area, and lots of forests where you could camp out. I think if we could get out of NJ we could go into the mountains and camp out there. I have no clue where to get a gun around here, but there are at least 2 or 3 little gun shops up there in the mountains. I know because they also sold fishing equipment and bait. We could definitely loot one of them, or alternatively buy some guns if the town was not infected yet.

Few people around means less potential zombies to worry about. If you camp out in a remote area, living out of canned goods, fish and rarely go near the towns there is a good chance that zombies won’t be able to find you.

This would of course only be possible if we could find a safe passage out of NJ. Catskills are only about 3 hour drive from here but during a Zombie outbreak that might be a long trip.

Everyone should have a zombie survival plan. What is yours?

Jade Empire: Special Edition

Sunday, April 29th, 2007

I’ve been playing this game for some time now, so I figured that it’s time to write a short review. I picked this game up because Shamus Young was raving about it on the Twenty Sided blog. He usually has good taste in games (or at least one that seems to be close to mine) so I decided to give JE a try.

Jade Empire

If you liked SW:KotOR you will love Jade Empire

Have you played Star Wars: Knights of the Old Republic? Jade Empire is essentially the same game only with different combat and follower system, and a brand new, original setting rooted in Chinese mythology and folklore.

Jade Empire

If you loved KotOR, you will love JE. If you hated it, then probably you should skip this game. The core mechanics are almost exactly the same as in the Star Wars franchise. You walk around, talk to people by choosing responses from a list, and when you encounter enemies you enter the classic “combat mode” in which you can’t save the game or leave the scene by simply running away from the enemy. There are few core differences though.

The first major difference you will notice is the combat. JE uses a real time combat system that requires some twitch button mashing. The combat is simple. You have 3 types of blows - standard punch that can be chained into a 1-2-3 combo, a strong hit that takes few seconds to charge up, but deals massive damage, and breaks through blocks, and area attack which knocks down non-blocking opponents near you. You can also block, and double tap WSAD keys to jump over the enemy, jump back or roll to the sides to avoid projectiles.

This might get boring after a while, but the game allows you to fight with different styles. Style you choose defines what your basic blows do. Some styles for example let you shoot projectiles using your standard punch attacks. Some do not deal damage put paralyze or shock the enemy. Finally some styles let you transform into demons or animals.

All in all it provides very flexible combat system. Personally I love the Storm Dragon + White Demon combination. The former is a support style that shocks the opponents with electricity and they end up standing around and twitching for few seconds. Once I shock them, I quickly switch to the White Demon style which deals massive damage with it’s 1-2-3 combo. With both styles upgraded to the max I can usually kill most grunts with a single combo.

Jade Empire

In combat you need to watch for 3 depleting bars on the top of your screen: health, chi and focus. Health is your basic HP value. It goes down to zero, and you are dead. Chi is your magical power which lets you heal yourself, or use special support or transformation styles. Focus let’s you enter matrix-bullet-time like mode during combat. Also, weapons such as swords and staffs drain your focus.

For me the best use of Focus was super-running. If you enter the focus mode outside of combat, you can get places faster, and the focus drain is minimal. In combat I usually stick to normal and support styles and leave weapons to my followers.

There are essentially 3 main attributes: body, mind and spirit - which correspond to health, focus and chi. You can upgrade these when you level up. There are also some secondary attributes like charm, intimidation and etc that can be used in dialog options. These can be improved by buying special training upgrades, or using appropriate crystals. Each time you level up you also get style points to upgrade the damage, speed and effect duration of your styles. It is all really simple and basic, and it makes the game flow quickly.

Similarly to KotOR you can play light side or dark side: here they are called the path of Open Palm and the path of Closed Fist. So far I only played as Open Palm character. The advancement in these paths happens the same way as in SW game: your have to make moral choices during dialogs with NPC’s and you are awarded eiher good or evil points. Some styles and crystals can be used only by followers of one of these paths, and some quests are closed to you if you are following a path different than the quest giver.

The RPG element - namely leveling up, is much less complex than in KotOR. You might say it seems “dumbed down” but then again, JE has relatively different game play. Things happen faster, combats are real time and complex leveling up and inventory management would bog things down a bit. It’s more of an action-adventure game than an old school RPG.

Your followers do not level up with you. You might see it as a disadvantage but it really didn’t affect my progress. I would usually use my followers as a distraction - they would tie up few of the enemies so that I do not have to deal with a large group at once. I would usually wipe out all the enemies targeting me, and then swing by and help my follower get rid of his/her opponents. In other words, the followers in JE are much less effective, or important than in KotOR.

Jade Empire

A big part of KotOR was managing your equipment, upgrading your gear and etc. Jade Empire doesn’t really have any inventory to speak off. You can find or buy crystals, that can be placed in your magical amulet to give you various bonuses. There are also various attribute upgrades you can buy and quest items that you just carry with you and automatically use in conversations.

Opponents don’t really drop loot either. When you defeat someone, their cash is somehow magically transfered to you. Same goes with crystals and quest items - you either get them during the conversations, or you see a little dialog box informing you that you gained a new item at the end of combat.

The environment is pretty static and non-interactive. The only objects that you can actually touch are various chests, barrels, and vases that dispense cash or crystals when opened or destroyed. You also get two types of NPC-s static conversation/quest dispensers and no-name roaming extras who don’t have anything to say. Some people didn’t like this, but it is a fairly standard feature of RPG’s so I don’t have complaints about this, just like I didn’t have complaints in KotOR. Fully destructive environments are awesome, but not really necessary in a RPG game.

The strongest element of this game is the story. The plot is interesting and full of big and little twists, the setting is colorful and well exposed, and voice acting is superb. There is a healthy dose of humor, drama and suspense between the main story and the side quests.

The visuals are also pretty stunning - each location has it’s unique look, and you really feel like you are traveling through different lands. Most environments are easy to navigate, and layouts of towns are relatively simple. It is difficult to get lost, and in most cases you do not need to run very far to complete local side quests. In some cases it might feel like you are on rails, having only a single path to follow to reach the target. But the game makes up for that by often giving you different choices on how to accomplish certain tasks.

I haven’t finished the game yet so I can’t comment on the ending, but so far I really enjoyed it. If you loved KotOR you should definitely pick this game up. It plays at much faster pace, and requires some button mashing - but I liked that. It made it a fun and relaxing past time.

My rating: 4.0 stars
****

The game is slightly buggy at times. Here are some issues I found so far:

  1. On the pirate island, one of the enemies failed to enter the battle mode and got stuck in the doorway. When I cleared the room, he was still there. I was unable to attack him, or pass through the doorway. I reloaded the game, fought that combat again, and the second time around it was fine.
  2. In the imperial arena, when I finished talking to the promoter, I got stuck looking directly at the floor. This was some weird camera glitch - I would simply see the floor and my legs, and couldn’t get it to reposition. I saved the game, reloaded it, and the camera fixed itself.
  3. In the side quest with Sir Roderic, I defeat him in the debate, and we decide to fight. Once the fight starts and I can’t move, and my character keeps spinning in place - the floor is transparent, and Roderic is standing in one spot and not doing anything. I haven’t found a workaround, but some people suggest that changing your resolution right before the fight might fix it. I simply skipped this battle. It was a side quest non essential to the main storyline.

Despite those little bugs, I still highly recommend the game.

My First Adsense Check

Saturday, April 28th, 2007

Wohoo! I just got my first adsense check in the mail. It’s a free $120. mrgreen With what I pay for hosting this site, this check will almost cover the whole past year, not including the domain name registration fees. Awesome! Let’s hope my check won’t bounce.

Thanks to everyone who clickered my adz or white listed me in their adblock.

Several people asked me this so I figured I’ll share it here: this site usually earns me $30-40 a month. For example I earned $40 in March and about the same amount in April so far. In February I think I got around $30 and January was $20 something. Some months are better, and some are worse. It’s not big bucks but it helps to pay for hosting. )

Posting Twitter Updates using Java

Friday, April 27th, 2007

As you may or may not know, I’m working on a Java based Twitter client recently. Sending and getting data from Twitter is really, really simple. Here is how to do it in Java.

Let’s assume that we are trying to post an update to twitter with the following data:

String username = "someone@example.com";
String password = "password";
String status = "Look! I'm twittering using Java";

Twitter uses basic HTTP authentication which requires you to send a username:password pair encoded in base64:

String cridentials = new sun.misc.BASE64Encoder().encode((username + ":" + password).getBytes());

Now let’s create a HTTP connection:

URL url = new URL("http://twitter.com/statuses/update.xml");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);

Authentication is activated like so:

conn.setRequestProperty ("Authorization", "Basic " + cridentials);

Now we can send the update by simply writing to conn’s output stream:

OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();
wr.close();

Finally, if you wand you can grab and print out the XML response sent back to you by Twitter server:

BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line, output = "";
while ((line = rd.readLine()) != null)
{
System.out.println(output);
}

That’s it - that’s all you need to do.

Ruby on Rails doesn’t Scale Well

Friday, April 27th, 2007

Ruby is a really great language with some awesome features, and Rails make it even better. But it appears that it does not scale well yet. Twitter is a great example of using RoR to run a website with millions of users hitting your server few hundred times a day each. Amazingly enough, it seems to be running very smoothly lately, but they did have many rough spots in the last few months when the sites performance was really poor.

It seems that their issue is not the execution speed, but the Rails design itself. In a recent interview a Twitter developer Alex Payne said:

The common wisdom in the Rails community at this time is that scaling Rails is a matter of cost: just throw more CPUs at it. The problem is that more instances of Rails (running as part of a Mongrel cluster, in our case) means more requests to your database. At this point in time there’s no facility in Rails to talk to more than one database at a time. The solutions to this are caching the hell out of everything and setting up multiple read-only slave databases, neither of which are quick fixes to implement. So it’s not just cost, it’s time, and time is that much more precious when people can[’t]reach your site.

Emphasis was mine. The lack of support for multiple databases seems a huge bottleneck issue for high traffic sites. Most of us don’t even think about stuff like that when considering using a platform to build our applications with.

I still think RoR is a good platform. It just might not be ready for the enterprise scale apps like Twitter. Most of us however will never experience this issue - unless of course we get slashdotted or something. I’m confident that the Rails team will use the Twitter problems to improve scalability features in future releases.

Need a Project

Thursday, April 26th, 2007

Now that my thesis is done, I feel that my procrastination skills might get bit rusty. Or even worse, I might start using them at work. Oh wait, never mind - I already do that. Either way, I need more exercise in extreme procrastination.

So, I figured I need a project. Something that I could neglect, put away for later, and generally feel guilty about not doing. Yes, that is exactly what I need. mrgreen

So for the lack of better ideas I created a Java Twitter Client project on Google Code. Note that I haven’t written a single line of code yet. I haven’t really did much research on this either, beyond scanning through the Twitter API.

Why twitter? Perhaps because twitter is cool. It is still very hot on teh internets, and it’s API seems relatively straightforward. I’m not really looking to compete with Twitterific, Twitteroo and similar clients. This is more of a fun project for me to mess with.

Any input would be greatly appreciated. If you want to get involved and help out with coding, testing or whatever, let me know and I’ll add you to the project. Note that you will need a google account. If this project ever goes anywhere, we can always move it over to Source Forge. Google Code seems sufficient for now.

Of course I could host it here. I have subversion running on this very server. But Google Code offers integrated Wiki, and a bug tracking system which is nice. The 100 MB quota is kinda lame. Come on Google, I get 3 gigs for email, but only a hundred megs for code? WTF? Still, my current Eclipse workspace with 17 different projects in it, is only 30 MB. It should be enough, at least for the time being.

So, what do you guys think? Suggestions?

WTF Video Clip of the Week

Wednesday, April 25th, 2007

Alright… Anyone knows what the fuck is going on here?

What is this movie? WTF is with the little blue smurf dudes with machine guns? Anyone can recognize the language they are speaking in, or were they just mumbling intelligibly there? Btw, can anyone read the language that this video service site is using? Is it Chinese? Sorry, I can’t tell.

I don’t know what the hell is going on in there, but I want to watch the rest of it, if nothing else just for the WTF value. 10 points for anyone who can give me a title and/or link with more info (in english).

Thesis Defense: Final Update

Tuesday, April 24th, 2007

By this time of the day I’m getting tired of talking about it. But let me do this again for the sake of completion. Next time someone asks me, I can just refer them to this post and not have to recall the events of the day again.

My morning conversation with Dr. Robila:

Robila:
So, did you rehearse your presentation?

Me:
Well… I didn’t really rehearse-rehearse it. I kinda went over the slides several times in my head… I didn’t actually - you know - speak it out.

Robila: [with an OMG WTF expression on his face]
Oh…

Me:
Hey, I usually just wing these things. This is the most I prepared for a presentation in my life.

The presentation went fine. I actually even finished in the alloted time slot of 40-45 minutes even though I never really timed myself. As I said - I’m not a great speaker. I’m not even a good speaker. Ok, I’m a downright lousy public speaker. But I can wing it most of the time with little preparation, and actually make coherent points that don’t usually look like I’m reading my notes, or reciting from memory.

Here is what happened during the presentation. It’s probably funnier if you know the profs I will mention here but anyway:

  • Dr. Gutierez was probably the only person in the room who actually read my thesis and understood most of it. He had 3 pages of notes with minor corrections for me. Most of these were things like “eachother should be two words”, “change a to an here” and etc… Free proofreading! Yay!
  • Dr. Antoniou asked a lot of questions that may or may have not been on topic, or relevant to the thesis.
  • Dr. Benham didn’t say a word during the whole thing. I don’t think he fell asleep, but I might be wrong.
  • Dr. Zaritski argued with Antiniou about parallel processing
  • Dr. Jenq didn’t ask any questions - just had some comments to support of what I was saying
  • Dr. Robila was very helpful diffusing Antoniou’s questions by claiming that the things he asked for were out of scope, or irrelevant to my research
  • Dr. Deremer got there late because of parking issues. For those who do not go to MSU - finding a parking spot in the morning borders on a miracle. Apparently this also applies to faculty.

The presentation slides are here if you want to check them out. I will probably post the thesis paper somewhere at some point. Not now though.

At the end I was asked if I’m going for a PHD. I said that I’m planning to work for a bit in the industry, and then possibly go back for a PHD. Some people said if I want a PHD I should go back right away. The problem is - I don’t know if I really want it. I mean it would be really awesome to get that title, but I don’t know if that’s how I want to spend the next few years of my life. I’m totally confused about the future at this point. I need a fucking vacation.

Of course I had a typo on the thesis signature page so I had to fix it and reprint it. This is ridiculous but my laptop was actually the only machine in the department with a working Latex installation that I knew of. And it booted to a fatal disk error. Whooptie do!

I was able to drop to single user and run fsck on the drive. It was churning away for about 20 minutes fixing all kinds of strange errors and inconsistencies. I have no clue how did my file system get corrupted like this. I did shut it down properly last time around. I’m guessing it might have happened when it crashed on me last week when I had these memory issues.

I finally managed to get it up and running, reprinted the signature page, tracked down all my committee members, made them sign it, and left the thesis at the Dean’s office for signature.

So it’s done! Now I just need to get some paperwork done so that I can actually graduate. But that’s a whole other story.

Tomorrow is the Day

Tuesday, April 24th, 2007

Yep, the defense is tomorrow:

April 24, 10:30 am, RI 374

Wish me luck!


Bad Behavior has blocked access attempts in the last 7 days.