Howto use implements in Jython

If you are a Jython beginner and were wondering how to use the implements of Java, then it is very simple. Both extends and implements are part of the inheritance list of the class. For example, if your class extends JFrame and implements an ActionListener, then you can write code like this in Jython. Also look at how the super (the superclass) is invoked. The super is replaced with the name of the base class whose super we are trying to invoke:


class MyClass(JFrame,ActionListener):
def __init__(self):
JFrame("Test title")
....
def actionPerformed(self,ae):
actionCommand = ae.getActionCommand()
//do something based on the actionCommand

If you see the above code, MyClass has the code for both the JFrame and the ActionListener. The actionPerformed method is invoked for any events within the MyClass object.

Orhan Pamuk’s Istanbul – not as interesting as expected

Orhan Pamuk’s Istanbul, Memories of a City doesn’t seem to be as interesting and irresistibly seductive as the reviews suggest. May be because the beauty of the writing got lost in the translation or may be because it is not supposed to be a memoir of the city alone. Even though, the author’s long sentences, cramming up lots of descriptions and declarations within one sentence is rather appealing, the reader most of the times, I feel is distracted from the intent. The book is semi-autobiographical, with the author trying to intersperse his life alongside the history of the city he grew up in. He does definitely, in some instances get the melancholy or huzun as he calls it over to the reader. And if you are somebody who has grown up in any of the cities in the Indian subcontinent, you can quite relate to the changes he mentions. There of course are certain places where you wonder if the editor had missed something. For example, while talking about the Istanbul encyclopedia, the author writes Forty or so friends – most of them historians like Semavi Eyice or literary figures – contributed to Istanbul encyclopedia for thirty years without every receiving payment. Like I mentioned, the author seems to like writing long sentences, but then the side-effect of it being creeping grammatical errors.

Another deviation from the theme of the book is the author’s descriptions of the famous people of Istanbul. I felt that something like that was not the subject of the book, or even if it was, it was dealt in a rather florid style. Also, this is very distracting for the reader when expecting more about the historical city. Chapters dedicated to Kocu, Gautier, Nerval et. al could have all be combined in one chapter, and writing about the city rather than their personal life might have been a more interesting read. The better parts of the book are the photographs, very tastefully taken by Ara Guler (as mentioned by the author in the acknowledgements). The descriptions of the Bosphorous, the Golden Horn and the various parts of Istanbul make a very interesting read. If you are someone who likes to sift through a city’s history then you will find those sections interesting. All in all, though, it is a medicore book. The writing style and the diversions are the ones against it, and the descriptions of the places within the city plus the photographs work for the book. I wonder if calling the book Istanbul – Memories of a City is valid, may be something like, Istanbul and Me might have been more appropriate (or atleast would have made it clear for the buyer). And quite surprisingly, the reviews also seem to be not so impressed by the book. I wonder how the Sunday Times called it A declaration of love. Love for whom I wonder; for the author ? for the city ? Leave that to your interpretation.

Finally, do I suggest buying this book – well, I’d say, if there is nothing you want to do but to just read something, then you can pick this up. Otherwise, you can ignore it – you wouldn’t miss much.

Casino Royale – a damp squib

I am not such a big fan of James Bond movies as some people are. But, I did like most of them made in the past. Casino Royale, with Dennis Craig, somehow didn’t interest me at all. I rate it a 3 out of 10. I was not very impressed with how the director tries to show a twist in the tale towards the end. If indeed Bond was released from his captors and gets together with Ms.Vesper Lynd, then why does the director show all their romantic tours. That itself is a dead give-away. And I thought, M repeating you being you over and over to Bond, was rather pointless – almost looked as if the script writer had to find a filler to justify M’s attitude/actions towards Bond. There though were some really nice lines in the movie; for example, Bond says to Vesper – You are not my type, you are single (quite a corny one there eh !). There aren’t many action sequences (except for the Free Running sequence in the beginning). The Aston Martin would have been put to better use than, trying to work as a make-shift ambulance for Bond. All in all, I feel the movie is not worth the hype surrounding it. As for Daniel Craig’s acting ability – that I think he did justice to the role, though none might beat Sir Sean Connery when it comes to say the line – The name is Bond, James Bond.