Support the Elvis proposal for Java !
Posted by Olivier Gérardin in Java on 2009-12-30
Are you tired of writing
(x != null) ? x.getThis() : null
Would you rather write something like
x?.getThis()
If so, support the Elvis proposal for Java !
Interesting alternative notations can be found here.
The future of mobile apps is web apps
Posted by Olivier Gérardin in Culture on 2009-12-23
This conclusion comes from examining the following facts:
- modern smartphones are equipped with a recent, state-of-the-art, JavaScript/CSS capable web browser
- modern smartphones are most often associated with a “always connected” data plan
What this means is that if you need to develop a mobile application that should run on several mobile platforms, you have basically two possibilities:
- learn each different platform and associated SDK, develop and maintain a different version for each of them, not to mention you’ll have to manage distribution/deployment
- write a single web app that will run on all platforms, and be always up-to-date
Easy choice isn’t it? Now I should also add a third fact that will undoubtedly contribute to this trend:
- GWT and GAE make it ridiculously easy to build web apps (including for mobiles)
For example, my new Palm Pre doesn’t come with a facebook app. Why bother? it’s just a link to the mobile version of facebook.com. Maybe it’s not as rich as a native app, but it’s damn close, and the line will get thinner and thinner as HTML5 spreads.
Actually, the Palm Pre is a very good example of this convergence, since the standard SDK uses JavaScript as the development language. So basically, each app on the Pre is a web app!
You can read Alex Nicolaou’s blog post on the Google mobile blog for another view on this subject.
And the winner is.. Palm Pre!
Posted by Olivier Gérardin in Culture on 2009-12-21
Right the same day I posted an blog entry about my dilemma between Android and Palm Pre for my next phone, I got the latest LUXGSM folder in my mailbox, which features the Palm Pre (“Palm’s very expected tactile phone” according to the folder). So I decided that Android would have to wait, and I got myself the little beast as an early Christmas present…
The device was only available in german, I guess it’s the same version that is sold on the German market. The documentation is in German but I figured it wouldn’t be a problem; plus the device language can be selected at startup, and includes French and English. The keyboard is QWERTZ, but I already use one at work so no problem.
The thing is, you can’t do anything with the phone until you have linked it with a Palm profile, but to do that you must be on a supported network. Unfortunately my SIM card is Orange, so I had to use my wife’s SIM card (which is LUXGSM) to create my profile. After that I could put back in my Orange SIM card and the phone would start normally. Well almost, because I still couldn’t connect to Orange’s data network, even though there is an option to manually enter the data network parameters. As it turned out, this option is useless if your carrier isn’t in the built-in list of known carriers, which of course didn’t include Orange Luxembourg. Fortunately, there is a method to alter this list so that your carrier is recognized, as described in details in this post. After the manipulation, finally everything worked as expected.
I was truly amazed by the Synergy feature, which allows multiple online profiles to be managed seamlessly. In a blink I had added my corporate Exchange account, LinkedIn and Facebook profiles, Gmail account and my private e-mail account. Similar contacts from different profiles were linked together (with only a few mistakes that needed to be corrected manually). Events from different online calendars appear together in the same calendar view. This is really a dream for those who might be victims of information scattering: synergy brings it all back together.
When I show my new phone to people, the reaction I get most often is “Ahh, it’s an iPhone copy…”. Actually, the Pre is better than the iPhone in several aspects. First, it has true multitasking, supported by an intuitive and efficient user interface. Second, it was built for the web; it’s OS uses JavaScript as the main programming language, and as I said above the Synergy feature is really a gift of God for those who juggle with several online profiles. Third, unlike the iPhone, you can install applications on the Pre without having to use an AppStore where someone decides which application is suitable and which is not.
So far I’m still amazed with the Pre, but it’s not all pink: for those who like using an app store, Palm’s application catalog is ridiculously small in comparison with Apple’s AppStore; only 51 applications are listed as of today, and no paid apps are available. Apparently Palm is delaying the availability of this feature in Europe for who-knows-what reason. The battery capacity is a bit weak, but I’ve been playing a lot with it so it remains to see how it behaves on a “normal” day. I also have to get used to the sliding keyboard, which is not very natural. But so far, I’m very pleased with my new toy
This might be my next phone
Posted by Olivier Gérardin in Uncategorized on 2009-12-14
I’ve been pondering a replacement for my (still reliable but aging) Treo 680. Since I have decided not to get an iPhone as long as the App Store has such insane policies, I’ve narrowed my search down to:
The Pre has a groundbreaking OS called webOS which is almost entirely built on JavaScript and web technologies. It’s the phone that was designed for “always on” operation; it integrates seamlessly with online services such as mail and calendar from several providers (including Google of course). On the down side, it’s only available in a handful of countries in Europe, Luxembourg NOT being one of them. I called all three mobile network operators and none of them had even heard the name “Palm Pre”, so I don’t suppose I should wait for it to arrive here anytime soon. I could get a German one, but apparently you need to activate it on a German network, plus it comes with a QWERTZ keyboard.
Android phones are not that much easier to get, but they exist. There was an offer for an HTC Hero not long ago, but most reviewers found the hardware a bit lagging, so I decided to wait.
But now it seems that Google might be selling soon its own Android 2.1 device, unlocked GSM, with no carrier messing with the software… How great is that ? My own Christmas might be a little late this year
Mark Reinhold’s proposal for Java closures
Posted by Olivier Gérardin in Java on 2009-12-14
I believe this proposal, although incomplete, to be much more acceptable to the current Java community than existing BGGA or FCM.
Most proposals state that it’s not the syntax that matters, it’s the semantics. While this is undoubtedly true, syntax is the first thing a programmer will see and judge the feature by. If the syntax isn’t self-explanatory enough, it will be a cause of rejection, and the feature will not be used as it could have been. So I do believe syntax is a key point of the future Java closures feature, and in this respect I tend to favor Mak Rheinhold’s proposal or the FCM proposal rather than BGGA.
It’s official: GWT 2.0.0 (with SpeedTracer)
Posted by Olivier Gérardin in GWT on 2009-12-09
Finally, as anticipated Google set the “release” tag on GWT 2.0 and announced it at its Campfire One event yesterday. In addition to the well-known major new features (development mode, Code splitting, UiBinder, ResourceBundle), Google comes with a new tool named Speedtracer to measure the performance of Ajax applications inside the browser. SpeedTracer is only available for Chrome at the moment, unfortunately only on platforms where extensions are supported, which means not on Mac currently (actually it does work on Macs, see comments to this post)…

The online docs have been updated and are still IMHO a model of how online documentation for a project should be done: clear, concise, well structured, complete yet progressive, with examples… it’s almost fun to read. I wish every project had docs like this.
GWT 2.0 RC2 available
Posted by Olivier Gérardin in GWT on 2009-11-29
The book is out… Le livre est sorti…
Posted by Olivier Gérardin in GWT on 2009-11-18
The same day as GWT 2.0 RC1, that has to be a good sign…
(cliquez sur le livre pour feuilleter une sélection de pages)
GWT 2.0 RC1 is out!
Posted by Olivier Gérardin in GWT on 2009-11-18
Hi folks!
GWT 2.0 RC1 is now ready for you to try. The full documentation is still very much a work in progress, but you can at least start trying out the GWT SDK distribution and the Google Plugin for Eclipse using the following instructions:
http://code.google.com/p/google-web-toolkit/wiki/GWT_2_0_RC
GWT 2.0 is going to be a big release, so don’t be surprised if there are a few bumps and surprises as we continue to finalize everything.
Read full announcement on GWT group
lambdaj – easy collection manipulation
Posted by Olivier Gérardin in Java on 2009-11-17
LambaJ is quite an interesting project. How many times did you write the same loop, with only a few differences that were impossible to factor out because of the lack of closures in Java?
LambdaJ partially alleviates the need for closures by allowing the manipulation of Collections in a way that doesn’t require iterating through the items. For example you could write
forEach(personInFamily).setLastName("Fusco");
with personInFamily being a List of Person, and setLastName being a method on the Person class. Actually, forEach returns a proxy that implements both the Iterable interface and the methods of the collection items’ class (Person in this case). A call to any of these methods is then propagated to each member of the collection.
As you can see, LambdaJ uses the DSL-style notation that mock frameworks introduced, which I’m not particularly fond of; but I must say that in this case it produces quite elegant and readable code.
As a bonus, LambaJ also offers its own flavor of closures…