Skype Contact List, Proximity and … vanity

Recently, I had the chance to see one of my former co-worker Skype contact list.
I was surprised to see my name next to Scott Mc Nealy, one of the three founders of Sun Microsystems.
Thanks Ludo for the (vanity) shot !

No Comments

Put a Java Brain into your Lego Robot

Our JavaONE session today went very well.  The room was packed (roughly 150 persons), with people standing in the back.

All demos went well, after a few surprises and tuning 🙂

Comments and questions during the talk were very positive.

As promised to the attendees, here are the slides, the source code of the REST API (as a NetBeans project) and the source code of the iPad application (as an XCode project).

Feel free to leave comments and remarks here.  Thank you for attending and enjoy !

, , , , ,

No Comments

Playing with Lego’s Mindstorms, LeJOS, GlassFish and an iPad

I will co-present three different session, hands-on-lab and BOF during JavaONE 2010.

One of these has actually nothing to do with usual business, it just aims at being fun and at playing with geek toys : we are hosting a BOF about Java programming for the Lego’s Mindstorms, i.e. the LeJOS project.

Neither David or myself are directly involved with LeJOS community, we are just regular users willing to share our experiences with people discovering Lego’s Mindstorms kit and the LeJOS project.

So, if you happen to be around in San Francisco next Wednesday, be sure to stop 45 minutes at 02:15 pm in the Parc 55 Hotel (Room Divisidero)

David will demo how to interface Lego’s NXT brick with an Arduino device.

I will show how to create a iPad controller for a robot, using a REST interface hosted on GlassFish.

Does it sounds geeky enough ? A short videoshow all this in action.

, , , , ,

No Comments

Can we Trust IP Geo-Localization Services ?

The next version of Maxi80 iPhone application will include a very simple user tracking capability : each time a user listens the web radio for more than n seconds, the application will ping one of my servers, allowing me to collect stats such as date and time, ip address, device model (iPhone, iPod Touch,…) and iOS version number.

Most of this information is also available to the web radio admin through the Shoutcast log files – but I don’t have access to these.

On the server side, I am calling an IP geo localization service to track countries from where people do listen to the radio.

At the time I am writing this post, the new version of the application was submitted to Apple for validation.  This means that only Apple and myself have a version at our disposal for testing, the application is not distributed to the public yet.

In other words, every ping request I am seeing on my server is either coming from me, either from Apple.  Despite this, I am seeing requests from many different countries : Belgium (these are mine), United States West Coast (this should be Apple), United States East Coast (maybe Apple has iPhone Apps validators working from there too).  But I also got requests from two weird locations : Pakistan (Islamabad) and Greece (Athens).

I tested these two IP addresses on many geo localization services and they all gave me the same result.

My conclusion : either Apple tests our iPhone applications from the three continents (America, Asia and Europe), either something is flawed with IP Geolocalization services.

Should you have a good knowledge of IP geo localization inner working – or – from Apple’s iPhone Apps validation process, do not hesitate to leave a comment 🙂

, , ,

No Comments

JavaFX Talk at Brussel’s Java User Group

This week I will present JavaFX to the BruJUG folks.

The talk will be divided in two parts :

  • During part #1, I will present the JavaFX programming language and associated tools.  This will be a one-o-one discovery tour for people without previous experience with JavaFX.
  • Part #2 will be a hands on lab based on my JavaONE 2009 talk.  This lab will provide step by step instructions to build a JavaFX RIA with asynchronous REST communication to a web service deployed in GlassFish.

Should you plan to attend part 2, be sure to download and install NetBeans 6.9.1. From the download page, pickup the largest bundle, the one including JavaFX and GlassFish.

BruJUG events are free and open to everyone.  Should you happen to be in Europe’s Capital this Wednesday, feel free to join (but do not forget to register first for obvious logistic reasons)

,

2 Comments

iPhone 3G Connection Tethering without Jailbreak

iPhone tethering consists of using your iPhone as a modem with your laptop or iPad to provide wireless connectivity through your 3G data connection.

Tethering is authorized by Apple as long as your carrier does authorize it as well.  And, most of the times, the providers do charge a special rate for tethered data traffic.

If you have a subscription to an unsupported carrier, you’re locked.  Other mobile phone systems have more open options.

To work around this limitation imposed by Apple and the carriers, the most common solution is to Jailbreak the iPhone, allowing to install non Apple approved applications through Cydia.

I don’t like to jailbreak my phone.  It is a cat and mouse game, each time Apple does release a new version, the jailbreak is broken and we have to wait for a new jailbreak solution.

Although it does exist some tethering without jailbreak solutions, I never found one as clever and obvious as iProxy.

First a disclaimer : iProxy does require Apple developer tools and a developer profile (or to know someone that has one).  It is not a solution for every user and certainly not for my grand’ma !

The ideas behind iProxy are so simple, I am jealous.  I wish I had these ideas myself.

First, the application is distributed as source code only.  It is an XCode project that you must compile and install on your phone.  Installing the binary on your (not jailbroked) phone requires to subscribe to Apple’s developer program.

This allows to circumvent Apple’s review process required to publish application on the App Store.

Secondly, iProxy is not a tethering solution, it is “just” a generic SOCKS v5 proxy, allowing to relay traffic between SOCKS clients (your laptop or iPad) and the Internet.

iProxy developers did not write the SOCK code themselves, they smartly reuse the code of SRelay, an open source, UNIX-based, generic SOCKS proxy (iOS is a UNIX OS, remember !)

They even include a small embedded and open-source HTTP server, to be able to provide proxy auto configuration files (PAC files) over HTTP.

Once compiled and installed on your iPhone :

  • On your laptop, create a private wifi network
  • assign a static IP address on your laptop
  • define a SOCKS proxy with the iPhone’s IP Address (see below) and the port 8888
  • On your iPhone, join the wifi network
  • Assign a static IP address in the same range as the laptop
  • start iProxy application

Should you try this with an iPad, you will realize there is no possibility to define a SOCKS proxy on the iPad.  This is where the Proxy Auto Configuration file (PAC file) and embedded HTTP server comes at hand.  In your iPad Network Settings, define the following line as “Auto Proxy Configuration”

http://<your iphone IP address>:8080

Mobile Safari will read this file.  It contains a simple JavaScript function that defines the SOCKS proxy with iPhone’s IP address and port number.

This is it.  This solution is not too complicate to setup and use (for technical users), it makes a very clever use of open source and it is pretty efficient !

, , , ,

2 Comments

How to Create an Animated JavaFX’s Line Chart ?

Java FX introduced charting components back in 1.2 version : AreaChart, BubbleChart, PieChart, LineChart … you name it.

You will find a good introduction to LineChart capabilities in Rakesh’s blog entry.

One common request found in forums and blogs over the Internet is to create an animated LineChart, i.e. a line based chart where the line is moving from left to right as values are added to the component.

JavaFX.com official website even host an ugly attempt to implement this : by moving a Rectangle over the scene, gradually showing the chart below it. (nope, this is not a joke, go and read it by yourself)

While preparing sessions and labs for the upcoming JavaONE 2010 conference, my colleague David and myself did implement a true Animated LineChart component.

This component exposes a very simple public API :

public function addValue(v:Integer) {}

Each time a value is added to the graph, the line will move to the right side, possibly discarding older values on the left side when the line will reach the graph’s right border.

The magic is done as following : new values are added to the LineChart.Series[0].data[] array.  When the array is filled in (when the number of elements in the array is equal to the number of tick marks available on the X axis), the oldest value (LineChart.Series[0].data[0]) is removed and all values are shifted one position left in the array.

Source code and detailed instructions to build this AnimatedLineChart component will be given during our JavaONE 2010 Hands-On Lab (S616734 currently scheduled for Thursday, 23rd at 12:30 pm at the Hilton) (see UPDATE at the end of this post)

In the meantime, you can have a look at the screenshot below.

[UPDATE : November 2011]

Due to popular demand, and because we learned that Oracle will not make JavaOne’s talk freely available to all, like Sun use in the past, here is the source code for this component.  Enjoy !

AnimatedLineChart.fx

, , ,

2 Comments

A Java library to use Belgium eID cards

Today, I used my Belgium Electronic ID smart card to digitally sign my Tax Declaration.  Nothing new here, it happens now since six years in a row (I just wonder how many countries have setup such an end-to-end digital system, including digital signature, to interact with various administrations).

As every year, I wonder what API and libraries are available to programmatically extract or sign data with the smart card : a bunch of low level PC/SC API calls, a couple of Java-through-JNI samples, but nothing really high level and easy to use.  Most of the examples returned by Google are quite old, not adapted to Java SE 6, not running in 64 bits mode and are not working on Mac OS X … sigh !

This year however was different, Google spotted eidlib, a Java SE 6 native library wrapping operations of the Belgium eID card.

This API is different from all the other I know : it uses the Java SE 6 javax.smartcard i/o framework to directly communicate with the card reader, exchanging APDU as required per the card protocol.

This is by far the easiest to use Java library for eID I found so far.  You just need to include the JAR file into your classpath, then write simple code like :

           BeID eID = new BeID(true); // We allow information to be fetched from test cards

           // We fetch the information
           System.out.println("InformationRetrieval -- ID information:");
           System.out.println(eID.getIDData().toString());
           System.out.println("InformationRetrieval -- Address information:");
           System.out.println(eID.getIDAddress().toString());
           System.out.println("InformationRetrieval -- Photo is saved to file:");
           eID.getIDPhoto().writeToFile(eID.getIDData().getName());

Et voilà … ready to include strong authentication and signature in your own applications.  I tested every example provided on the web site with NetBeans 6.9, using Java SE 6 64 bits on Snow Leopard.

This library was developed by Kristof Overdulve, at that time student at the University of Antwerp, for his Bachelor thesis.  Kuddo !

[UPDATE]

Bart pointed me to this eID Applet project.  If all you wanna do is include eID authentication or signature in your web application, then the eID applet is probably the way to go.

, , , ,

8 Comments

YaJuG’s “Google Night” videos are available

Tonight, Luxembourg’s Java User Group (YaJuG) will host it’s third 2010 conference.  Theme for tonight is “Cloud Computing”.  It is not too late to register.

Should you have missed our previous conferences, do you now that the slides are published on our web site and that the full video content is available, free of charge, on Parleys.com ?

Enjoy !

,

No Comments

Will I Switch from iPhone to Android ?

As promised, here is a feedback after my 20 days exclusively using an Google Nexus One Android phone, and Android 2.2 (Froyo release)

First, some disclaimers :

I am an iPhone user, fan and application developer.  I am using iPhones since day #1, I first owned an iPhone 1G, then an iPhone 3G.

I do not intent to write a complete Android review (techradar, or gizmodo have done that already).

I am a new Android user, I had no previous experience of Android before 2.2, so I will not write about the speed boost or the best new features, just because I do not (want to) know what is new and what is not.

I rather would like to concentrate on the differences with my iPhone 3G, running iOS 4.0.

I will not comment about the hardware pieces, such as the Camera, the batteries etc …  I’ve done that already.

A Google Centric World

The first big difference after power on, when I started to configure my most important applications, such as email, calendar and address book : I had to think Google.  Obviously, Android is Google-centric and all its data are coming from Googles services such as email, calendar and contact.

Over the air synchronisation is great.  Whatever changes in your contacts or calendar is immediately shared amongst the web and your phone. iPhones offers this as well but for an extra fee : a MobileMe subscription.

Should you be a Mac user, MobileMe synchronization comes automatically, while I needed tools on the Mac to synchronize my data with Google servers (SyncMate or TheMissingSync for example).

No big difference for me. A small advantage for the iPhone because no additional software installation is required (Yes – I do consider iTunes as already installed)

User Experience

Overall, I found the Android general user experience less intuitive, here are a couple of examples :

There are 4 buttons on the bottom of phone : Back, Menu, Home, Search + in addition to the scroll wheel.  This is 3 too much.  I like the simplicity of the the one button iPhone.  As a user you always have to think about which button to click on : do I have other options available through the “Menu” button ?  Where the “back” button will bring me back (it is always a surprise move for me).  The only button I feel comfortable with is the “Home” button, similar to what I am use to on the iPhone.

“Settings” application contains many options, it is not always clear where to find what option.

Third-party application suffers from lack of coherence and lack of “user interface guide lines” for application developers.  Some of them are great (Twitter for example), some are not (no name – sorry), making the whole user experience a little bit like a box of chocolate : you never know what you gonna get.

There is less space between keyboard keys, leading to more typing mistakes, at least with my fat fingers.  But I understand this is really subjective.

About the typing experience, Android displays a set of suggested words from the dictionary while typing.  I first love this function as it allows users to pick a word before completely typing it.  Then I realize this interrupts the typing flow and divert your mind away from the sentence you’re typing.  After a couple of days I surprised myself trying to ignore these suggestions and keep my mind focusing at the task, i.e. typing.

On the other side, I really like the notifications in the task bar, it allows to have a quick view on recent events such as unread mail count, unread tweets or new Facebook notifications.  This is non intrusive and always available.  I miss an equivalent on the iPhone.

More advanced usages

Because Google does not try to control its platform at all cost, Android has some advanced features not available on every iPhone (although some of these are now available with the recent update to iOS 4)

The multi-taksing comes first on my list, your applications stay active in background, and continue to play music, poll network services etc … iOS 4.0 just introduces this possibility too if you own at least a 3Gs.  Platforms are equivalent now in this respect.

However, Android allows a much more fine grained application control with possibilities like “Force Stop”, “Clear Cache” and check various system statistics, such as memory used etc …  While this is great control for a Geek like me, I doubt this is something my grand mother can understand and will use.

3G tethering to WiFi is close to multi-tasking in my favorite advanced feature list.  It allows to turn your phone into a portable hot spot, delivering wifi connection to clients, through the 3G subscription.  This is the reason why I will keep the Android phone in my bag when traveling : to let my iPad / MacBook connect to the 3G network through the phone.

iPhone’s iOS 4 offers tethering through USB or bluetooth only.

Camera

The camera is not part of my day-to-day phone experience (I prefer to carry along my heavy Canon DSLR to take pictures), although the common advise : the best camera is the one you have always with you.

The Camera control application allows to zoom, control the white balance and the flash.  It also allows to record movies.

As said in the introduction, I do not own an iPhone 3Gs, so these are new welcome additions for me.

Android Application Distribution, aka the Android Market

The Android market is the equivalent of Apple’s App Store.  This is the place where you can find (and sometimes buy) applications for your phone.

As an end user, the thing I dislike about Android Market is that it is only available on the phone.  Using a small screen is not the best browsing / buying experience ever.  I’de love to have a web based Android Market where I can select and find the applications I want, then, an over the air provisioning to the phone.

As a developer, on the other side, I do love Android Market because it makes your application available to end users immediately.  There is no review or approval process.  While this is great to be able to quickly push updates to your users or customers, it also leads to the very variable user experience I described above.

Misc. good and bad surprises

One very bad surprises I had during these two weeks of Android utilization is the way it sometimes merged my contact information.  Two contacts in my address book, with similar first or last names are merged together, bringing all the phone numbers and email address into the same contact.

I first thought about an issue in the synchronization software I was using, but after some researches on Google, I found that the is the normal behavior of Android’s Contact application and this is indeed made on purpose ! (although a bug has been filled for inappropriate merging attempts)

This leads me to the good surprise.  The Android community is extremely active and vocal (probably never encumbered with NDAs neither), making problem solving and troubleshooting extremely easy, both for end users and for developers.

Conclusions

So, what are my conclusions after 20 days with an Android phone in my pocket and one application developed ?

Android is a powerful system, robust, fully featured and an extremely pleasant platform to develop for.

To me, it looks like a phone made by engineers.  It lacks end user interface polish and user interface coherence for third party applications, it lacks simplification.  I’d love a system with less functions, buttons and easier to use.

When it comes to software design – I like to remind Saint Exupery‘s thought : “Perfection is not when there’s no more to add, but when there’s no more to remove”

Power users will love Android.  I am back to my iPhone.

[UPDATE]

@fmallefait pointed me to this article fromAppleInsider : “iPhone 4 and iOS vs. Android: desktop and cloud services” which perfectly complements this post.

, ,

3 Comments