Thursday, March 31, 2011

Sense of humor at Microsoft

When the words Microsoft and humor both appear in the same sentence, it is usually at the expense of Vista, IE, Windows Mobile, Zune or some other Microsoft adventure.

So it is nice to see this little piece of code inside a Microsoft code. I saw this at reddit today. Original source of the image can be found in here.  (Hint : click to enlarge and look at the method name)

Sunday, March 13, 2011

Destiny of the Thin Client and Java Scripting

Applications which run on web browsers are getting expanded by the day. Some are things which (just few years ago) we didn't even believe was possible to have on a web browser. Anyway, the purpose of this article is not to debate the life time of desktop applications. May be some other day... but not today.

For the arguments sake, let's just say that there are more and more applications now running on top of a browser (thin client), Hence in future there will be many many apps written in scripting languages which runs on browsers.

Let me share with you few experiences I had recently come across on the programming front, the thoughts they generated and their conclusions. To make it bit interesting, I will disclose the conclusion first, then we would discuss the reasons for it.

Conclusion (my prediction for future) : Java Scripting (or something similar) is destined to conquer the programming world!

there... I said it! Some might say Java Scripts have already conquered the world.

For others, here are my reasoning :

Like mentioned before there will be more number of web based applications/products in future than desktop applications. This client is winning the war against the thick client. Javascript is designed to run on thin clients, the platform which is most common and will be most supported in future. (if not already!)

Programming is now moving once again towards dynamic, loosely typed languages which offer more flexibility and productivity to developers.

This is why people embrace new languages like Ruby, when C++ like languages are increasingly looked down upon. Strongly typed is no longer considered a good thing, not necessarily. Steve Yegge has apparently become so frustrated with Type Safety that he has written this little (well...,  long actually) story about TS (Type Safety). Power of dynamic programing languages is very attractive and top programmers are already either  migrated, migrating or considering doing it. Here migration is from C++, Java .Net worlds into the worlds of Ruby, Haskell, Lisp etc. To me it seems like the Virtual Machine concept is the only thing which keeps Java alive right now. They have the best VM so far designed, as soon an alternative VM comes for another language (or one which supports multiple languages) things would start to look more interesting.

Java Scripts are dynamic, not strongly typed and very flexible. A language which has a huge potential when compared to the existing giants like Java, C++ etc. There is a common perception that Java Scripts is really simple, naive, not even real programming. This perception is set to change dramatically in the coming few years!  As for a little example, consider how easily you can pass a function as a parameter to another function in java scripts. Read this (With Joel's skillful way of hammering a point through) as well for the ways that can be important in modern programming. I think Java Script has got the basic concepts right in contributing towards building the next big thing in programming languages.

Reasons ?

1) Ajax and so called Web 2.0 - Ajax (and it's fancy but unfortunate marketing term Web 2.0) has made a mental shift in web aplication programming. User freindly, fast, smooth dynamic applications are now the norm and expectation. Web application is supposed to be very interactive and super fast isn't it ? almost like a desktop application. Well, that's how peoples expectations have shifted.  Think about the effect of this shift on programmers. Ajax means more and more javascripts. More and more advances and cool javascripts. Good skills in Ajax and Javascripts is now becoming a must for a web developer while old giant frameworks like Struts are made to look bulky and outdated in comparison.

2) JQuery : what do we think about javascripts as soon as we hear the word ? a very unreadable spagetti, old C like code, which is somewhere between html and proper programming. Series programmers will not making their hands dirty with that jargon.... well, that was how it was until few years ago, Things are changing now and the change will grow even more rapidly in coming few years. Jquery is a good example for neat, organized library of javascripts. Some vital, so far missing component to popularize this technology. This is a sign of things to come. More and more cool and smart libraries like Jquery will apeear and that will shift the Javascrip language into a new level in terms of usability, re-usability, readability, efficiency and all.

3) V8 & Nitro : Other vast improvement is made from the side of Javascript rendering engines. Google's V8 in Chrome and Apple's Nitro in Safari seems best out there right now but Firefox is not far behind either. This will provide the necessary muscle to run JavaScript code faster and will act as a catalyst to fasten the growth of the technology. More and more tasks will be feasible to run on a browser using JavaScript to power them.

4) HTML5 : HTML5 (and the new element canvas, among other things) is a cool technology which is clearly the future of HTML. This will raise the profile of thin client applications in to a new level. It will also increase the role of javascripts

5) Problems in other rival technologies : Adobe Flex, Macromedia MS Silverlight and other technologies all have problems. None of them as popular, well known and available as Javascripts are. None of them are as readily available everywhere. More importantly, none of them are as commonly accepted by all as javascripts. Problems between Apple and Adobe on iPhone Flash support is just a one example. HTML5, Ajax and improves version of Javascript is well poised to take over the dynamic application development on thin clients.  That will also provide standard compliant, universal, free alternative for all.

6) Anatomy of a modern web application : When we look at modern web applications which offer lot of dynamism, interactivity and finer smoothness of operations for the users, one trend become noticeable.  More and more interesting and smarter code is being written at the front end. Less and less smarter critical code is being written in the back end.

     Now, I 'm not saying all cool, critical code should be written in the front end in javascripts. What I'm saying is that we are used to the notion that almost all activities of a web site happen in the back end and only the dumb, non-critical, display related activities are done in the front end. This thinking is chanigng now. (probably not as fast in enterprise applications as opposed to all other applications, but enterprise applications in themselves is loosing the significance, well. we will discuss that in some other post.) What I find is with the use of Ajax, Jquery and with all other nice feature we could provide to the user using those, we find much more code is being written in the front end. Much more than there used to be! This fact requires recognition and that will also lead to more attention to front end code. (Will put up a seperate article detailing this based on our own development experiance) Skills of writing good Ajax/Javascripts code will be more appreciated while more and more frameworks and technologies would appear to solve the development problems of these parts in web applications. What will all this lead to ? it will raise the profile of Javascripts and it will come to the forefornt of technologies.

However, there is a one last improvement remaining to happen. We will need a new name for Java Scripts! Already JS is very different than how it was until few years ago but the perception of it is yet to get updated. If it is to be the new and next big thing, it will surely need a much better marketable name that JS. Any suggestions ?

Saturday, March 12, 2011

Welcome to Gaming Fun @ Araaya !

Welcome all!

We started this blog to share our experiance in game development (both technical and business) and related programming challenges with you all.

Hopefully this will grow into a forum where lot of useful discussions and arguments happen on game development, artificial intelligence and programming in general. If you have an interest in any one of those categories or if you are an eunterprenuar who is interested in following how a new gaming startup progresses and like to share our experiances, you all are most welcome. Let us have your valuable comments  and thoughts...

By the way, I almost forgot to mention about Araaya. We focus on developing games and utility applications for smart mobile devices like iPhone, iPad, Android etc.. Our sister company ITF is focusing on enterprise solutions, outsourcing and consultancies. More on ITF later.. for the time being, we have dedicated another blog for discussions on that front.

In addition to develop games for mobile devices, Araaya also planning to launch a website for online gaming where most of its titles will be avaialbe for people to test and play for free! Work on this is underway right now and our team is busy finishing up this work.. Hoping to meet you all there pretty soon and challenge you for a game!

Following are our team members who will also be sharing their developing experiances, trick & tricks and other programming adventures (and missed ones too!) with you on this blog.

Mahesha Kalpanie
Chathuranga Withana
Shan Chathuranga
Amith Jayasekara

Once again a warm welcome to all!

- Ashoka Ekanayaka -