Sunday Jul 12, 2009

I came across another blooper today. A friend of mine wanted to apply for a job at Macy's and was asked to create an account and then login with that account to apply for the job online. Fair enough. What got her confused was the "@invalidemail" rhetoric in the text. Now, if Macy's wants one of the applicant's email or telephone number, there are better ways of achieving it than asking the user to enter the telephone number with an @invalidmail suffix. Some one was lazy while designing this web form, or perhaps someone thought that he/she was super smart in coming up with the @invalidmail suffix idea. This is not a good idea, it's a bad idea.



Friday Jul 10, 2009

I have been reading a book 'GUI Bloopers' by Jeff Johnson. They say, you never remain the same after you have read a book, and I wholeheartedly agree. Numerous GUI bloopers, which were in front of me, unnoticed, have all of a sudden, started showing up.

I came across a couple of possible bloopers today in the twitter client - Tweetie. Please note the word - possible - in the last sentence.

Here's what Tweetie showed me when I started it:

So what is my problem with this dialog box? There is no title in the dialog. Is this a disaster? Not really. I can see the logo of Tweetie in the dialog, so I can associate this dialog with Tweetie, but, pray why break established conventions by having a blank title? Also, some one who might be new to Twitter/Tweetie can be a bit confused about which username and password needs to be entered. Minor issue, but an issue definitely IMO.

Compare that with Nambu, another Twitter client for Mac, which shows a much better interface:

This is so much better.

Another pain point for me is the 140 characters limit in twitter. While numerous debates rage on the positives and negatives of the 140 character limit itself, as a newbie twitter user, I frequently forget that there is a limit. Here's what Tweetie does to make users like me aware of the limit:

See that limit overflow indication on the top right corner of the window? Well, it so happens that I am frequently writing my twits in a hurry and am used to typing out whatever I have in mind and hitting 'Enter'. And yours truly missed the overflow indication more often than not. Again, comparing this with Nambu:

Now the limit overflow is crystal clear, isn't it?

More blooper expeditions to follow. Keep watching this space!

Friday Aug 15, 2008

Ok, I have listened to the Java Posse bloopers episode a 100 times and laughed and laughed myself dry.

Now, since I moved to US, I have managed to lose my copy of the episode. And I searched east, west, north and south on the internet but couldn't find it. Anybody know where it can be found?

Tuesday Aug 05, 2008

First day @ MPK17. Everything is so new, and it's a welcome change after three years at BLR03 :)

More posts to follow!

Wednesday Jul 02, 2008

"When all you have is a hammer, everything looks like a nail"

 Ever been hit by this?

Tuesday Jul 01, 2008

The Bangalore Open Java Users Group had it's user meet for June 2008 on the 27th at the Himalaya Conference Room at Sun India Engineering Center, Bangalore. The meet, though held on a week day, was well attended (in fact we had the best attendance till date). Not only that, the audience was enthusiastic and participating a lot by asking lots of questions and sharing their views. All and all, a great session - the best user meet I have attended till date. A special thanks to Amit Kumar Saha, the new JUG Leader, who did all the running around to make this meet a roaring success.

Talks:

JavaFX - Harish Singh (3i Infotech)
JDK6u10 - New and Noteworthy - Vaibhav Choudhary (Sun Microsystems)
From Journeyman to Master - Rohan Ranade (Sun Microsystems)

You can read about the proceedings at Mohammed's or Sreedhar Ambati's blogs.

Some snaps of the meet (courtesy Tirthankar):


Wednesday Jun 25, 2008

I am a big Ubuntu fan, and always feel a bit sad when I have to upload my new and noteworthy screenshots next to the swanky and sleek screenshots of people on a Mac on the NetBeans wiki (look at the Spring framwork support section here).

However after some digging around I finally got a font combination that looks pretty neat to my eyes. Here's a screenshot with the default font in NetBeans 6.1 running on Ubuntu 8.04:

And here's after I changed the font to Bitstream Vera Sans Mono 12 pt:

The second one is much better for my eyes (atleast). Any other good combinations out there folks?

Font Settings:


Tuesday Apr 08, 2008

It was a long weekend here in India, and that provided me some time to add some shortcuts which will help users who author XML documents using NetBeans. I wrote a plugin which will add some context sensitive actions to the XML editor. I have just managed to add one action (Delete current attribute), but more are on the way. Actions planned are:

  • Jump to parent tag
  • Jump to next sibling tag
  • Jump to previous sibling tag
  • Jump to end tag (if at start tag)
  • Jump to start tag (if at end tag)
  • Jump to next attribute in a tag
  • Jump to previous attribute in a tag
  • Delete current tag (alongwith children)
  • Delete current attribute (alongwith it's value)
  • Delete value
  • Expand a short tag <a/> into the longer form <a></a>
  • Condense an empty tag <a></a> into it's shorter form <a/>

I am planning to upload the module on the Plugin portal soon. For now, here's a screen shot:

Before the action was selected:

After the action was selected (notice the name attribute is gone):


Sunday Mar 16, 2008

I started out writing this one as a response to some of the comments to my previous post. I guess I had too many thoughts and this warranted a separate post in itself. First and foremost, I wish to state that I value and respect everyone's opinion, for the matter that was discussed was very very subjective. However, as always, I will blurt out what I think in this blog.

I am not against people who learn new languages, and yes, I would never say that Java is just enough (though I love it immensely). But people mostly learn a language, use it a bit and then move on. For me it's like leaving the climb 200m from the summit of Mt. Everest, just because someone seemed to mention a new and difficult mountain to climb. For me, I will climb the new mountain, but let me get to the top of this one first, is my attitude. Many people try to look for new and better ways of doing things when learning a new programming language, but they haven't charted all the territory of the language that they know currently. It is this attitude that needs to be taken care of, in my personal opinion.

As a computer engineer, when my father asks me something about computers (esp. hardware) that I don't know, I feel ashamed somewhere. Sure, I specialize in software, but still I should have known everything about this field, is what I feel. At Sun, everyday offers me something new to learn about Java, something trivial which I should have known (which does my self respect no good, but keeps me honest), something not so trivial. What I gather in such experiences is invaluable if and when I move to a different platform. Don't we all master the art of quickly learning a new language, once we have learnt a couple of them? I think I am trying to learn an effective way of mastering a language/platform, and I do believe, having patience and a mind that constantly seeks out the unknown seems to be essential elements to achieve it.

I would also like to state that learning a language in and out does not guarantee success. Many people know the language, the working of the platform, but are a bit short of knowing about computer science fundamentals. For eg. I have never used a B-Tree at work, but I know what it is, and there might come a time, perhaps 20 years down the line, when my knowledge of a B-Tree and how it works, will lead me to write a significantly better program, and more importantly, make me feel good about myself. One must pay due respect to the science and not just the current state of practice.

Thursday Mar 13, 2008

I often see many fellow software engineers learning new programming languages every now and then, in the hope that they are increasing their "marketability". They seem to think that the more programming languages they know, the better. C, C++, Java, Javascript, Python, Perl, Ruby, Groovy, Scala, C#... the list goes on and on. These chaps are the first to get swayed by PR of companies marketing these languages (Microsoft for C# and .NET being a prime example). Hell, I talk as if I have been a saint, no, even I used to be in this - "Run to learn the latest language" club.

But over time, I have figured out that learning a language is never accomplished without using it in and out, in all sorts of ways, in all complexities, in various projects. What's the average length of a code example in a book? Roughly 100 lines. And what's the average size of code bases? 1000s and 1000s of lines. Unless you use the language to create something, you are not using the language at all. After all, a programming language is just a means to an end. It's a tool in your hand to create an application, a service, something concrete and tangible.

Having come over to the Java world 2.5 years back, I have this habit of looking back on the code that I had doled out when I was new, and compare it with the code that I churn today. I find such a huge difference. The code that I produced 2.5 years back, is down right laughable in some places. Being at Sun, I was able to work with some very very smart people and hone my skills as a programmer (there is still a huge scope for improvement, as my recent experiences in the NetBeans land have told me). The code reviews have taught me a lot and continue to. I have been fortunate enough to work with some real wizards of design and Java platform and I am always in awe of such people and their ability to assimilate complexity and I try always to study their approach to problem solving. It gives you lots of pearls of wisdom and improves you as a programmer.

Even after this, when I feel that I write much better code than I used to, there is still a long long way to go for me in the world of Java. I still don't know the little things which one gets to know when he is aware of the Java Language Specification. I still haven't really decompiled a Java class, and tried to understand the byte code. I still am baffled by the whole area of memory management. I haven't ever done a performance analysis or improved performance of code written by a different programmer. Never used NIO, still need to go slow when dealing with multi threading.... the list goes on and on. As Bharath Ravikumar (my former colleague at N1 SPS development team) rightly pointed out when I discussed this with him, it's a matter of spending time gathering these experiences. I should try and work on all sorts of things in Java, and when your day job cannot satisfy such a quest, it's best to turn to open source to satisfy your creative hunger.

You can make out the difference between someone who has just learnt the language and someone who has made better use of the time to work on projects in that language.

Now some readers may say that knowing just Java is not good enough, some languages are much better suited for certain applications. I totally agree. But, knowing a low level language (C), a middle level language (Java) and a dynamic language thoroughly, should be good enough for most, if not all, applications.

Saturday Mar 01, 2008

I attended the NetBeans day at Hyderabad, and I came out with some pretty interesting discussions, meetups and lots of positives. From what I heard from the audience, Roman Strobl has become a celebrity. His style of presentation and humor was appreciated by all. The audience loved his presentations. Last year, Roman's good friend, Geertjan Wielenga, had a similar success.

However, as always, there was one presentation which was humorous, for me atleast. Collabnet, the company behind Subversion, had a talk. Their presenter started off very well with defining Collabnet's objectives and it's lineage. A very crisp presentation. And in 10 minutes he finished his slides (right on schedule) and handed over to some Subversion contributor from Chennai (the only one in India). And this guy winged the whole presentation. Far removed from the reality of the composition of the audience (many were students with only a cursory knowledge of SVN), this guy rambled on and on giving obscure examples (no, they were not added to the slides, so you really had to follow him through the labyrinth of his examples). This guy must be a fantastic engineer, but he surely came a cropper as a presenter. People around me first became disinterested, then groaned, then some of them slept in the cool air conditioning. And people like me, who had better things to do in life, got up and left, for good.

I see this problem time and again, mostly with Indian speakers. They speak too fast, they fill up their presentations with tonnes of slides (without any graphics or anything to keep the audience interested), and almost none of them add spice to their talks with humor. And yes, most of them forget the audience. They find some nodding heads in the front rows, and then the whole session is presented only to those nodding heads, be it a presentation in front of 70 or 700 people. They will stick to their monologue, blurt out their stuff and go away. The audience sleeps, or leaves.

Please guys, time to learn some presentation skills. Think out of the box, you are not presenting a paper at such conferences. There are better ways to get your message across.

Monday Feb 25, 2008

NetBeans never boasted of a good editor as compared to IntelliJ IDEA and Eclipse, but things took a complete turn when NetBeans 6.0 came out. And now that NetBeans has conquered Java developers with the shining new editor, NetBeans is going gung-ho for Groovy, Scala, Erlang and what not. Though I totally agree to Groovy and Scala becoming first class citizens in the NetBeans world, I personally feel that NetBeans needs to do something about nicely editing a 10 year old thing - XML.

Why, you might ask. Well, whatever web frameworks I have dealt with, Struts, Struts2, Spring MVC, JSF, require reasonable amount of configuration in XML. Hell, even many non web applications seem to use Spring and it's XML configuration files. Though the deal is now seeming in favor of POJOs with annotations, I don't think developer authored XML is dead, by any means.

In a series of upcoming posts, I plan to compare the XML editing landscape in Eclipse, IntelliJ IDEA and NetBeans. IMO, NetBeans has the weakest XML editor story, but I plan to make a wishlist out of this, hopefully someone will come along and take XML editing in NetBeans to new heights.
 

Monday Jan 21, 2008

Having worked with the NetBeans platform for a year now, I am a happy coder. The most pleasing aspect of things is that if I am stuck, I can look at the sources and find out how to go about things. Don't know how to use an API? Just dig into the NetBeans sources and find out how it is implemented and presto, your doubts are gone. Yes, sometimes I have been stuck and needed to ask questions to other NetBeans wizards, who were ever ready to help me, but the rule of the thumb in asking such questions is that you should have done your homework before putting your question across. And this is true for any open source software. However, time and again I see some extremely stupid questions on the mailing lists.

Would you go and ask Linus Torvalds, what is an operating system on the Linux kernel mailing list? Even if he or other kernel commiters were patient enough to answer such a question, instead of writing a tome in reply, they would ask you to grab a book and try to understand yourself what an operating system is. Isn't it really stupid to ask questions whose answers could have been found if you had just bothered to look around a bit? Don't you feel an 'AHA' moment when you have deciphered how something works, all by yourself, after sweating it out?

Whenever I have conducted a training course for students in my home town, I have always been appalled at the awareness index of these would be computer engineers. And if you think India is a low bandwidth country, I don't agree. These youngsters have all the bandwidth at their disposal to download the latest episodes of "Heroes" or tonnes of wallpapers and songs. But the bandwidth suddenly dries up magically when it comes to visiting sites like openoffice.org, opensolaris.org, netbeans.org or even sourceforge.net.

Sun made an attempt in the right earnest to get these students in India out of their slumber. We launched the Code For Freedom contest specially for Indian students, and we have discovered some real gems. But in general I have to admit, an average Indian student wants to be spoon fed again and again. It's a sad thing. I hope this changes some day.

Sunday Dec 16, 2007

After wondering for so many days, where Josh Bloch had vanished... I am rubbing my hands with glee. What a statement he made at JavaPolis. Hats off, Sire, for being the one sane voice in a room full of G's and A's who are out to tear Java apart. Thank you, for saying what you did. You do not blog, nor do you go around saying "Closures, Closures" to every corner of this planet. But when you speak, you surely do pack a punch.

I am not a language researcher, I am just a programmer, happy with what I have got in Java. Perhaps I haven't written a smash hit application like what G's and A's have written, but I do know this: I threw away C++ before learning it, and I fell in love with Java. I may be a moron in the eye of  a computer scientist, but I love simplicity. I loved Java for what it was, and what it is, and I surely hate what it is going to be if it gets closures.

Now, I just offer an opinion, coz I have not completely read any closures proposal, but I have seen the code examples. They are horrible. Some, downright crazy. I will hate to write Java code if this mess comes along. Please, please leave my beloved language alone. Go find your own play ground to mess things.

I offer no technical insight here. For an extremely balanced analysis of the scenario, please read this excellent post by Bharath.

 

Tuesday Dec 11, 2007

I was trying out IntelliJ IDEA 7.0 and came across the XML breadcrumbs feature. The breadcrumbs bar tracks the current position of the cursor in the XML tag hierarchy.

 

It would be so nice to have this in NetBeans. So here it is (sources to be uploaded soon):
 

This blog copyright 2009 by gridbag