I am back from a day at the JAX India 2007 conference. I went with Kapil, Kannan, both Vikas, Subin and Janmejay. It was a busy day and, overall, I found it not very useful to me.
First, I attended Neal Ford‘s session titled 10 Ways To Improve Your Code. This session was a huge let down! I walked in a tad late and was horrified at the advise handed out at that very moment – “Version control your code”! I can’t help notice that it was a wondefully useful advise in 2007, duh! The next 40 minutes or so we were treated with more trite. There was this bit of advise – “Use reflection when appropriate”. And an example of such an appropriate instance? (in summary)
We were called in to help this customer. They were using some framework which generated a whole bunch of getters and setters. We were not allowed to touch any of that code, and these getters were spoiling our test coverage numbers. So we wrote a test which simply invoked those getters and setters using reflection.
If anybody was worried about using reflection, that example should just convince them! Yeah.
The next session was AOP – Whats new and cool in Spring 2.0 by Vishal Puri. Vishal showed some Spring AOP capabilities – transaction demarcation, exception translation, retries with an around advice and checking for depdency violations. Vishal was somewhat handicapped by most of the audience not knowing what a pointcut was; and his examples, unfortunately, could be appreciated only if one recognises the power of a good pointcut expression language. The specific capabilities introduced are well-known to anyone, at least casually , following the AOP scene but it was good to know that these are available out of the box in Spring 2.0. I need to read up on these sometime soon. BTW, I found Vishal to be a terrible presenter.
Sangeetha Oak’s session titled Building an AJAX Web application using Dojo toolkit was up next. I barely managed to squeeze into the hall; but when Sangeetha started with “Well, you might have heard of Ajax and might think that Dojo is … “, we decided that maybe it was a good time to check the stalls. Subin hung on for some 10 minutes more but by the time speaker started explaining dojo.addOnLoad(..), he also joined us. Dojo is an incredibly powerful framework, and I was glad to see that people were interested in hearing about it.
The stalls were eventless. And nobody offered a single damn tshirt! I saw a demo of JTest – a tool which generates unit test code. It is the worst idea I have seen this year. From the brief demo I saw, what I gathered was that JTest analyses your code, figures out what it might be doing, and generates unit tests which always pass. Then you have to generate a report which tells you what inputs were given to a method and what the actual outputs were – which somebody needs to manually verify. To me, it looked like actually writing the tests by hand (with a lil help from the IDE) was lot easier. The person doing the demo, showed a totally incomprehensible deep if-else-if branch and proudly demostrated that such code can be tested by JTest. I think that somebody has totally missed the whole point of unit testing.
We then went to catch up some lunch. While waiting in the queue this one guy came up and asked “May I squeeze in please?” and when I politely said “Sure”, he got into the queue ahead of me, turned around and declared “This lady here is a friend of mine” (pointing at the lady who was standing ahead of me, but was now standing in front of him). Yeah, great friend who would let you stand behind herself in a queue – and a great response to the guy who actually let you get ahead of himself; impressed, buddy, I really am! The lunch was actually good; the only time I felt that the conference fee made good ROI.
After lunch we went to yet another session by Vishal Puri – this time titled Simplfying enterprise applications with Spring 2.0. This was pure Spring marketing pitch. Vishal, as I mentioned earlier, is not a great speaker – so I am not sure if he would manage to convince anyone to use Spring. That would be a shame though; Spring is a very useful piece of software.
The next session was Neal Ford again – this time with JRuby on Rails. Neal whipped out a quick scaffold user interface for one database table. From couple of conversations I overheard later in the day, some people were immensely impressed. He mentioned that one can now host JRuby applications as a WAR file in servlet containers but admitted that JRuby at this point is too slow. He expressed hope that it would soon be as quick or even quicker than C Ruby. Yawn.
The last session I attended in the day – Persistence for Service Oriented Architectures by Tobias Israel – was actually the most useful. I had trouble following him at some parts of the talk but he asked lots of interesting questions which I don’t hear being talked about much. After making such a great start by enumerating the questions, he didn’t do a good job of suggesting answers. Maybe he was rushed for time, maybe I did not understand him well. Anyways, I need to read up on the topic sometime soon. Tobias works for SignSoft, and I hope he has a blog. His slides had lots of typos – that made understanding him even harder.
So, that was my day.
I am attending the JAX India 2007 conference tomorrow. If you happen to be around, please say ‘Hi’. These are the sessions I am planning to attend:
- 10 Ways To Improve Your Code (Neal Ford)
- AOP – Whats new and cool in Spring 2.0 (Vishal Puri)
- Persistence for Service Oriented Architectures (Tobias Israel)
- Simplfying enterprise applications with Spring 2.0 (Vishal Puri) (maybe, I am not sure)
- Why is everyone so excited about Ruby on Rails (Neal Ford) (again, maybe; everyone was excited about RoR in 2005!)
- Building an AJAX Web application using Dojo toolkit (Sangeeta Oak) (again, maybe; the other two sessions don’t sound great)
Couple of days ago, I wrote a post about a bug I encountered with the Scala Eclipse plugin. I posted this on the Scala list, and the developer – Sean McDirmid – reopened the bug. The bug was not reproducible on my iBook – so I think it is a Windows issue. I dug around the code for Scala Eclipse plugin and I was able to figure out a possible cause for this bug. The developer has promised to look into it and fix it soon. Thanks Sean!
Tonight I tried taking Scala for a spin.
I installed the Scala Eclipse plugin, created a
hello project, switched to Scala perspective in the IDE, created a
test package, and created an object
HelloWorld in it, with the code to print the customary message. When I tried to run this code by right-clicking the file by choosing
Run As -> Scala Application, the code throws up the error:
java.lang.NoClassDefFoundError: src/test/HelloWorld Exception in thread "main"
After a bit of digging around, I figured out what is wrong – when one right clicks as chooses
Run as -> Scala application, the run configuration created is incorrect. The
Scala Application Object is set to be
src.test.HelloWorld; changing it to
test.HelloWorld makes the code run fine. Posting this here to help others trying the plugin.
Tonight me and my wife dined at the Gufa restaurant in Jayanagar, Bangalore. The restaurant is located on the 5th floor of The President Hotel.
The lady wanted a mocktail and since we couldn’t get much choices in the menu, we asked the barman to recommend something nice. The prices of most drinks – cocktails and mocktails – mentioned in the menu were around Rs.180-200. A few of the cocktails went up to Rs.400, but that was the maximum price on the menu, if I remember well. The barman recommended a drink, and we foolishly assumed that it would priced similar to the other mocktails on the menu. You get where this is going, rt? When the cheque came, our innocuous-looking mango-flavored mocktail was priced at Rs.450! That was more than twice the average price on the menu.
I think he tricked us.
Note to self: When eating out, ask for the price of the dish/drink the waiter/barman recommends.
PS: The food was kinda OK; the ambiance had some novelty to it.
I had to write a validator to check if a date entered in a form is not one in the future. I could not find an example of this in the documentation, and had to search around a bit to figure out the right XML syntax.
<validators> <field name="someDate"> <field-validator type="fieldexpression"> <param name="expression"><![CDATA[!someDate.isAfter(@com.domainlanguage.timeutil.Clock@today())]]></param> <message>Please enter a date on or before today</message> </field-validator> </field> </validators>
Notice the ‘@’s. Posting this here for anyone who might find it helpful.
PS: We use Eric Evans’ timeandmoney package.
28 is a card game that is very popular in Kerala – many people I know play the game. The rules are simple, but the game is challenging and fun. For a year when I was doing college, I stayed with my folks in Mavelikara and commuted by train to my college in Kollam. One side of the commute takes about an hour, and I used to play 28 often with fellow-passengers. I have played many an exciting round of 28 during those days.
Playing Rosanne brings me memories of those days! It is distributed with a GPL license and is freely downloadable. Pre-compiled binaries for Windows and Linux are available. I have spend considerable time playing the game, and my rusty 28 skills have steadily improved since. Its a great way to spend time if you are stuck in a stupid meeting or training – go check it out! (Warning: Addictive)
Kudos to Vipin Cherian for bringing out this great game – malyalees around the world owe him a beer!!
I read quite a lot of articles and blogs online, and save bookmarks to interesting pages in my browser. I had not signed up for any of the social bookmarking sites – but today I gave in and signed up for del.icio.us, like the rest of the world. When I finished installing the delicious buttons on my browser, I tried the keyboard shortcut to tag a page – and here is what I got.
Notice the popular tags on the bottom right of the image. I wonder how it got there.
But today, I was re-reading an old blog post and I was reminded of Steve’s prediction. Jarosaw “sztywny” Rzeszótko, a young Polish blogger, had send 10 questions to 8 famous programmers and he had posted their replies (I had written about it too). Here are some excerpts from that post:
Q. What do you think will be the next big thing in computer programming? X-oriented programming, y language, quantum computers, what?
I think web application programming is gradually going to become the most important client-side programming out there. I think it will mostly obsolete all other client-side toolkits: GTK, Java Swing/SWT, Qt, and of course all the platform-specific ones like Cocoa and Win32/MFC/etc.
It’s not going to happen overnight. It’s very slowly been going that direction for ten years, and it could well be another ten years before web apps “win”. The tools, languages, APIs, protocols, and browser technology will all have to improve far beyond what you can accomplish with them today. But each year they get a little closer, and I’ve finally decided to switch all my own app development over to browser-based programming from now on.
Microsoft and Apple definitely don’t want this to happen, so a necessary first step will be for an open-source browser such as Firefox to achieve a dominant market position, which will in turn require some sort of Firefox-only killer app. (A killer app would be something like iTunes, something that everyone in the world wants to use, badly enough to download Firefox for it.)
Q. If you had three months to learn one relativly new technology, which one would You choose?
I do happen to have 3 months (part-time), and I’m spending it learning Dojo (http://dojotoolkit.org) and advanced AJAX and DHTML. I’m learning it by writing a fairly ambitious web application. Dojo’s really cool, and I’m sure it will only improve with time.