Friday, April 17, 2009

DOTA.HK in trouble with Warden, exit Python, enter Java.

Well it's not secret that we've run into problems at dota.hk getting out hosting platform compliant with Warden. In fact none of us at dota.hk are developers for Ghost++, which is okay, Ghost++ itself has a pretty big pool of developers willing to help out. So support for Warden should be in by the end of the month. I was never scared that we would not find a solution, in fact I'm very happy that Blizzard has done something to fight against Maphack once and for all.

I know for fact Blizzard has nothing against bots that only enhance the experience for users on Battle.net, in fact I remember during the Diablo and Starcraft days that Blizzard actually came out with a source code for developers to develop their own chat bots (this was before we even needed cd-keys to have a chat bot on battle.net).

Right before this happened though I was working on an application I wrote in Python that was finished but was very hard to deploy on multiple servers because of my poor application design. Basically I had to edit a lot of variables within the script for each server.
Example:
NTTHK: config_name = 1Last_update
HKNET: config_name = 2Last_update.

Gosh was that annoying. I wasn't really concerned about the application design, just so long as it worked. Well I'm through with that and have come to a conclusion that using Python to write server-side applications is not the greatest idea, well maybe if it was one server, but not if I was writing for 6 servers that also probably needed to be updated from time to time.

Another problem with Python is that there is no decent IDE's out for it, you have no idea how annoying it is keeping track of indentions. This is how I immediately fell in love with Java+Eclipse. Java and Python are both cross platform which is very important for me as a Linux user in a Windows world. However I think the Java virtual machine is much better than Python's interpreter, because it's very hard to write a application which has problems because of how well the debug system in Java is. I don't have to worry about installing the MySQLdb module, SQLite module on every damn server and Java's C++ (OOP) style syntax makes writing huge applications much more readible and forces good programming practice.

Modular programming in Python is also a huge pain in the ass because you need to define the document folder for where you want to import your custom modules from, this varies from server to server and as far as I know there's no way to automatically determine a path. Don't get my wrong, I love python; but I guess all languages have their ups and downs.

So in a way, I'm relieved that our bots aren't functioning correctly at the moment. It gave me some time to look into using another language to write the application I needed to write. It gave me time to just take a break from all this development and just do some research which was a relief. I guess the biggest task that developers must face is staying on top of their game by constantly forcing themselves to learn new things.

So for the time being, I did some further database optimizations to DOTA.HK V2 to extend it's lifespan, because it looks like we're going to have to delay the release of DOTA.HK v3.

No comments: