My wife just started to learn programming for fun, so I told her to start with Java, because it’s simple and quite straight forward. After she managed her first “Hello World” she was disappointed as no application popped up but the message was printed in a terminal. Well, I told her that these are the basics and she should be patient for what’s to come.
So, today I thought of preparing a GUI “Hello World” for her: A nice Button saying “Hello World” and when you click it, the app will quit. Simple, though, but what UI toolkit should I show her: Swing or SWT? I decided to go for both. Well, and, being a fan of Qt for more than a decade, I couldn’t resist preparing a Qt Hello World too. To my surprise, now I’m a little worried about having told her to start with Java, but count the lines of code and judge for yourselves:
Alright, I didn’t need a header file yet, but still, it’s the implementation code that counts, don’t you think?

But Lines of Code are not a good indicator for good Code for Beginners. I think the Swing code is easy to understand the qt is a more Vodoo or Magic for me. I would like to see a Example in GWT too.
PS: if Lines of Code would count the old Visual Basic 6 would win, i think it’s 5-6 Lines of Code (1 -2 Line without declaration)
I agree that lines of code might not be the best indicator, but what’s so voodoo magic about creating a “push” button and connecting its “clicked” signal to an applications “quit” slot. I can’t think of anything more intuitive than that, maybe a better syntax, alright, but the semantic is superior to the observer pattern in my opinion. Its already half the way of the MOVE pattern.