Some good progress made

So here is the current status of Oontzoo. Python is a tremendously cool language! I seriously do not understand the whole Python-Vs-Lisp argument that seems to have been going on for ages and seems not be ending anytime soon. Lisp and Python are both languages which are extremely powerful, very high-level and flexible enough to be used in a wide variety of situations. I love them both. They are more or less equally feature rich (totally discounting the “Turing Complete” argument which is absolute nonsense) but three areas where Python comes on tops are:

1. A humongous collection of libraries for almost every conceivable purpose.

2. A very active developer community, and above all,

3. Superb readability which implies superb maintainability.

So coming back to OOntzoo (hey, I like it better than ‘Oontzoo’… lemme stick to this… just for larks!), I have made very good progress in learning Python. In just a couple of days, I have basically covered the whole core language – the basic syntax, the loop and condition structures, the data structures, exception and error handling, input/output and classes. The only part left is to explore the vast libraries and the APIs for interfacing with C/C++. I should be needing that I believe. I have every hope of completing this process over the weekend, despite the BarCamp being held at IIMB on March 31 and April 1, 2007. I will most probably be attending that and will have to eke out as much time as possible for OOntzoo.
Let’s see how that goes!

Project Oontzoo started

Yes. It is true. I have started Project Oontzoo on March 26, 2007, a very eventful day for me indeed. Now, what is Oontzoo? I am afraid you will have to wait and watch as it evolves to see what it is! Don’t blame me if I like a bit of suspense.
Anyway, here is the list of technologies that I am tentatively using for Oontzoo:

PythonThe main programming language.

DjangoThe framework.

PsycoThe Python optimizer.

PostgreSQLThe database.

SubversionVersion Control System.

TRACThe bug and feature tracking utility.

PoundThe load balancing tool.

MediaWikiThe documentation utility.

Apache2The webserver.

C/C++The ancillary programming language(s).

HTML, CSS, JavaScript, XMLThese absolutely required!

GNU/LinuxI got that right didn’t I senor Stallman?

In my estimation, the whole process (learning, design, coding, testing, deployment) will be completed by the third of July, 2007. I will track the progress through this blog regularly (read on a day-to-day basis).

Oontzoo is more of a learning experience rather than anything else. That is its objective. Anything more will be a bonus.

Python & Django, Ruby on Rails or PHP on Symfony? And why Java sucks…bigtime

Just over a year back and I wouldn’t have had an inkling of what lay beyond Java/J2EE for web development. That’s how scarily claustrophobically blind-sighted I was. Many reasons for that – both personal and professional but let me concentrate on the latter :-).
In my extremely humble opinion, the greatest misconception that many students have and which is further reinforced by the half-baked information they are “imparted” in school by folks who, congenial enough in person, are clearly in the wrong profession and also by the lazy and narrow-minded one-track-mindedness of the students themselves, is that when it comes to the web, there is only one way that you can go – the Java/J2EE path (of course, if one can afford to shell out some decent moolah, there is always the MS way – .NET et al). Add to this the tremendous propanganda by SUN ( “We are the ‘dot’ in ‘dotcom’ ” etc. ) and its lackeys – IBM and Oracle, Java has been hyped and overhyped to death. The plain truth is that it is a compromise. A very bad compromise at that! Portability? By installing a platform-specific JVM on each and every machine, and the size of which is bloating by the day? It’s laughable! And performance wise too it is a poor compromise between purely compiled languages and purely interpreted languages. The only reason why Java has survived and indeed flourished is the industry backing that it has received from stalwarts like the two sell-outs mentioned above.
This may seem a particularly harsh review from a novice in the “industry” but then again, one cannot gain “common sense” by being in the industry for five, ten or twenty years. Capisce? I do code in Java and am learning J2EE on my own, but the impression that I have is that it is way too cumbersome to go from initial conception of the idea to the actual deployment in any short period of time. The frameworks hide too much actual detail and add unnecessary gunk in the wrong places. I may do it for my main job, but not for my personal projects.

That is when I started looking at the options. Actually it was Paul Graham’s excellent essay Beating the Averages where he clearly stated that any language could be used when the code itself was entirely located within the server. And I quote :

“Back in 1995, we knew something that I don’t think our competitors understood, and few understand even now: when you’re writing software that only has to run on your own servers, you can use any language you want. When you’re writing desktop software, there’s a strong bias toward writing applications in the same language as the operating system. Ten years ago, writing applications meant writing applications in C. But with Web-based software, especially when you have the source code of both the language and the operating system, you can use whatever language you want.”

Now that made a tremendous amount of sense to my logical mind. For a while, I even toyed around with the idea of using Lisp itself but then after a bit of research, I decided that the lack of any decent repository of libraries made it a huge (and I mean huge) amount of effort and time investment. So for now, as far as Lisp for web development is concerned, I would rather wait and see if it matures to the point of feasibility.

Python and Django

That brings me on to Python and the excellent framework Django. Python is quite an old language but it seems to have become a huge favorite with all sorts of programmers – from beginners to the mighty brains at Google. The pros are many – cross platform, Object-oriented, bindings with C/C++/java and powerful enough to quickly create and deploy applications ( from simple CGI scripts to complex GUIs ) in record times! Around 4-5 times faster than in Java and around the same ratio of shorter code. The only drawback(s)? Its pathetic performance which trails even that of Java and yet it is much faster than Ruby. However,I came across this wonderful piece of software called Psyco which practically speeds up Python code by unbelievable factors ( over 100% ). A must have for any serious Python developer, Okay, about Django, my research tells me that it is the best web framework out there, And it is so indeed. I suppose Aaron Swartz’ Web.py framework is the
only serious competition. In fact, the whole of Reddit was rewritten from Lisp into Python using this framework. In the words of the authors of the site, the powerful threading capabilities of web.py was a strong reason of choosing that framework. All in all, Django seems the sanest choice for Python. The only nagging problem with the whole setup is
that Python needs a templating language ( which varies from framework to framework ) which is not Python. So one would have to know Javascript and the templating language for the front-end and the use pure Python for the back-end. Not bad though. I suppose the effort would not be much and I agree that it is a cleaner construct. And with Python’s rapid development features, the time spent in learning the templating language etc., will be offset by the gain in productivity.

My Rating – 4.5/5

Ruby on Rails

Next up is Ruby on Rails. I must confess upfront that the more I see of this language, the more I like it. Of course, the fact remains that Ruby by itself is not much of a head turner. It is the whole Rails framework which has given it a much needed boost. After all, both Ruby and Python have been around for almost the same time. When I mentioned that I like the language the more I see of it, I meant strictly in terms of the features and power that it provides. Not in terms of the aesthetic beauty of the language itself. In fact, the syntax is even more cryptic than that of Perl. Going by all the research that I have put in ( Phew!!! ), Ruby on Rails is a much more popular combination that Python with Django, but in terms of performance, the Python combo beats it fair and square. The one advantage that it does have is that there is no need for any extra templating language as in the case of Python. This would save me a lot of time, but considering my personal dislike of Ruby’s syntax and a slight leaning towards Python’s, I would say that it comes a close second, but still second compared to Python-Django. Another important reason is that there are more jobs oriented on Python per se than Ruby. Which is to say, from a career perspective, Python alone provides better opportunity than Ruby alone. RoR ( Ruby on Rails ) does provide more opportunities than Python-Django but till when?

My Rating – 4/5


PHP and Symfony

At last we come to arguably the most popular web development technology – PHP. Let us also consider the commonly used framework – Symfony. There is no doubt that PHP is the easiest and the smallest of the three – Python, Ruby and PHP, especially developed for rapid web development. However, the places where it suffers terribly – performance ( the worst of the three combinations ), security ( a major major drawback ) and a not-so-friendly developer community as the Python and Ruby communities. All in all, not as much potential for the future as the other two.

My Rating – 3/5

So the overall winner (again) in my most-humble-but-well-researched opinion
is Python with Django. Here is an instructive little video from Google Techtalks but presented by one of the creators of Django – Jacob kaplan Moss.

Enjoy creating the next web!