content top

Riding the Rods

Riding the Rods

Occasionally, when driving in my car, I would like to capture what I am seeing passing by, the landscape, clouds, or simply what’s currently going on outside. For the driver that’s a pretty hard if not dangerous thing to do, but even for a passenger, it’s not an easy task to operate a photo or video camera considering all the moving and shaking that’s happing inside the car.

We have tried a couple car mounts, most of them, like windshield suction-cups for instance, were rather flimsy and could hardly support a mobile phone or Flip Mino. So it was finally time to build our own and inspired by a project that was featured in Make Magazine (08/2008) we went to the nearest Home Depot. We didn’t diligently prepare a Bill of Material and instead adjusted our project plans based on what was available and affordable. Here is what we ended up buying:

  • Aluminum Angle Gauge 3 feet = $13.90
  • 2  U-Bolts 1/2″ Pipe ($.91 each) = $ 1.82
  • Zinc Plated Winged Screw 1/4″-20×1/2″ = $1.05
  • Zinc Wing Nuts 1/4″-20 (4pcs.) = $0.98
  • Self Adhesive Anti-Skid Pads 2″ 50mm (8pcs.) = $ 2.48
  • Spray Paint (black) = $0.97

Total = $21.20

Read More

Game, Set, and Match

Game, Set, and Match

The four Major tournaments in tennis are the most important tennis events of the year in terms of world ranking points, tradition, prize-money awarded, and public attention. A tennis player winning all four Majors in the same year, is said to have achieved the “Grand Slam”. I remember watching 17 years old Boris Becker winning his 1st men’s singles title at Wimbledon, which is one of those four paramount tournaments. In fact, I spent so much time watching Becker play that I managed to fail an important math exam. However, ever since Becker and later Andre Agassi retired from Tennis (Andre’s Retirement Speech), I totally lost interest and this weekend wasn’t for watching TV anyways.

The Code Camp community in Southern California organizes Code Camps, events for developers to come and learn from their peers. The first SoCal Code Camp took place at California State University Fullerton CSUF, in January 2006, followed by another one at University of California San Diego later that year. In October 2008, a 3rd annual event was added, taking place at the beautiful campus at the University of Southern California, one of the world’s leading private research universities, located in the heart of Los Angeles, and always drawing the largest audiences.

SoCal at USC, Audience - Android Talk

I spoke at the 1st SoCal Code Camp and at many other events that followed. This weekend, the caravan stopped at USC again and once again the turn out was incredible. Despite 8 parallel sessions, the introductory Android session had more than 90 pre-registered developers and my “Embellishing Android Applications” talk was packed as well. There were 66 pre-registered attendees but the actual audience seemed much bigger.

Honoring the great Boris Becker, who was able to win six-times a major tournament, speaking at all three Southern California Code Camp venues in the same year, is what I now call, a Grand Slam. By speaking on “Embellishing Android Applications” at USC this weekend, I just finished my 2nd Grand Slam.

Seeing the audience attentively listening, being engaged the whole time, and asking smart questions, all this makes the preparation and coding of quintessential demos well worth it. The Code Camps at the campus at the University of Southern California are always special. Game, Set, and Match …

Read More

Write once, run anywhere, Web vs. App – Same argument, different outcome?

Write once, run anywhere, Web vs. App – Same argument, different outcome?

Developing native applications for mobile devices is expensive, especially when considering that at least two (iPhone, Android) if not more (BlackBerry, Windows Phone 7, Palm WebOS, Nokia Maemo, Samsung Bada) versions have to be created. Sounds like a mobile Web Application, i.e. a Web site that is optimized for viewing on the iPhone, Android, etc., is an easy, inexpensive, and quick way to avoid costly mobile application development. Moreover, on the Desktop, the Rich-Client-Application versus Web-Application debate was decisively won long ago, by AJAX powered WebApps like gmail.com, mint.com, etc

It’s the Mobile User, stupid

What is it with these mobile phone users, why aren’t they getting the message that web-apps are cool and native-apps are a lame remembrance of the past?

The mobile experience is still hampered by an unreliable and often slow cell-network, which at times (inside Airplanes, geographic location / coverage map) may not be available at all. Even more importantly, size, performance, battery-life, and  data-input capabilities, significantly influence the usability of a mobile device. And much more than on the Desktop, Privacy, Data-transfer Costs, and Power-consumption are always on the mind of the mobile user.

What’s not good enough needs to be optimized; and only what’s already good enough can be disintegrated and modularized

Web applications have come a long way and (at least on fast Laptop and Desktop machines) Web browsers perform stunningly. Web applications have been disintegrated, following the principal of separation of concerns. I.e. the content it stored in HTML document, the presentation is defined in CSS cascading style sheets, and the interaction and validation behavior is defined in JavaScript files. All these kinds of documents are downloaded and interpreted by the Web browser at runtime. Additionally AJAX with the information being encoded in JSON or XML before transfer, allows the Web browser application to communicate with the Web server at will.

All this works beautifully on the Desktop, with a fast multi gigahertz processor and multi megabits per second constant Internet connection. However, mobile users prefer a different approach, one that is optimized instead of prematurely disintegrated.

A mobile application once installed is immediately available. Like the gmail application or the usatoday application for instance, it may have cached information from the last session i.e. it is useful even before connecting to the server. Since connectivity must still be considered unreliable and not constantly available, the mobile experience gains greatly from information caching. Providing a useful experience without requiring a constant connection to the server also address two other concerns: data-transfer cost and power-consumption.

User Interaction

The User Experience however has to be optimized above all other concerns. Given the still cumbersome data entry procedure (gestures, keyboard, virtual keypad, voice recognition), mobile users need to be empowered to get to their information destination with as little input / interaction as possible.

Content versus Service

When on a Desktop, users perceive the Web as source for content, when using a mobile phone, the Web becomes the source for services.

Only native mobile application have full access to the inherent features of the mobile device, features important enough that the user chose that particular device over any other. That alone however doesn’t explain why users, if given a choice, overwhelmingly prefer applications over web-apps

Moreover, recently some great solution for Web developers (like PhoneGap) became available, to Web-enable native device functionality with HTML, CSS and JavaScript,

Still, native application can address the mobile user’s concerns as well as the shortcoming of the mobile experience much better than mobile web applications. Native applications are (much) more expensive to build but you are giving your mobile users what you paid for.

Read More

Photo Printing on Android

Photo Printing on Android

FingerPaint w/ Print Menu

I always find it interesting to watch the 4x100m Sprint Relay at the Olympics and Track and Field Championships. It’s the fastest and most technically difficult of all the relays. Demonstrating true synergy, a well executed relay transports the baton around the track faster than the sum of the individual personal best 100m times.
Synergy is usually defined as the interaction or cooperation of two or more agents to produce a combined effect, greater than the sum of their separate effects. Aristotle of course was more concise; “The whole is more than the sum of its parts.”
When several applications work closely together, synergism can also be observed on Android. Android introduced the powerful yet simple concept of Intents, a facility to perform late runtime binding inside and even between applications.
Android applications expose their Activities and related Intents-Filters through the AndroidManifest.xml, and Activities implicitly or explicitly set to exportable can be used by other applications.
HP iPrintPhoto for instance invites other applications to use its PRINT Action, by declaring the following Activity in its AndroidManifest:
<activity android:name=".photo.PrintPhotoActivity" android:exported="true" android:enabled="true">
<intent-filter>
<action android:name="org.androidprinting.intent.action.PRINT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="image/*"/>
</intent-filter>
..
</activity>
Application that like to use the image printing feature provided by iPrint Photo, would create and new Intent and start the print Activity, like so:
Intent intent = new Intent("org.androidprinting.intent.action.PRINT")
.addCategory(Intent.CATEGORY_DEFAULT)
.setDataAndType(uri,"image/*");
startActivity( intent );
The example above assumed that an Uri to an image already existed. If that’s not the case, and for instance the content of a Canvas needed to be printed, then the Uri could easily be created on the fly:
Bitmap mBitmap = Bitmap.createBitmap(320, 480, Bitmap.Config.ARGB_8888);
Canvas mCanvas = new Canvas(mBitmap);
String filename = String.valueOf(System.currentTimeMillis());
ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.TITLE, filename);
values.put(MediaStore.Images.Media.DATE_ADDED, System.currentTimeMillis());
values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
Uri uri= getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,values);

OutputStream outStream = getContentResolver().openOutputStream(uri);
bmp.compress(Bitmap.CompressFormat.JPEG, 90, outStream);
outStream.flush();
outStream.close();

Intent intent = new Intent("org.androidprinting.intent.action.PRINT")
.addCategory(Intent.CATEGORY_DEFAULT)
.setDataAndType(uri,"image/*");
startActivity( intent );

HP iPrintPhoto Print Action

While all Android applications expose at least their launch Activity, some go a step further, and by marking Activities as exportable, allowing them to be called from other applications. HP iPrint Photo has gone the extra mile. Not only is its print Activity exported, but by explicitly choosing a vendor-neutral name for the Print Action “org.androidprinting.intent.action.PRINT”, the door is kept wide open for other printer vendors to join-in, using the same name to allow printing to their printers as well, which in turn would make printing applications vendor independent.
A good place to learn about available Activities and how to correctly create the Intents to start them, is the OpenIntents registry.
Besides enabling synergism on the application level, Android demonstrates mobility, skill, and more recently an almost explosive speed, which are the predominant requirements for a successful decathlete. The decathlon is another interesting highlight at Track and Field Championships, I love to watch. It’s a supreme test, whose champion may claim the title “world’s greatest athlete.”

Read More

Droid vs Incredible vs Droid X

Droid vs Incredible vs Droid X

We are really lucky, to experience another technological revolution. After the Personal Computer and the Internet, the Smart-Phone as a front-end for Cloud-Computing seems to be the next radical alteration, once again saving the tech industry, not just in the Valley, but in every other related  tech center around the country.

It always needs at least two players to have a game and Android and the iPhone seem to be those players this time around. Even when considering Nokia’s, BlackBerry’s, and Windows Mobile combined huge install base, it still looks very much like “game over” for them. In a fast paced technology it’s all about momentum and growth-rate; market share is gained and lost during periods of transition and change.

Droid vs Incredible vs Droid X

I had three great Android Phones available, all running Android 2.1 Update-1, and all running on Verizon’s network, and thought it would be fun to run a couple casual benchmarks. So here we go, we took a closer look at the original Motorola Droid, the HTC Incredible, and Motorola’s Droid X.

I know, I know, this isn’t a fair fight, the Droid was last year’s coolest Android device launched in late Fall 2009, while the Incredible and the Droid X are brand new phones .. well, I guess this just proofs that the half-life of an Android Phone Generation is currently about 8 months.

Please, don’t take this comparison too seriously, it wasn’t performed scientifically, not even close. Generally @tompaulus and I ran the tests 3 to 5 times and picked the median. We took standard benchmark related applications from the Android Marketplace and made sure that the phones were not running too much other stuff in the background while performing our tests.

Meet the contestants:

1. MOTOROLA SHOLES – DROID

Firmware: 2.1-update1
Processor: ARMv7 Processor rev 3 (v7l)
System RAM: 225 MB

2. HTC INC – ADR6300

Firmware: 2.1-update1
Processor: ARMv7 Processor rev 2 (v7l)
System RAM: 404 MB

3. MOTOROLA SHADOW – DROID X

Firmware: 2.1-update1
Processor: ARMv7 Processor rev 2 (v7l)
System RAM: 476 MB

Droid X WIFI Download Speed

Internet Download Speed

Here we were looking at the Wifi upload and download speed, measured with the SpeedTest.Net application. However, we are just showing the download speed. Upload speed was capped by the ISP at about 1000 kbps, which all three devices were easily able to achieve.

WIFI Download Speed [kbps]

  1. Droid: 5,707
  2. Incredible: 13,019
  3. Droid X: 14,425

Quadrant Standard

Quadrant is a CPU, I/O and 3D graphics benchmark application, freely available in the Marketplace. It computes a single value over a large number of tests:

  1. Droid: 373
  2. Incredible: 569
  3. Droid X: 1281

3D Benchmark

An3DBench is a 3d benchmark based on the Android version of the jPCT 3d engine. It runs seven tests from fill rate to complex scenes.

Motorola Droid

  1. Fillrate: ST/MT: 8.13/7.61 MP/sec.
  2. High object count: 14.85 fps
  3. Multiple lights: 41.02 fps
  4. High polygon count: 15.72 fps
  5. Keyframe animation: 44.70 fps
  6. Game level: 27.15 fps
  7. Total Score: 3945

HTC Incredible

  1. Fillrate: ST/MT: 9.56/9.57 MP/sec.
  2. High object count: 15.23 fps
  3. Multiple lights: 44.60 fps
  4. High polygon count: 22.19 fps
  5. Keyframe animation: 57.95 fps
  6. Game level: 24.50 fps
  7. Total Score: 4512

Motorola Droid X

  1. Fillrate: ST/MT: 11.04/11.08 MP/sec.
  2. High object count: 27.62 fps
  3. Multiple lights: 60.59 fps
  4. High polygon count: 25.29 fps
  5. Keyframe animation: 60.67 fps
  6. Game level: 46.17 fps
  7. Total Score: 6045

The Camera

The original Droid features a 5 MP camera, while the two new models both come with 8 MP cameras built-in. Only the two Droids have dedicated hardware shutter buttons, which makes taking steady shots quite a bit easier. We took pictures at the best possible resolution and transferred them without editing.

We didn’t like the Droid’s camera too much when it came out and it seems that the Droid X’s camera has it’s issues as well. However, nothing that cannot be fixed with software (Hey Moto, are you listening?) Here are the blown-up samples :

Motorola Droid


HTC Incredible


Motorola Droid X


The incredible Droid X

While the HTC Incredible is heavily branded with the HTC Sense UI, the original Droid came as a Google Experience phone, meaning Motorola didn’t put the MotoBlur overlay on. The Droid X is highly customizable, i.e. you can get as much or as little of MotoBlur as you like. Some of the Widgets look and also work very nicely and even MotoBlur haters may (only very secretly of course) use a little blur if nobody looks.

The Incredible’s screen seems to be a bit glossier and also a bit sharper, which is not really a big surprise since the Incredible and the Droid X both have about the same screen resolution but the Droid X has to spread the pixels over a larger area.

What remains to be said is that the Droid X really is incredible. I don’t like the row of  four hardware buttons too much and the phone might really be too big for some and certainly doesn’t look and feel as elegant, sophisticated as the HTC Incredible but it certainly is fast and at the same time very light, .. dashing.

Read More
content top