Michael Yuan

“Science is a wonderful thing if one does not have to earn one’s living at it” — Albert Einstein

November 30th, 2007

The GPS-less location accuracy in the new Google Mobile Maps

I just upgraded Google Mobile Maps application on my Nokia N80 to the latest v2.0. The biggest feature in v2.0 is that it can now automatically locate yourself on the map. If the phone has GPS (integrated or bluetooth-based), it will obviously use the GPS location data. But if the phone does not have GPS, or if the GPS signal is not available (e.g., inside a building), it can figure out your appropriate location via the ID of the cell tower nearby. I tried out the GPS-less location from my house and my office:

The the green arrow is my house and the blue dot is the location Google gave when I am in the house. The blue circle is the estimated location uncertainty provided by Google. The radius of the circle is around one mile. As you can see the actual location is well within the uncertainty.

Screenshot0084.jpg

Here is a closeup.

Screenshot0085.jpg

This is the result from my office. The building in the middle of parking lot is my office where I ran the test.

Screenshot0083.jpg

The location is not super accurate, and it is certainly not goo enough for driving directions. But for everything else (e.g., search for businesses around you, quickly load maps around you etc), it is more than sufficient.

November 13th, 2007

Seam book examples updated to Seam 2.0.0.GA

As a service to my readers, I have updated all examples in my JBoss Seam book to Seam 2.0.0.GA.

Go download the zip file here

The example applications are fully tested against JBoss AS 4.2.0 GA.

NOTE: To build the examples, you now need to download and unzip Seam 2.0.0.GA first, and then set the build.properties file to point to the Seam installation directory.

November 7th, 2007

Running Seam on non-JBoss Application Servers

UPDATE: Several people commented that Seam works just fine with the TopLink JPA provider. I stand corrected. Thanks guys.

Here is what I posted to TSS today …

First, we try very hard to make Seam as generic as possible — so it would not require JBoss AS to run. The proof of this effort is that Seam runs on plain Tomcat (using RESOURCE_LOCAL transactions). So, in theory, it should run on all application servers out there. However, since all Seam developers use JBoss AS on a daily basis (we happen to believe that JBoss AS is the best AS out there :) ), it is natural that Seam is tested most extensively on JBoss AS. Also, as an open source project, we do not have access to commercial WLS, WAS, ORA licenses, and do not have access to their support. So, our testing on those servers is not very comprehensive. I have personally installed the trial versions of those servers multiple times since they expire all the time. It is extremely time consuming …

So, the testing on commercial app servers is not very good at this moment. If you encounter issues with non-JBoss servers, raising them on the Seam forum is your best bet. Now here is a breakdown of what works and what not (to the best of my knowledge).

* Tomcat 5.5 and 6: Seam applications work out of the box on those servers if you use the RESOURCE_LOCAL transaction (see examples/jpa). You can use EJB3 features if you install JBoss Embeddable on top of Tomcat.

* Glassfish: Glassfish v2 is known to work with Seam (see examples/jee5 for an example). But we strongly recommend you use Hibernate as the JPA provider — not the default TopLink.

* Oracle: Oracle 10 is known to work with Seam (see examples/jee5 and examples/jpa). Again, choose Hibernate as the JPA provider.

* WebLogic: WebLogic 9.2 and 10 can be made to work with JPA + JTA transaction (see examples/jpa). However, EJB3 on WLS 10 does not yet work. There is a reflection error from the EJB proxy the last time I checked.

* WebSphere: I think the examples/jpa can work against WAS 6.1.0.9. You do need to tweak stuff a lot to make JSF 1.2 and Facelets work on that server. We have not tried WebSphere EJB3. However, anything beyond a simple CRUD app might have problems on WAS. One of the reasons is that the IBM JVM5 has a bug that complains about unknown annotations (the correct way is to ignore unknown annotations as the Sun JVM does). Unless IBM fixes this, you will have problems running Seam on WAS.

So, that’s it. If any of you can help us testing this stuff, please let us know! :)

November 6th, 2007

A rare sight: Comet Holmes

It is not an everyday event that an object in our cosmic neighborhood suddenly brightens by 1 million times and bloat itself up to 100 times the size of earth. Well, that is exactly what happened to Comet Holmes in the past week. It is an one of those rare opportunities for see a very bright comet with naked eyes!

The best way to view Comet Holmes is through a binocular. The small one you use for sports events and opera should be enough. The comet looks like a yellow-ish star from naked eyes, but when viewed through a binocular, it is a fuzzy yellow ball in stark contrast to the “real” stars close by. I personally use a 7×50 field binocular and it gave a fantastic view of the comet.

The easiest way to find the comet is as follows:

* Stand face North at night (2-3 hours after sunset) in a clear field, and look at the sky to the north east direction.

* Locate the constellation Cassiopeia — it is a group of stars forming a W shape. It is really easy to spot. The size of the W is about the size of your fist extended at arm’s length. Notice that the W is probably rotated.

* From the W looking East (if you can see the milky way, just follow the milky way east), you will see a very bright yellow star. The yellow star is called Capella and it is one of the most bright stars in the entire sky. The distance between the W and Capella is about 3 fists at full extend of the arm.

* Now, half way between the W and Capella is the constellation Perseus. It is also in the milky way. The brightest star of Perseus is called Mirfak. Mirfak forms a small triangle with two other stars. The yellow star in that triangle is Comet Holmes. To confirm, point your binocular to the triangle, you should see that Mirfak is a point-like star, while the comet is a yellow-ish fuzzy ball of light.

Sky and Telescope magazine has a real nice figure showing the relative positions of things (go to the article to see a larger version of the image).

HolmesFindr.jpg

Have fun star gazing!