Wednesday, May 28, 2008

How does Google manage Android's code

In a recent article, I read that Google currently uses Perforce as its source code management tool for Android. The reason why they chose this particular tool can be found in a comparison of other SCM systems (also Wikipedia offers more information if needed). In addition, it is worth mentioning that Android consists of around 8 million lines of Linux code, and about 11 million lines of Java/C++ and maybe some Python code. Since they want to open source around 8.6 million lines of code, Google will move away from Perforce when it comes to managing Android code, and use Git instead, an "open source version control system designed to handle very large projects with speed and efficiency".

As a side note, one particular difference between Git and other SCMs is how Git handles data corruption. Most of SCMs have no checksums, and if they have, it's not really strong (CRC usually). Git goes further, and, beside using CRC and Adler32, it also utilizes cryptographic hashes. If you are interested in a book on Git, you have to wait a bit more.

Tuesday, May 27, 2008

Wall Climbing Robots

We are used to see robots on the ground. I have never seen robots climbing walls until I read the IEEE Spectrum article on wall climbing robots. Here are a few images:

Photo: Mark Cutkosky/Stanford University

The above Stanford's wall climbing robot uses gecko-inspired directional adhesives on its feet. Why being inspired by a gecko you ask? Because, in concordance with the wiki description of the gecko, "the toes of the gecko have attracted a lot of attention,as they adhere to a wide variety of surfaces, without the use of liquids or surface tension. Recent studies of the spatula tipped setae on gecko footpads demonstrate that the attractive forces that hold geckos to surfaces are van der Waals interactions between the finely divided setae and the surfaces themselves."

Photo: Harsha Prahlad/SRI International

The above robot is the static clinger that uses electrostatic forces to clamp to a vertical surface.

Read the IEEE Spectrum article for more details on each of these robots and watch the videos mentioned in there.

Ericsson's Mobile Front Controller

Mobile Front Controller developed by Ericsson is a web application framework that allows you to develop applications that have the same UI logic for both the web and the mobile browser. When the Mobile Front Controller receives a HTTP Request, it detects whether is a wap- or a web- specific request and loads the underlying user interface using the correct HTML, WML, or XHTML-MP markup language. The framework runs directly in a Java EE web container.

Tuesday, May 13, 2008

Sony Ericsson's Project Capuchin

Sony Ericsson has announced Project Capuchin, a Java ME API that lets you run Flash Lite content files on the mobile phone's display, thus having Flash Lite as the front end, and Java ME as the back end of your application.

From the press release:

"Project Capuchin will provide developers with an intuitive tool to create applications with a cleaner user interface (UI) without sacrificing the strong, feature rich and widely deployed Java ME infrastructure, including secure, well-developed content distribution. Project Capuchin’s bridging software will empower two distinct developer communities to leverage their respective expertises to create the next generation of highly engaging and immersive mobile content."

The need for such a solution comes from the limited capability of the Mobile Information Device Profile's LCDUI API used on embedded devices to write (graphical) user interfaces for your mobile application. This technology will be made available in the second half of 2008.

Sunday, May 11, 2008

AndroMed and Google's Android Developer Challenge

I have briefly mentioned Google's Android Developer Challenge in one of my previous posts. The idea behind this challenge is to have developers work on mobile applications that run on the Android platform with the chance of winning a fair amount of money. Together with my soon-to-be-wife Mirela (which wrote the application server side), we have developed AndroMed, a mashup application that combines data, from the Unified Medical Language System Knowledge Source Server (UMLSKS) and Google Maps, together with the services described below, into a single integrated application. Here are the main features of our system:
  • Search and display descriptions for medical terms or drugs.
  • Provide location information in form of maps and addresses of hospitals/pharmacies using user’s current location and the medical term/drug searched for.
  • Display driving directions from user’s current location to the chosen hospital or pharmacy.
  • Open web site for found hospitals/pharmacies
  • Make a call to found hospitals/pharmacies
  • Send email with description of medical terms or drugs using your own GMail account.
  • Upload your own comments/notes regarding the term you have searched for.
  • View comments/notes written by other users regarding the term you have searched for.
The area of focus was divided between:
  • Humanitarian benefits. In Africa for example, where access to medical information, such as term descriptions, drugs, treatments and treatment facilities, is scarce, AndroMed will have an impact. Diseases like Malaria, Ebola Virus, AIDS are well spread in third world countries, but people there have little, if any, information about them. They could benefit either directly (although this is a little of a stretch considering that there are specific medical words used that have almost no meaning for an untrained person) from using the application, or indirectly from others using it (i.e. Non Government Organizations like “Doctors without Borders” that usually work in such places of the world). The “Future work” section of this document also mentions ways to improve the application for people with disabilities.
  • Use of mash-up functionality. AndroMed aggregates data from different sources (such as UMLS Knowledge Source Server and Google Maps) into one integrated application. For medical organizations that do not stay stationary for long (like the one mentioned above), we could get a schedule of were and when they will be, either directly or through their website.
  • Use of location-based services. Based on the user’s locality, we provide hospitals/pharmacies location information and directions.
Here are some screenshots of the application together with some positive and negative comments:

The reason why I provided a login screen is because we had to identify somehow each user if they wanted to write some comments/notes regarding the medical term or drug they were interested in; in addition, when reading the comments, we would use the name of the user to separate each one (as you will see in a screenshot shortly below). This login step might be discouraging for first time users because they would need to create a new account, thus going through an additional hurdle to get to the core functionality of our application. Of course for the challenge, we have created a test user so that the judges can skip the registration part. At this moment I wonder if we could have omitted the login process altogether are rethink the comments part.

Searching for a medical term or drug is simple and straight forward: just type in the term and click a button.

First of all, reading through this medical term description, you can notice that for a non-medical person, it is hard to understand. Terms such as "carcinoma", "epithelium", "bronchogenic carcinomas", "adenocarcinomas", etc, have (almost) no meaning for an individual that has no medical background. This is where the field of use for our application has narrowed considerably. For the Android challenge, your application should have a much (much much) wider audience.
Second of all, text buttons should have been replaced with icons. This is true for our entire application, not only for this particular screen. It has been noticed that people have responded better to images than to text (I'm sorry I don't have any references for this).

The concept of the comments screen is similar to a list example that comes bundled with the android sdk. Each user's comment is identified by the user's name. One user can have more than one comment, and his name will appear as many times as the number of comments he has. To be honest, I don't quite know how I could have designed this differently. I wanted to be able to highlight links, email addresses, phone numbers (make them 'actionable' - if this is a word), but even though I succeeded, there were some (focus) bugs when moving from one comment to another, so removed the highlighting part. More work would have been necessary, but in the time frame we had, I decided to add more features to the application instead of improving existing ones (bad decision on my part).

Based on the specific term searched for, the user has the option to find hospitals (or pharmacies) near to his own current location. We have used the default location provider that comes with the sdk. The blue ovals represent the hospitals, while the single red oval represents user's location. I was not happy with the way I designed this; if you take a look at how similar features are implemented by Google, you can conclude that our map screen falls behind.

Displaying the addresses and phone numbers of each hospital in a separate screen was a decision made after we had switched to the m5 sdk version, where I could not find a way to display the name of the location.

After choosing a hospital, one can either make a call to that hospital, open its website (both done through the phone's menu option), or find direction starting from the user's current location.

When implementing the map screen, location addresses and directions, I always new that they would fail in comparison with the current map solution offered by Google. I should have invested more time in making it better.

Below is some future work for our AndroMed application:
  • Add other languages to the application.
  • Add, when available, text-to-voice translations and voice recognition for people with disabilities.
  • Add icons instead of text buttons where possible since people tend to respond better and find applications that use icons easier to use and understand (people who cannot read).
  • Add a “Help” options menu to each screen of the application.
  • Find specific treatments for the medical term searched for.
  • Find clinical trials for the medical term searched for.
  • Replace Google Maps search with a more specific search from a medical database.
  • Cache on the Application Server results for frequently searched terms.
We do believe that our idea is unique in the sense that there is no current mobile solution that offers what we have implemented. There are dedicated websites (such as WebMD) but the browser experience on a mobile phone has still a long way to go; in addition, such websites are not optimized for the mobile experience, which makes them harder to navigate through.

Overall, working with Android has been a great experience. Without any doubt, it will have a big impact on the mobile platform front.

UPDATE: The quartile score results were emailed today. AndroMed is ranked in the top 25 to 50 percentile of all applications submitted. As expected, the effective use of the Android platform and the overall polish of the application lagged behind. The indispensability and originality were the features that closed the gap a little.