Due to a post on OSNews.com, there have been a lot more visitors for A Byte of Python! There has been about 4440 page views on Monday (29th March 2004) alone! There was also more than 2000 downloads of the book as well.

The Urchin analysis software on my website says that the majority of my readers are from the USA, UK, Czech Republic, Germany, Australia, France, Italy and Canada.

Here’s a nice comment from Van Hout Teghem, a reader:

"It’s a pleasure to learn Python from this tutorial especially since I don’t have any professional background in programming. I’m eager to find more Python stuff from the same author – something that goes deeper and could emphasize ‘the best practices’."

Thank you Teghem, it’s nice to know that the hard work I put into the book has been worth it and it has helped make a positive difference. This book was always intended to be my (first ;-) contribution to the open source community, especially the Python community and I am happy to note that it has been appreciated and well received by readers.

About ‘more’ Python stuff? I am right now pretty busy with my work at Yahoo and hopefully the Mono project as well, so I guess we’ll have to wait and see what the future holds!

I am now a Yahoo! guy!!! The final round of interviews took place yesterday. They asked lot of techie stuff and some very interesting questions. I had 4 interviews one after the other and then Jayanthi (the nice lady from HR) immediately came and told me "You’re through. When can you start?" I was dazed for a moment but then I recovered. So, here I am today making my first blog entry from the Yahoo office. I am right now working as an intern for a 4-month project.

What could be better? Well, Yashwanth is here as well. We’ve had so much fun together in our projects and college, and I am looking forward to more cool things at Yahoo with him. I had a neat dialogue for him as well – "We worked in our first ‘company’ LinCDs.com together and now we are working in Yahoo company together as well!"

IronPython is to .Net/Mono what Jython is to Java. That’s the simple way of saying things. The reality is that IronPython is a remarkable software and if it is good, then it is due to the talent of it’s creator Jim Hugunin.

Jim Hugunin has presented a paper on IronPython at PyCon 2004. The benchmarks are amazing – IronPython runs on the JIT compiler of .Net faster than on the CPython native executable written in C!

Miguel de Icaza must be a very happy man to note that IronPython has proved that .Net is indeed usable with interpreted languages.

The combination of Python and .Net is very compelling indeed. The advantage is that you get to write powerful Python programs using the excellent .Net libraries. I cannot imagine anything more awesome than this from a Mono/.Net programmers’ point of view and all this at very good performance!!!

I can’t wait to get my hands on IronPython and play around with it!

There is an open discussion going on about the future of open source software. It all started when Havoc Pennington started a discussion on Java, Mono or C++ – Thoughts on the future of open source desktop development. This was followed by replies from Lupus and by Miguel de Icaza and further
discussion from Havoc on his log. This is a very intriguing and interesting discussion.

My thoughts on the discussion… well, see my writing on Why Mono? ( http://www.g2swaroop.net/writings/why-mono/ )

For me, the only thing stopping Mono from taking over the world ;-) is the legal situation, especially, vis-a-vis Microsoft. It’s sad that creating software has got more to do with lawyers than programmers now-a-days. I am keeping my fingers crossed for the results of the Novell Legal Review of Mono!

Introduction

Java and Python are very different languages – yet, it is amazing to note the constant comparisons made between the two languages contrasted with the synergy between the two languages in the form of Jython.

Comparing Python and Java

Every Python programmer knows that he/she can achieve a lot more in a lot less code using Python than most other languages, but how much better is it really? Well, in an article titled Python & Java: a Side-by-Side Comparison, the author claims that you can be 5-10 times more productive in Python than in Java. My personal experience with these languages tells me this is quite true. This article further compares the static typing of Java vs the dynamic typing of Python, the verbosity of Java vs the compactness of Python along with head-to-head equivalent code comparisons. A very interesting read, indeed.

Combining Python and Java

Jim Hugunin (creator of Jython) says

"The purpose of a programming language is to let software developers express their intentions as simply and as directly as possible."

Nobody would dispute this statement. It marks the necessity of a good programming language and good tools to enable a better software developer. Taking this into account, a combination of the excellent Python language with the comprehensive libraries of the Java platform would be an extremely compelling combination. This is where Jython comes into the picture.

Jython is an implementation of the Python language written in the Java language! This means that you can run your Python programs using Jython – the interesting part is that Jython itself is written in Java. This allows you to use the Java libraries from your Python programs. For example, here is a Swing "Hello World" program written in Python and run using Jython:

from javax.swing import JFrame
f = JFrame('Hello World')
f.setSize(200, 100)
f.show()

Jython is slowly becoming an important part of every Java developer’s toolkit. It allows rapid scripting as well as testing of your Java programs using an interactive prompt. It is interesting to note that you can compile your Jython programs into Java bytecodes. So, you could write Python code behind your boss’s back and claim that you wrote that Java program he asked for already!

Here are some interesting articles to further explore Jython:

I logged in casually in the afternoon to check my mail and suddenly Yashwanth tells me that GATE results are out! Then Krishna was also online and told me he got 90 percentile. Congrats, dude!

The website wouldn’t open for me as it was swamped with visitors, so, Krishna looked up the results for me. I got 97.13 percentile !!! I was more shocked than happy because I had a total of 3 hours of preparation for GATE during the whole year and I didn’t expect a result like this :-). My rank is 993 out of 35019 who wrote the CS paper.

For the benefit of my non-Indian readers: GATE is the entrance examination for post graduate degrees in the science field in India. It is somewhat on the lines of GRE in USA.

A text editor is one of the most important tools in the kit of every programmer. It is the starting point for us when we intend to write programs or anything else. It is therefore important to understand the strengths and weaknesses of our editor as well as being able to utilise the editor to its fullest potential. One such good editor is VIM. Bram Moolenaar, the creator of VIM, discusses the Seven habits of effective text editing and uses VIM as an example of showing how to do things.