Monday, June 23, 2008

Silly mistakes!

Though Java relieves you from memory management, it doesn't mean that you don't have any memory leaks. Certain things which we use typically in our day to day coding which causes memory over usages and inefficient codes.

Tip1:
for example String s = "hi" or String s = new String("hi"); which of these 2 is good. I am voting for the first one, not just because if offers me to type less, but also more efficient. But why?

When you use new String() you unnecessary create explicit copy of the string (This makes sense only if you know what string pools are and why string is immutable?)

Tip2:
Looping though are basic constructs of any programming languages, we need to be little care full about using them. for example, java provides iterator for iterating collection.
Ex: we have linked list, it can be iterated through iterator or using get(i) function. But if you remember how linked list are implements you will realize why using get(i) is extremely inefficient.

Paying little attention while coding makes you code better.. I am still trying to learn it myself..!

Thursday, June 19, 2008

XNA Game Studio - wow!!

When it comes to development, nobody can beat the solution and tools Microsoft provides. Recently I came to know about XNA Creator studio, which acts as a plugin in C# IDE for creating games for xbox or window. The podcast on it looks really impressive. For sure this offers a great deal for creating games.

Video : http://creators.xna.com/en-US/create_detail

For hobby game developers like me this is really wonderful.. Kudos to Microsoft!!

Let's Game!

Friday, June 06, 2008

Java. Is it dying...?

This is the first time I am reading that JavaOne is not good (2008).. So I just read along many other blogs and there are many blogs related to the end of java.. I asked to myself "Is java going to die?" and heard back a sound response.. No way! atleast anytime sooner.. I read a blog in which the author says that Java is not going to die anytime sooners and he gave some number on job requirement based on Dice.com and impressively Java is way to high than anything else. Almost twice the next language C++, Ruby and Phyton not even 10%..

As many are blaming about how bad Generic are in Java, but still I feel java is a better language to code on.. Another blog says "Your top biz guys doesn't mind what language you use.. they wants the things to be done easier, faster and better.. and many new languages like Ruby (not really new!) were much simpler and less verbose.. But still Java is very widely used and millions of people know it (though not properly!) Java is going to be there and Sun is doing great job in enhancing Java each version and adding new features to it...

So I feel Java is going to be there for some time and there is enough time to learn any new language that might get be popular!!!

So chill out..!!

Some blogs to read..

google killing java,
Another one