Tuesday, December 23, 2008

台灣,中國省?

ISO國際組織幾年前悄悄的把台灣的名字定為『台灣,中國省』。(Taiwan, Province of China)
全球華人聽到這個名字大概都會忍不住噴飯,因為這個稱呼實在吃豆腐到了極點。

雖說台灣已經習慣被中國亂叫 已經沒感覺了 但是要注意的是 這個名字會被全世界各地的資訊系統拿來參考
到時候眾口鑠金 解釋都沒用。
前政府不是整天喊正名嗎 怎麼會讓這個名字傳出去?
現任政府在哪裡?
其實加不加入聯合國是其次 ISO名稱錯亂所造成的影響才是全面的
到時所有的資訊系統都用錯的名字就麻煩了

有沒有朋友在ISO工作的 可不可以反應一下
The country name is: Taiwan
or
Taiwan, Republic of China

還有 給中國的朋友們一些背景
在台灣 人民有不同意見
稱呼國名為中華民國的民眾 通常是認同華人文化的

Sunday, December 21, 2008

山寨富翁/貧民窟的百萬富翁 Slumdog Millionaire

猜火車的導演拍了一部以印度為背景的電影 小說改編
傳統由印度導演拍出來的印度電影,通常會把印度拍得風光明媚鳥語花香。然而這是英國導演拍的。電影的節奏明快,而且因為是外籍導演,沒有傳統的包袱,整部電影呈現了驚人的能量。

Friday, December 19, 2008

漢堡初體驗

漢堡王跑去世界各地找沒吃過漢堡的人拍攝漢堡初體驗
感覺蠻有創意的 難得漢堡王有些新點子

Thursday, December 18, 2008

快!我的親戚上YouTube了!

有YouTube真方便
一家人立刻就成為網路明星了呢
這位小朋友真是認真又可愛



http://www.youtube.com/watch?v=l5J5PwRV4Vo

Thursday, December 11, 2008

JavaFX with Your Dad's Java (a.k.a. Swing)

JavaFX deliberately left out a lot of Swing components because they think it is targeted for RIA and mobile platform.  I am not sure if that logic make sense.  Anyway, here is a minimum example of how to reuse existing Swing component in JavaFX.  In the example below I use a JEditorPane as a JavaFX component.

SimpleSwingEditor.fx

package com.aspectsolution.javafx.example;

import javafx.ext.swing.SwingComponent;
import javax.swing.JEditorPane;
import java.awt.Dimension;

public class SimpleSwingEditor extends SwingComponent {

public override function createJComponent() {
var wrappedEditor: JEditorPane;
wrappedEditor = new JEditorPane();
wrappedEditor.setPreferredSize(new Dimension(width, height));
return new JEditorPane();
}
}


Main.fx

/*
* Main.fx
*
* Created on Dec 10, 2008, 11:23:38 PM
*/

package com.aspectsolution.javafx.example;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Circle;
import javafx.scene.paint.Color;

Stage {
title: "Simple Swing in FX"
width: 400
height: 300
scene: Scene {
content:
Group {
content: [
Rectangle {
width: 400
height: 300
fill: Color.BEIGE
},
Circle {
centerX:200
centerY:130
radius: 120
fill: Color.LIGHTBLUE
},
Text {
font: Font {
size: 24
}
x: 10, y: 30
content: "A Simple Editor"
},
SimpleSwingEditor {
width: 400, height: 270
translateY: 60
opacity: 0.8
}
]
}

}
}



Wednesday, December 10, 2008

Java平台在2009年自行毀滅的最新發展 不毀了?

之前曾經提到關於Java平台在2009年要自行毀滅的問題,最近出現了轉機。
據說Sun公司暫時終止了Java Module System (JSR 277)的開發,而該計畫的領導人也離開了該公司。所以目前看來之前顧慮到自行毀滅的問題暫時是不會發生了。
高興的不只是我們這些局外人,連該公司內部的高階主管也支持
很高興Sun終於有一次不再堅持一定要用自己家裡開發的技術。既然連平台本身都是開放原始碼了 何苦硬要什麼東西都自己來。可能是因為早些年在.com的年代太風光,Sun常常跟別的公司大小眼。講到這個我又忍不住要拿NetBeans來當例子。唉。說了Sun也是不會聽。不要再假裝NetBeans『真的很好用』了..明明就到現在還是有編譯結果跟程式編輯器不同步的問題,明明程式都對了還給我畫紅線在底下,而且拼命要推銷給大家說有多棒。

Thursday, October 23, 2008

第一次去歐洲


第一次去歐洲,但是沒有機會去路上玩。大部分的時間都在船上過的。

Tuesday, September 23, 2008

Another phone

Another company announced their "phone software".  That company only take care of software, so they are not responsible to the hardware.  The hardware design company was very famous and success on Windows Mobile platform, but compare to their amazing Windows Mobile models, this new phone apparently is not the best design.

Sorry the 'another phone software' company. You are not there yet.

Saturday, September 06, 2008

WebKit gains more ground

Last November I wrote The Browser War 3.0 saying that WebKit will be the way of the embedded web in the mobile devices. Looks like this year WebKit gains more popularity. Not only Google Chrome use WebKit as the rendering engine, but also the new JavaFX JWebPane. Finally there is an official way to display the "street HTML" inside Swing components. Before JavaFX JWebPane, Swing has some minimum support of HTML for styled text, but they are not strong enough to be a web browser.  Eclipse RCP did a pretty good job to integrate native browser (such as IE) into SWT component.  I really look forward to see the JavaFX WebKit integration. With this component, the technical boundary of Rich Internet Application will be redefined.  It sounds possible to me to write a JavaFX RIA contains a JavaScript RIA inside.

Thursday, August 07, 2008

X檔案: 我不要相信!

前幾天聽說X檔案竟然在十年後又有續集了! 興沖沖的跑去電影院看,一開始Mulder把自己關在房間裡研究飛碟‚Scully好像跟他不是很熟。忽然沒幾分鐘兩個人又睡在一張床上,因為Scully說她害怕睡不著。整片就看兩個人跑過來跑過去。我還沒有弄清楚在演什麼, 忽然螢幕下方捲出演員名單的字幕, 然後我看到鄰座觀眾拿著爆米花離場。啊!原來已經演完了! 錯愕的我呆坐在電影院的椅子上,腦筋一片空白, 真的不知道整片在演什麼, 真是不可思議啊。

Friday, August 01, 2008

It's (almost) official: JavaFX Preview SDK

Sun promised to release JavaFX Preview on July 2008. Yesterday is the last day of July, and they really released it as they promised! Compare to the JavaOne 2008 preview, this release is very impressive. The SDK is bundled with NetBeans 6.1. If you have previous version of JavaFX installed in your NetBeans, you need to remove them first.  I find it easier just to uninstall the NetBeans and let the bundle reinstall from the scratch. On Mac OS X, I simply drag my NetBeans.app into the trash, open Console and rm -r .netbeans* in my home directory.  The installation is simple, and there is no need for other configurations.

The new JavaFX SDK in NetBeans has a lot of enhancement. For people not familiar with the language (that includes almost everyone), the JavaFX Palette provides a quick way to drag-and-drop code snippet into the editor. With the help of the Palette and some online tutorial, I managed to get my first JavaFX test in 20 minutes.




/*
* Main.fx
*
* Created on Aug 1, 2008, 5:19:32 AM
*/

package javafxapplication1;

import javafx.application.Application;
import javafx.application.Stage;
import javafx.application.Frame;
import javafx.ext.swing.ComponentView;
import javafx.ext.swing.Label;
import javafx.scene.geometry.Circle;
import javafx.scene.paint.Color;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Translate;
import javafx.scene.text.Text;
import javafx.scene.Font;
import javafx.scene.FontStyle;
import javafx.ext.swing.Button;
import javafx.scene.geometry.Rectangle;
import javafx.scene.effect.*;
import javafx.scene.paint.*;



Frame {
title: "MyApplication"
width: 200
height: 200
closeAction: function() {
java.lang.System.exit( 0 );
}
visible: true

stage: Stage {
content: [
ComponentView {
transform: [
Rotate { x : 0.0, y : 10.0, angle: 0.0 },
Translate { x : 5.0, y : 5.0 }
]
component:
Button {
text: "Button"
action: function() {
}
}
},
Rectangle {
x: -40, y: 140
width: 300, height: 90
fill: Color.LIGHTGRAY
transform: [
Rotate { x : 0.0, y : 10.0, angle: -10.0 }
]
},
Circle {
centerX: 100, centerY: 70
radius: 40
fill:
LinearGradient { startX: 0 startY: 0 endX: 1 endY: 1
stops: [
Stop { offset:0 color: Color.web("#ffff00")},
Stop { offset:1 color: Color.web("#5f0101")}
]
}
},
Text {
font: Font {
size: 24
style: FontStyle.PLAIN
}
x: 30, y: 65
content: "Hello JavaFX"
transform: [
Translate { x : 0.0, y : 100.0 }
]
effect: DropShadow {
offsetX: 2 offsetY: 2 radius: 6
color: Color.BLACK
}
}
]

}
}

Friday, July 18, 2008

Google Guice - 谷歌的果汁

Guice (pronouced 'juice') is a new dependency injection framework from Google. The biggest difference between Guice and other DI framework is the annotation. Guice does not use xml configuration. Instead, you mark your 'injectee' with the @Inject annotation. This annotation tell Guice: "Hello injector, I need your help. Try to find the dependencies for me".  The concept is very simple, and it really takes only 10 minutes to get started.  Of course, this assumes you already know what DI is, which might take a while to put it into practice.

The class dependency is organized in a Module. In the module, you bind an interface to a concrete implementation.  Just like all DI framwork, the purpose is to avoid using the new operation.  When you say Animal a = new Dog(); you hardcoded the Dog type in the source code.  If you run it the Guice way, you will create a AnimalModule,  and bind the Dog object within the AnimalModule. Next time when you want to switch the implementation, simply change the Module, not your code.

 public class AnimalModule implements Module {

public void configure(Binder binder) {

binder.bind(Animal.class).to(Dog.class);

}

}


Guice also provide support of field injection. You can initialize field values in a module, even for private fields.  Unlike Spring, which want to be a replacement of everything, Guice limit itself to be a simple layer focus on dependency injection.

If you really want to know the disadvantage of Guice compare to other pre Java 5 DI frameworks, the only thing I can think of is the jar dependency.  Once you decide to use Guice annotation, you must include guice jar file in your classpath.  Some other DI framework like Spring or Pico can retrofit into old classes without touching the code.  This is not the case for Guice.

If you want to start a new project and want to have a light DI layer quickly, Guice is really worth trying.




Thursday, July 17, 2008

The evil File/Save

Recently I discussed with my friend about desktop application design. In my opinion, most of the File/Save are bad design for a GUI-based system.

1. A good application should try to hide the technical detail such as the file system in the operating system. File concept should be avoided whenever possible. The famous example is the Quicken financial software. When you open Quicken, you see your balance book. There is no need to open Quicken, and then open again for a file. 

2. If the application designer intends to use the File Folder metaphor in real life, he should avoid  File/Save because there is no such metaphor in real life as Save a file. When you file something, it is there. 

3. A document-based design should treat document as a physical document: They exists and persists as soon as they are created.  A user should not lost the whole document because he forgot to save it.  Someone may argue that a user might regret his changes and want to revert back to original file. There are plenty of technique to overcome this issue: Use of command pattern, journaling, or simply store multiple copies. They are all better than save-it-or-lose-it solution.

4. User does not care if something is in the memory or in the storage. Developers does. To explain File/Save activity often involved in explanation of memory and storage, RAM and HDD.  These is too much information for the users.

As a matter of fact, even for developer tools, there is rarely need for File/Save. Eclipse IDE (or Visual Age) is a good example.  In object-oriented language, you always work with class, not files. When coding is done, you compile it into class, not just save it. 

So next time when we design an application menu, think first if we really need that File/Save menu. Will that cause user to lose their work? Will we involved in the embarrassing moment to explain what is RAM and what is HDD to the user?

Monday, July 14, 2008

Stress testing gone wild

Last Friday iPhone launch event became iPocalypse - phone activation server was under heavy load, so heavy it becomes denial-of-service attack.

I am very sure Apple did the full scale stress testing before the launch. However, I think this iPocalypse is more a project planning mistake than the technology issue. Why does Apple decide to launch the firmware 2.0 update on the exact same day of selling iPhone 3G?  I really appreciate Apple's intention of taking care of existing customers like me.  I feel loved. But to be honest, we already paid one year ago and enjoyed the iPhone for a year.  If we are not in the 3G line, that means we don't have to upgrade to 3G.  Why not just let the old customer wait for one or two days? 

In reality, a stress-tested system gone wild when one of the execution path holding the resource.  When this happens, rebooting server will only solve the problem for a few seconds.  When users see "retry later" message, they will hit retry button more, not less. The longer user waits, the faster they hit the retry button.  This is human nature of dealing with frustration. Apparently you can change the error message to "Do not retry. It's not gonna work", but a more practical solution is to sit with your network admin or static web server admin to figure out a strategy to regulate the traffic.  If you have a controlled user (such as the iPhone case), it would be even better to organize the users.  

Anyway, I picked the right time to active my iPhone (early morning Sunday Eastern time) and I live happily with my iPhone ever after.


Saturday, July 12, 2008

iPhone OS 2.0 - Apple Remote


iPhone 2.0 update is released.  My first download application from App Store is the Apple Remote. It is an amazing replacement of my tiny white 3-button remote that come with the Mac, and this remote has even less buttons: zero! Your iPhone becomes the ultimate remote control for your iTunes.  It also supports Apple TV. Now I am tempted to by an Apple TV.

There is also one handy trick from iPhone Atlas for taking screenshot in this version.  Press both home button and sleep/wake button simultaneously, you will see a blink on the screen, and then you will see a screenshot in the Photos. 

The new iPhone 2.0 update also allow you to write Chinese characters using finger. In general it is a very impressive update. I feel like having a new phone again.


Saturday, July 05, 2008

『長』不忍睹的金曲獎

十九屆金曲獎巨星雲集,但是還是太慢了。舞台上的幾個Golden Melody Award大字醜到不行。林宥嘉因為聽不到耳機裡的監聽聲音唱天天想你走音,不知道為什麼安排家家唱 I will always love you,是要紀念惠妮休斯頓嗎? 喜劇的天王高凌風跟康康在回音監聽不良的舞台顯得冷場,來賓頒獎人的致詞長又沒有人制止。 最大的得獎人在溫州開演唱會。不過後半段開始變快。張惠妹依然精彩,羅大佑李宗盛也是很有看頭,但是羅大佑鋼琴的音量竟然沒有開。這是哪一家舞台工程公司做的啊,怎麼會狀況這麼多?林宥嘉康康高凌風羅大佑這些表演者都是身經百戰的專業人員,卻被一個不紮實的舞台工程給打敗了。

得獎人立刻表演是蠻好的傳統。評審也很有眼光,選了一些我聽得懂的得獎人,不像以前總有幾個獎明顯是配合政府愛台灣。

聽說東風作這個典禮是賠本的。辛苦了。若不是有這幾位天王天后撐著,只一場只能算是同樂會或是廟會吧。新聞局是不是可以增加一點預算呢? 流行音樂是台灣文化最後一個強項,不要這樣省吧。

Wednesday, June 25, 2008

Could you clean up your JavaFX tutorial on the web? :-)

JavaFX Script is not a matured language yet. If you look at the early tutorials, those code will not work in the latest development tools (OpenJFX on NetBeans). After a little research on the web, I learned that Sun doesn't seem want to maintain two different flavors of the same language. They will retire the interpreted version of JavaFX. If you are like me, who want to learn JavaFX from the web, you might want to print out a copy of this link by your side. This document lets you easily see the difference between old JavaFX and the new JavaFX.
In case you are still not sure if your example is interpreted or compiled, the JavaFX Complier gives annoyingly polite messages for old interpreted syntax:

Sorry, I was trying to understand a type specification but I got confused when I saw '*' which is an operator.

If you are a tutorial author of the interpreted JavaFX, please help the community by updating it to the compiled version, or simply said "interpreted JavaFX" in the title, so people who learns them will understand the difference. For a few days I was wondering if my OpenJFX NetBeans plug-in was bad, then I learned I was using old syntax.

Here are a collection of interpreted JavaFX web sites. Those example will not work in NetBeans 6.1 OpenJFX.

Sunday, June 22, 2008

JavaFX on Mac OS X with NetBeans 6.1

NOTE: This document is outdated. The new JavaFX Public Preview SDK don't need any of the following steps.

Read through this only if you are still using the JavaOne 2008 preview version of JavaFX SDK.

If you want to run JavaFX on Mac OS X using Netbeans 6.1 as the development tool, here are some tips to make it work.

If you just follow the installation guide on OpenJFX site, and generate your first sample project, you will get an error similar to this when you try to build and run the project:

Exception in thread "main" java.lang.NoSuchMethodError: com.sun.tools.javac.main.RecognizedOptions.getJavacFileManagerOptions(Lcom/sun/tools/javac/main/RecognizedOptions$OptionHelper;)[Lcom/sun/tools/javac/main/JavacOption$Option;

It is very easy to resolve this issue. Simply follow the steps posted in java.net Forums.

1. Go to your home directory, cd .netbeans/6.1
2. Edit the build.properties file, find a line says platforms.default_fx_platform.bootclasspath
3. Add the JavaFX jar file in the beginning so it look like
platforms.default_fx_platform.bootclasspath=/Users/(your_user_name_here)/.netbeans/6.1/modules/ext/compiler/lib/javafxc.jar: ...
4. Add import javafx.ui.* in the beginning of your generated JavaFX source code.
5. Restart Netbeans.

Saturday, June 21, 2008

My favorite Michael Jackson MV (was never on TV)

This song was part of the History album. The clean version of music video shown on the TV at that time was ok, but not as intensive comparing to other Michael Jackson's work.  Today I realize there is actually another version that was never shown. The prison version fits the song perfectly, and it become one of my favorite MV now.

Thursday, June 19, 2008

范曉萱的接班人

林宥嘉終於推出專輯了。終究他沒有讓人失望 。
不知為什麼我想到當年如日中天的小魔女范曉萱,忽然在左三圈右三圈愛洗澡最轟動的時候把頭髮剪掉開始唱自己的歌。雖然從此之後就開始與生活掙扎,但十年後回頭看,所有歌唱比賽都在挑戰她當時堅持的那些所謂不好賣的歌曲。
 
很高興林宥嘉的專輯跟別人聽起來不一樣。

Wednesday, June 18, 2008

Firefox 3 on Mac OS X


Today is the Firefox download day. The new version has a new interface design and it matches the native OS look-and-feel. Here is a side-by-side comparison of Safari 3 (top) and Firefox 3. It does not use the control from the operating system, but it feels quite close to the Mac OS X. The new address bar has lots of functionality, but also it looks more complicated.

Monday, June 16, 2008

Firefox 3: Download today!


Today (June 17 10:00am PDT, or 1pm Eastern time) is the Firefox 3 Download Day. Get Firefox from their download day web site. 

Wednesday, June 11, 2008

Dow Jones doesn't get it on the new iPhone


Dow Jones released a comment on the new iPhone yesterday, stating that iPhone must avoid the "Razr Trap". In the article, it says that the Razr was created as a high-end product. After the price reduction, Razr lost its attraction and Motorola don't make money anymore.

In my opinion, comparing iPhone price cut with Razr is completely irrelevant. The stories are different in the following ways:

1. Razr's success is purely on its amazing form factor and a matching name. Nothing more. iPhone has a good form factor too, but that is the last reason of being a success.
2. The innovation of Apple's product is not immediately visible sometime. Simple because 3G iPhone looks like first gen iPhone doesn't mean it is lack of innovation.  
3. Like the game console industry, Apple bet on the income of the the software. The software is not limited to the things in the App Store, but also including the business solution possibilities.
4. Windows Mobile is an operating system. Google Android is an operating system.  iPhone is a full package of hardware and its optimized software. It is the last mile of the whole information roadmap of Apple. Comparing iPhone with Windows Mobile or Android is not quite correct.  Comparing iPhone with WM6 based HTC-Touch, maybe.
5. How many feature did you use inside your Razr phone? Most people just use those feature at most once (test one two three, ok its working, now what). iPhone user use more than 80% of its feature constantly. Other phone assume you aren't gonna use those feature anyway, so they provide minimum version of application and hope you can pay for more. iPhone comes with software that you can really use. Just try Razr's calculator and you'll know what I am saying.

Good job Apple.

Picture taken from Telegraph UK

Monday, June 09, 2008

這叫別的電話怎麼混啊

蘋果今天宣佈了新的3G iPhone. 內建衛星導航 價錢只要一半 ($199) 合台幣六千出頭而已
這叫別的電話怎麼混啊 :~

Saturday, June 07, 2008

JavaFX: Will it survive?

Last summer, Sun announced the JavaFX project. JavaFX is a new platform with a new scripting-like language generally considered as a competition of Rich Internet Application (RIA) frameworks, such as Microsoft Silverlight, Adobe Flash/AIR, and all AJAX technologies. These technology delivers client-side programs through the browser, thus offload the server from laying out the screen, and enhance the user interactivity.

The concept is nothing new, especially for Java platform. In 1995, Java applet was the world's first RIA framework. It was widely supported in both Netscape and Internet Explorer browser. Lots of business application rewrites into Java applet during the dot com age, and eventually all kinds of problem occurred. Ten years past, most of the rich internet experiences are now delivered by Adobe Flash or AJAX. Java applet is no longer the favorite choice for rich applications. In my understanding, there are several reasons that cause the Java applet market share decline:
  1. Java Runtime Environment (JRE) installation size. The first generation browsers came with the Java Runtime. Even if they don't, the first generation of JRE is only around 2.4MB. Java 2 doubled the installation footprint, which is considered huge in that time. Java 1.4 doubled the Java 2 installation size, which is again considered huge even now.
  2. Long startup time. This is probably one of the most complain about applet: Slow graphic user-interface (GUI) startup time. Most of the time we see a gray box in the middle of the browser and the hard drive starts churning. Finally JRE is started, and then we see another delay for applet loading.
  3. Painful GUI design. Java is a general purpose language. Using Java for GUI layout is really tedious. Early version of JRE also suffer on lightweight component slowness. Lightweight component allows Java to draw its own buttons, labels and other GUIs instead of using the native peers. Lightweight component itself is not a bad thing, but the first few generations of lightweight component don't use native code for acceleration. You can literally see the components being drawn to screen one by one in the early Java 2 releases.
  4. Bad client app design because Java has too many features. Lot of client-server application was directly ported into Java applet and eventually failed during dot com age. Rich user experience means smooth interface response. Business logic need to be carefully designed to avoid code bloat on client side.
  5. Lack of rich media support. It is require lots of effort to integrate media into applet with third party tools. The standard way of media playing (JMF) has very limited support. 
JavaFX together with Java 6 update 10 is Sun's answer to these issues. If you need to write an RIA in Java, JavaFX with Java 6 update 10 might be the best solution. Base on what I read, here is how Java come back to RIA:
  • Java 6 u10 initial runtime download size is similar to the early Java 1.1
  • Faster cold start time
  • Faster lightweight GUI
  • JavaFX scripting language is more friendly to GUI layout and tool support
  • Rich media support
I don't know if JavaFX will become a popular RIA platform, but I am sure for my next Java GUI project, I will not directly code into Swing anymore. Using a different language gives developer a chance to think what should be in the GUI layer and what should be designed elsewhere. This should promote some good thinking for application design. I am sure JavaFX will survive, but I am still not sure if it will success.
 

Friday, May 30, 2008

Sharon Stone apologizes

After Dior dropper her ads in China, Sharon Stone finally realize what went wrong. She issued a statement to apologize to Chinese people.  

Tuesday, May 27, 2008

Sharon Stone owes human race an apology

 
Stone was in the Cannes Film Festival. During a quick interview with the media, she claims the earth quake in China is "Very interesting", "I'm not happy about the way that Chinese are treating the Tibetan.", "How should we deal with Olympics", and finally "Is that karma?"
Sharon Stone was one of the most honorable Hollywood star, but I am very disappointed about what she said this time.  Sharon Stone, was that what you were thinking when you saw 60,000 died?  What would you think if people say certain incurable disease is a karma?
As a Taiwanese, we always have issues with China. However, at this time, all we care is that the human race are suffering.  It is not a time for boundary and political views.  It is time for humanity.

Monday, May 26, 2008

JavaOne 2008 紀念品



今年參加了JavaOne 2008。我從十年前就想去JavaOne,終於今年我們的好公司同意讓我去。老闆真是英明。當然我就像是觀光客一樣亂買了一些紀念品,包括Java磁鐵,Java原子筆,Java手電筒,Java茶杯,Java USB Hub,以及Java夾克,Java Polo衫等等亂七八糟的東西,還有附帶的Java背包,Java圓領衫等等,簡直可以說土到不行。但管他的,難得有機會來一次當然要採購一下。



講一些比較有營養的。今年的焦點展覽裝置有兩個。一個是Sentilla PERK (Pervasitve Computing Kit),另一個是Livescribe Pulse。



Sentilla PERK是一個Java ME CLDC 1.1的裝置,小小一個大概跟鳳梨酥差不多大,不是手機,沒有喇叭,但是有無線通訊的功能,還有溫度與三軸加速感應器(就是像Wii或iPhone那種,搖一搖就有反應)。整個開發套件包括兩個感應器小電腦,一個USB Gateway,一個USB韌體燒錄器,還有一套軟體開發工具(Eclipse平台)。Sentilla在JavaOne會場各角落都佈署了感應器,藉由二氧化碳濃度與溫度推測每場演講人的人氣指數。



Livescribe Pulse是一支有攝影機的筆,當這支筆寫在印有小點點的紙上,攝影機會紀錄座標,因此所有在紙上寫的都可以傳輸到電腦裡索引,同時可以同步錄音。因此事後只要點一下當時的筆跡,就可以聽到當時的內容。



Livescribe Pulse其實已經不是新技術了。早在七八年前就知道專利擁有人在尋找買主,好幾家公司都投入生產,包括知名的羅技 但是都沒有做起來。這一次會成功嗎? 我雖然稍有保留,但認為值得期待。原因是生產公司選擇了開放的平台,讓程式開發者參與,因此買這支筆的人可以期待擴充新的功能,或許這樣可以讓買家有比較多的興趣。



圖片上從左上角逆時鐘(往下轉右再往上)各項目介紹如下:
Sun出版商的書摘(蠻好的 看完我就去訂書了)
Effective Java第二版新書(作者現場舉辦簽書會 我當然也跑去簽了)

JavaOne省紙筆記本(真的很省紙 從來沒有人給那麼小本的 我記滿到最後一頁)
JavaCard 3.0讀卡機
研討會識別證(JavaCard 2.0) 剩下的酒票(每天早午各用一張飯票 最後一晚可用兩張酒票 飯超難吃)
研討會行程表與會場地圖
舊金山市Muni七日地鐵巴士票
Java環保原子筆
Eclipse Equinox紀念衫(很難拿 要跑去八個攤位蓋章才能領一件)
JAVA+YOU主題紀念衫(每人一件)
Java Polo衫(大號太大)
Java夾克(很實用 因為我衣服沒帶夠 舊金山又冷風又大)
Pulse筆記本
Livescribe Pulse智慧筆
JavaOne光碟DVD (NetBeans 6.1, GlassFish, etc)
AMD與Conversal等展示光碟
Sentilla Perk感應無線小電腦
甲骨文水壺
JavaOne紀念背包

Monday, May 19, 2008

NetBeans 6.1: First Impression


I got a copy of NetBeans 6.1 from JavaOne.  

About 6 years ago, when I downloaded JDK 1.3, Sun told me there is a free IDE bundled with it. Sure, why not, I thought.  I choose to download the bundled JDK1.3.1 + NetBeans pack.  That became my second-worst Java download experience in my whole life. (The worst experience is the Project Looking Glass bundled with JDK 6, which I uninstalled in a just a few minutes after download.)  I don't know how to describe the NetBeans 3 experience.  At that time I've been using UltraEdit for quite a while.  There is nothing I can't do with UltraEdit plus a command line compare to NetBeans 3, plus the sluggish "lightweight" Swing implementation on JDK 1.3.1. The whole experience is really a bad one, and I wondering why Sun kept saying this is the best IDE ever.  I mean, have they ever use the Visual Studio before?  I almost swear I will never use NetBeans again in my entire career, unless my job force me to use it.

In the mean time IBM open-sourced the groundbreaking Eclipse IDE inspired by their VisualAge product line.  It is a smart mix of native and Java layer; It has the native user response and experiences, while still have the simplicity and extensibility of Java. In my opinion at that time, Eclipse technologies are at least five years ahead of NetBeans.  Those advances are not just about some conceptual differences, but all the details too.  

Six years later, I finally decide to give NetBeans another chance. The reason is because I saw Tor Nobye's JavaOne demo with James Gosling and realize NetBeans has grown up now.  I happened to work on a Java Micro Edition project for my work recently, and NetBeans plus the Mobility pack seems like the perfect chance for my first impression on NetBeans 6.1.

The installation of NetBeans 6.1 is very simple.  It has a platform-specific installer for both Mac OS X and Windows (those are the only platforms I tried). The start up time is quite good, actually it takes about the same time as Eclipse on my machine. The user interface is pretty neat, way much better than the nightmare version 3. 

The Mobility pack contains the famous Visual Mobile Designer. This is one of the best screen flow design tool for Java ME.  It works around the tricky round-trip code generation issue by putting the generated code in a read-only region, so new code will not mess up the generated code.  You still have the freedom to write code outside the generated region.

One click on the Run button, the compiled code is deployed to the emulator, and the emulator is launched. Unit testing on NetBeans is as simple as using Eclipse or Microsoft tools.  The jar and jad files are generated under the dist directory automatically after project is built.  Simply upload those files to a web site, and your MIDP application is ready for deployment. The Mobility pack has a manifest tool to assist you to select the JSR and MIDP/CLDC profile requirement, and the packaging are very easy to use.

My goal is to build a web URL monitoring panel. The tool sends concurrent http requests to the web site I want to monitor, and display the response on the phone. This is a very simple application. I had it done in two days using the brand new tool. However, the development is not totally painless.  I found that NetBeans provided a Swing-like mobile TableItem which supports the backing TableModel.  I was very excited about this and decided to use it on my first project using Mobility pack.  When I update the model and fire an update event, the screen does not refresh on the standard Mobility pack emulator.  I need to navigate around to see the refreshed screen. I tried the same thing on Sony Ericsson's development tool, which is a modified Sun's WTK 2.5, and that emulator works fine.  I see my screen refreshed after table model change and fire the event. Since the manufacture's emulator works for me, I moved the finished project into the device.  Guess what? TableItem is not working in the real device!  It partially works in Mobility emulator, works in the manufacture's emulator, but does not work in the real device. I end up rewrite all my TableItem code into StringItem. Of course, the Z310 phone supports StringItem just like all Java phone, and no need to fire any events to make it refresh.  At this time, I will stay away from NetBeans implementation of mobile TableItem. It is definitely not reach production quality for sure.

It is nice to know that NetBeans is now really a usable tool. I managed to finish a project completely in NetBeans without switching back to other IDE.  Six years of hard working, now NetBeans is getting much closer to it's competitors. Other than bit by TableItem, the first impression on NetBeans 6.1 is quite good.  It will be my Java Mobile IDE from now on.


Saturday, May 10, 2008

JavaOne 2008 Conference (3) - Consumer Java

Java has been there for more than a decade. The JavaOne 2008 conference shows that the technology is maturing, new ideas keep coming, and lots of future opportunities are still finding their ways. Here are some of my notes on JavaOne 2008 for Consumer and Desktop Java.

Blu-ray is the new standard
The war is over. Blu-ray is the high-definition storage media standard. This means every single player from now on will have a Java VM in it. On the opening day, rock star Neil Young releases his music collection on Blu-ray. Usually people buy collection album several times because the second collections contains a few new songs. With Blu-ray (BD-live), you can simply purchase the extra inside the player. Digital content goes into another era, so are the developers. There are open-source communities for BD-J platform that enable regular developers to write content for home-made Blu-ray discs. It is definitely cool to write code my home video, or is it?

Java card runs Servlet and GCF
Strange idea but seems work pretty well. Java card 3.0 can accept http request inside the card. It sounds crazy in the beginning to run Servlet inside a credit-card like thing. This opens a lot of possibilities since the client side doesn’t need to implement or deploy any rich client code just for logging in the user, and http can also provide rich experience if it is well-designed. Another surprise is the generic connection framework (GCF) originated from the J2ME CLDC world. The card can open another connection using the connection framework, so the card can be used as a streaming mediator. For example, the card itself can be used as a stream decoder so the streamed video can be viewed only when the card is inserted, and the algorithm never leaves the card.

CLDC proved success – not just for phones
Thanks for hardware innovation. Things ran only in a smart phone now runs inside a plastic card. This year the show devices include a pen that runs J2ME CLDC, and motion/hear sensor that has a JVM inside it. Java was designed for embedded devices, and seems it is still going to be that way.

U.S. mobile app market is tightly controlled. Asia is the market of freedom
In the U.S., 95% of mobile market is controlled by the service provider. Another 4% are influence by the service provider. In other word, only 1% users have the choice of their own mobile solution. Asian market has less control from service provider, and the mobile application market is way bigger than the U.S. Freedom boosts the economy. I really hope U.S. service providers could give more freedom to the application creators. Let’s see how Apple doing after June.

Desktop Java - JavaFX
JavaFX is still trying to prove that Java technology is not dead inside a browser.

Java SE 6 Update 10 (a.k.a. 6u10)
Java 6 u10 is highly anticipated, and might be the only hope for JavaFX. Java 6 u10 will download only the minimum kernel (about 4MB) to get user started. Compare to 14MB of full JRE, I think this size is much more attractive to the end user, as it is a little closer to Flash download size (2MB).
Finally Mac is officially supporting Java 6, and MacBook Pro is everywhere in the crowd

JavaOne 2008 Conference (2) - Enterprise Java

Java has been there for more than a decade. The JavaOne 2008 conference shows that the technology is maturing, new ideas keep coming, and lots of future opportunities are still finding their ways. Here are some of my notes on JavaOne 2008 about Enterprise Java.

Traditional EJB Container will disappear
Currently, J2EE container has two flavors: The web container, and the Enterprise JavaBean (EJB) container. Tomcat is the most famous web container, and lots of the enterprise vendor sell the “application server” as the combination of both EJB and web container. Customers usally pay entry level charge for the “express edition” that gives you the web container only, and pay premium for the “enterprise edition” that can do the full J2EE stack, including EJB. Despite of Remote access and lookup, EJB is simple a Java object that has the following features:
-Lifecycle is managed by container
-Dependency injection by the container
-Object allocation is managed by container
-Access container managed resources, such as listeners, data source, connectors
In the next version of EJB, these feature can be included as part of the web container, so a web container is also a light EJB container. With the addition of annotation, there is no more need for define a local EJB separately (which is a bad idea from day one anyway). I think this will help acceptance of EJB, as a way of providing services. Java Persistence API already provides an alternative way of ORM aside from Entity EJB without containers. With this EJB 3.1 annotation change, it melts the boundary of the Express Server and the full Enterprise Application Server.
I don’t think EJB model itself will be a legacy, but the idea of charging premium for EJB container might no longer be true.

JSF tools are mature
JavaServer Faces is designed to be a good model for tooling. However, the tool support of JSF was horrible for quite a while. Rational Application Developer didn’t get it right. Earlier version of NetBeans didn’t do too good either. This year watching Oracle’s demo, looks like the JavaServer Faces are quite mature in the tooling world now. Not only Netbeans support on JSF is great, but also other part of the community is improved. Oracle’s tool is based on Eclipse and the JSF works. I hope IBM Rational can get them right in the future.

A side note, seems all enterprise company has moved their IDEs to Eclipse now: IBM, Oracle, CodeGear (Borland), Oracle-BEA, etc. Sun is focusing on the NetBeans of course, and looks like they are doing well too. I hate to have two IDEs for the same language in my desktop and I always choose Eclipse. However, I don’t mind to have an IDE for a different language, such as Ruby or JavaScript. NetBeans got me for this reason, not as a Java IDE (sorry).

Richer web experience is the trend, new security concerns rise
Ajax, Flash/AIR, JavaFX, and Silverlight make the web client market so busy, and consider all of them have their mobile variations. For so many years no one beat the Flash on rich web experiences, until Google shows how Ajax can serve the same purpose in a consistent user experience. Every year Sun tries to make Java come back to rich web experience. This year it is wrapped under JavaFX. Rich web experiences is not going away, and new view of web security need to be considered. The traffic between server and rich client might carry more information than you think, and the rich client might contain more business logic than the plain old HTML page. Hackers can have more fun to read the code now because the client is rich.

Web 1.0 technology is still the mainstream
While many people care about SOA and EJB, the topic that attracts most audience are still the web technology. Scalability is an apparently interesting topic. The comparison between web frameworks are very popular. Struts 1, Struts 2, JSF RI, JSF MyFaces, Spring MVC, they all have their pros and cons. Some of them excel others significantly in lowers load. Some of them are fast, but with some unpredictable pauses from time to time which might cause DoS.

JavaOne 2008 Conference (1) - Core Java

Java has been there for more than a decade. The JavaOne 2008 conference shows that the technology is maturing, new ideas keep coming, and lots of future opportunities are still finding their ways. Here are some of my notes on JavaOne 2008 on Core Java track.

Concurrency and Garbage-Collection

The discussion about Concurrency and Garbage-Collection is even hotter. They are popular for different reasons. Concurrency becomes a focus because of the population of multi-core chips. Ideally a multi-core chip should be able to execute our threaded code nicely in each core. However, in reality it is usually not the case. Even worse, the locking mechanism in modern virtual machines (doesn’t matter Java or .net) might become a bottleneck in the multi-core era. New building blocks are proposed in the conference. One example is the new keyword “atomic” to create a code block that can be committed or rolled-back. Intel also presented a hardware solution to support this atomic construct. Other system vendor has different opinion about this new proposal. Lock is difficult, but atomic might be even more difficult when real problem occur and debugging is needed.

Garbage-Collection (GC) is always a hot topic in Java. Every version of JRE has major improvement on Garbage-Collection. The non-deterministic nature of the GC makes Java VM a dangerous machine. With the modern 64-bit addressable environments, the problem is even worse. When JVM went into stop-the-world GC-cycle while under load, denial-of-service occurs. Real-time Java solves this issue by sacrificing the throughput. However, for enterprise JVMs with huge heap size, the stop-the-world problem remains due to heap fragmentation. Oracle-BEA announced the enterprise VM that has deterministic GC. I am very curious how it will perform running for weeks.

Hardware vendor’s involvements
I would think Java VM is an abstraction of execution environment that does not rely on any lower platform. Seems Java is significant enough nowadays that the hardware vendors are considering providing special instruction sets for the VM to improve their performance. I think the major reason for this to happen is the introduction of hypervisor on server virtualization. Hypervisor allows JVM and hardware (virtually) communicate in a different way. AMD CPU will provide a way to communicate with the JIT compiler when the JIT compiled binary does not perform as expected. Intel is proposing a transactional memory that allows Java to have a new way for dealing with concurrency. These kind of collaboration was usually been seen in Operating System level, such as AMD-Solaris, Intel-Mac OS X, or Wintel. It is nice to know that hardware vendors (other than Sun and ARM) want to accelerate Java platform too.

Instrumentation enhancements – VisualVM, JMX
I always feel Sun’s JVM monitoring technology fell behind IBM’s JVMs for at least five years. IBM’s JVM 1.4 has the whole stack of monitoring tool (through the expensive Tivoli). Seems the open community catches up quickly. Java 6 comes with instrumentation without performance impact or extra configuration. New JMX enhancement is coming up to allow single entry point for clustered environments.

VisualVM is a very sweet addition to the instrumentation world. It allows you to monitor your JVM performance in almost every aspect. It is for all Java VMs (well, all versions of Sun’s SE JVMs, to be specific), not just for ‘Enterprise’ containers. This means, it doesn’t cost you any money to see how your Virtual Machine is doing. No more guess using Windows Task Manager. Seems VisualVM will solve all the headaches.

Annotation explosion
Java 5 introduced a lot of feature in the language. Lots of features create more trouble than they were originally designed (such as Generics, Enum, and auto-boxing). A book is revised because of these troubles (Effective Java 2nd Edition; which is sold in JavaOne 2008 and the great Josh Bloch is signing it in person). I guess the only feature that does not cause as much confusion is the annotation. This year I see annotation everywhere. Sometimes I wonder how much is too much. I see a bad trend to use annotation to replace interface. The common pitch is “You don’t have to declare interface anymore.” This happens in the new JMX, the new EJB and many other places. Interface is one of the good reasons why Java programmers have better design concept than the programmers of other similar languages. I wonder why people would think it is an accomplishment by getting rid of the design.

Fragmented visions – modules, and “language improvements”
In my previous blog (in Chinese), I worried that the Java community will destroy themselves due to fragmented visions. Seems this is still ongoing. Despite of the matured OSGi framework, Java module system is under heavy development. It is assumed to be part of the Java 7. The new Java module system will be able to run OSGi bundle as a second-class citizen in the Java module system. OSGi already have the solution of lifecycle, versioning, modularization, and services. Java module system focuses on the first three, but not the services. It seems that these two groups still work separately, each claim they are focusing on different aspect of the same things.

Ever since Java 5 introduced the Generic, the community was excited about new language ideas. It seems that lots of people want to transform Java into the ultimate language – a programming language that has the good stuff of every other language. If that becomes true, Josh Bloch needs to write the third edition of Effective Java, and I might need to stand in the line to get the third edition signed three years later. Wait. Maybe that will not happen. Maybe when people realize how polluted Java is after all the ‘new idea’ introduced, people will simply move away from Java and move on to other language that really does the job better. Not long ago, fragmented visions collapse the C++ community and the creator (the uppercase AT&T) has no control over it. Will this happen when Java 7 releases with all new language keywords? Maybe Java 6 u10 is the last Java that the community will use?

New players: Scala, JRuby
Java platform is not about Java language anymore. Groovy got some attention a few years ago, and this year definitely JRuby is the hot thing on dynamic language. Surprisingly NetBeans become the best IDE of Ruby language. (Yes, it works with the native Ruby too.). JRuby sessions are so popular, and more people start doing Rail on their J2EE containers.
Scala is another language that people talking on the hallway. This is the first functional language that is build on top of Java’s runtime in the beginning. I have no idea what this is yet, but it seems this will be another cool stuff next year.
I didn’t notice there is a company called Azul systems that is good in Java appliances until JavaOne 2008. It seems that they are working on a lot of hard platform stuff.

These are the things I saw on the Core Java side base on my limited knowledge.

Tuesday, May 06, 2008

看到大爛片 Snake on a Plane

電視上正在播出『飛機上有蛇』。這部電影的大意是說,在飛機上 有蛇。請來了大牌黑人演技派演員山謬傑克遜擔任乘客兼警探,很認真的在飛機上展開人蛇大戰。電影開始沒多久蛇就跑出來了,乘客當然尖叫開始亂跑讓蛇開始興奮咬人。為配合電影需要,本機上的蛇專咬人臉或吃眼球以方便捕捉畫面。此時拉丁美女空服員與黑人警探聯手救人,而白人金髮美女則不意外的負責尖叫並尋找走失的吉娃娃誤闖蛇窩,最後靠身強體壯的華人背負逃出。然後黑人饒舌歌手也加入打蛇的行列,奇怪的是蛇好像專咬白人,用咬得不夠看,乾脆跑出大蟒蛇整個人從頭活吞。忽而機長不見了,山謬傑克遜和拉丁美女空服員只好跑去開飛機。飛到平穩以後機長又不知道從哪裡出現,這樣才可以讓山謬傑克遜再跑回機艙去救人。中間還穿插白人美女替無辜小弟弟吸吮毒液的橋段以增加畫面美觀。最後山謬傑克遜撐不下去了,剛好機長也死掉了,於是山謬傑克遜就跟饒舌歌手一起開飛機迫降。

山謬傑克遜很認真的把這片演完到最後,並沒有擔心演藝事業因此垮台而落跑。不像傑米福克斯演『機戰未來』那樣,幾分鐘就飛機爆炸死掉,根本就是來騙錢的。

Sunday, April 27, 2008

幾吋才夠大? 電視啦


看到一篇文章 列出選擇數位電視的時候要買多大的才適當

客廳如果不夠長 買到大電視也只能近看 太近就會看到顆粒

1080p - Does it matter?

Friday, April 18, 2008

辦公室的電子郵件文化

沒有電子郵件就沒有辦公室。沒有電子郵件就沒有工作。
對大多數的上班族來說,電子郵件就像日光燈與冷氣一樣重要。辦公室也因為這樣的科技而衍生了不同的文化。這個東西看起來簡單,但是有很多地方電子郵件並不如你想像的那樣。

1. 電子郵件不具有時間性。
雖然一封信在幾秒鐘之內就可以傳過半個地球,但這並不代表對方要在螢幕前等你的信。所以在信上加註『最急件』根本就是搞不清楚狀況。當你決定用電子郵件時,就要有做好對方可能到明年才看信的準備。有急事? 走去跟他說就好啦,不然就打個電話嘛。害羞喔。

2. 電子郵件可以證明你曾經說了什麼。
對於那些經常忘記你交代的事情又不認帳的同事,至少可以用文件副本找個證人幫忙。但是要注意,那種整天在辦公室裡說『我有寄給你e-mail』,『是你自己不看e-mail』的同事,通常蠻惹人厭的。

3. 不要濫用小旗子
不要什麼信都附上『最重要』的旗號。全部都最重要 就等於 全都不重要。

4. 不要轉寄
Fw: Fw: Fw: Fw: Fw: 轉寄: 轉寄: 轉寄: 轉寄: 笑話
沒有創意沒有關係,沒有創意還讓大家都知道,唉。

5. 非要轉寄信件,麻煩加一兩句轉寄的原因或心得
至少我了解你在想什麼,為什麼要我看這篇東西。

6. 不要留下小辮子
不要因為憤怒而發送信件罵人。會有人存起來等將來的。

Saturday, March 22, 2008

今天MSN的開場白

平常都會看到大家在MSN上面放自己今天的一句話 但很少有一天全部人都放同一個主題
目前看到的標題有

"八年"
"We made it"
"國破山河在 台灣馬上來"
"天佑台灣"
"一切都會馬到成功 苦盡甘來的"
"A Hope Emerges From a Change"
"^____^"

我的朋友們 大家辛苦了

跟四年前比起來 這次的敗選的候選人有風度的多了
四年前敗選的那一組竟然賴在地上不走 後來索性要衝入總統府 真的很丟臉

Thursday, March 20, 2008

族群分化拖垮總統候選人

美國的總統候選人這兩天因為他的牧師發表了咒罵白人的演說,聲稱美國為一個被有錢白人控制的國家,聲稱希拉蕊是特權階級,暗喻白人是窮苦黑人的敵人。原本穩居龍頭的黑人總統候選人在這場演說之後被貼上了族群的標籤,民意調查重挫,不論如何挽救都無法穩住選民的信心。

其實族群議題在這個國家是最沒有市場的政治話題。既然生來就改變不了,也就沒有什麼好辯論的。或許語言相通會影響工作生活,但新一代的美國人很少看到因為種族不同而劃分界線的情形。

台灣的大選話題永遠是這群人那群人,真希望有一天我們下一代能不被這種話題牽著鼻子走。

Friday, March 14, 2008

警察打人! 立委濫權!


記得二十年前台灣社會運動剛成型的時候,在抗爭上最常使用的大絕招,就是忽然大喊警察打人然後痛苦的躺在地上抽動。鏡頭前面,攝影機一開,警察打人一喊,一瞬間衝撞的人群變成了威權的受害者,一瞬間警察從維護治安的公僕變成了欺壓民眾的流氓,電視台保證會在中午吃飯的時間讓遊行失控的新聞上電視。

後來到了國外,看到警察個個人高馬大,腰上掛著槍,隨時揣著警棍等著打人的嘴臉,才知道民主發展跟警察打不打人沒有關係。

二十年後,台灣的警察已經不再是衝撞威權的靶子,也不再是集會遊行時第一個被咒罵的人。今日台灣人民真正拿到了權力,並且把它託付給了立委。想要上電視,喊警察打人已經不流行了。堵立委的電梯,喊立委濫權比較有效。

Tuesday, March 11, 2008

Stop the Mouse Roll-Over!

在台灣網站上經常看到的JavaScript OnMouseOver互動,就是當滑鼠移經某個項目的時候,會忽然跳出一個下拉式選單。例如知名的聯合新聞網

只憑著mouse roll-over來決定使用者的流程,這是非常不好的設計。如果你稍微留意一下,在任何一家知名的作業系統使用者介面裡,你從來不會看到mouse roll-over用在重要的動作上面。一般來說頂多是用來跳出泡泡以提示用戶,而且就算是用來跳出泡泡,也會有一秒鐘的停留延遲。你不妨試試在聯合新聞網上隨便用滑鼠晃晃,咦,我明明在看頭條新聞的,怎麼一晃就變成追星族八卦了,我要怎麼才能回去剛剛的地方呢?瀏覽器回頭也回不去啊。

使用流程混亂還不是最大的問題。最糟的是在行動裝置裡面從來不反應mouse over(因為沒有滑鼠),所以所有針對滑鼠指標移動的東西都要寫兩套,一套用在桌子,一套用在掌上。何苦這樣去設計一個吃力不討好的互動選單呢?

Thursday, March 06, 2008

iPhone開發工具


九個月後,iPhone SDK終於開放下載了。這是我幾年以來最期待的一個平台。世界的未來有希望了。

Sunday, March 02, 2008

Kingston Memory

在這之前,『Kingston Memory』是我最常購買的半導體產品,從今天開始,Kingston Memory同時也是我在牙買加首都京斯頓的回憶。

我必須老實說,我小時候地理很爛。在來美國之前我一直以為牙買加是一個非洲國家。一直到搬到南部之後才知道原來牙買加就在加勒比海,離我家不到兩個小時的飛機。

一年多前在耶誕夜窮極無聊跑去運動,遇到一位跟我一樣無聊的牙買加朋友楊立章,因為個性相近(都有點悶)所以很快就變成很好的朋友。認識了好一陣子才知道他有八分之一的華人血緣,才知道原來華人在牙買加算是前三大族裔。去年他決定回牙買加讀書順便幫忙家族的事業,我也因為他的關係對這個國家開始有些興趣。


上星期四下午搭上往Kingston的飛機,穿過古巴,看到雲的影子映在加勒比海的湛藍海面,不到一個半小時就到了牙買加。海關看到我這個背包客應該也沒有什麼好查的,就問了有沒有電子產品要留在牙買加的,若沒有就可以走了。一出機場馬上就有計程車司機拉客,很像台南火車站。楊立章與他的表弟一起來接我,第一站就是去肯德基。

到牙買加吃美國速食,有沒有搞錯啊?

我一開始也是這樣想。要知道,肯德基是牙買加最大的速食連鎖店。只要肯德基一出現,周圍的其他美國速食店就紛紛關門大吉,連速食巨人麥當勞都撐不下去。牙買加的雞,不像美國是用荷爾蒙種出來的,所以肉質比較結實。除了肯德基,牙買加最夯食品是烤酥皮牛肉餡餅(Beef Patty),有點類似西點麵包店的咖哩餃但熱而酥脆,是大街小巷都看得到的點心。

在楊立章長大的高中見到了他的伯父,也是他們家族的大家長。跟著他們一起開去吃辣螃蟹,一路上山路崎嶇,楊立章開著一輛看起來快要解體兩門舊車在山路彎道上以時速一百逆向超車,根本就是頭文字D的電影現場。整個牙買加島大部份都是山,Kingston也因此是個背山面海的都市。入夜之後山坡上燈光通明,讓我想到台北家後陽台貓空後山的景色。周末的晚上整的Kingston是一個大的夜店。人山人海到處是音樂。差別只是有的場子放老一點的音樂吸引熟男師奶,有的場子放新的音樂吸引帥哥辣妹。氣氛上很像台北跨年那個晚上,不過台北是一年一次,Kingston是一周三次,從周五玩到周日。



牙買加是個非常虔誠的基督教國家,在那裡每天早上固定會被學校唱聖歌的聲音叫醒。大部份受過適當教育的人都非常有禮貌。歷史上牙買加一開始是個海盜基地(延平郡王祠好像也是?),在英國統治下Kingston的外港Port Royal成為當時全世界最有錢的地方(電影『加勒比海盜』的故事背景)也是世界上最大的黑奴港。一場強烈地震摧毀了這一切,重建之後也難恢復當時的光榮,牙買加最後在1962年獨立,非裔,印度裔與華裔占多數,主要因為這些族裔早年被英國運來做奴工。脫離奴役,獨立建國,牙買加有很多受到壓迫的故事被馬利先生寫成歌,在世代間傳唱。牙買加很希望自己國家的故事可以給其他非洲裔為主的國家一些啟發,因此當年也用音樂支持釋放曼德拉。政治上牙買加有不少內部問題。兩黨各有支持的群眾,各擁幫派,在路邊插上綠色與橘色的旗幟(咦? 好熟悉的顏色)劃分地盤。在綠色與橘色交界,終年有槍殺的新聞。由於基礎民生工業在牙買加並不普遍,因此許多物資要依賴進口。辛苦的生活成了豐富的故事題材,加上民族的天賦,牙買加毫不意外的成為音樂的重鎮。



音樂、陽光、沙灘,最後一天我跟著他們全家在海邊吃了一頓炸鮮魚,配上浸在醋裡的辣椒黑胡椒,還有用類似芋頭的植物作成的bammy。同樣用酸辣椒汁泡的小龍蝦也是很普遍的零食。牙買加吃東西並不便宜,好一點的簡餐比美國還要貴。Akee燴鹹魚是牙買加的國菜,是經典的早餐選擇。我在其他地方嘗過,只有在牙買加的Akee燴鹹魚才好吃。Akee是龍眼與荔枝的近親,吃起來軟軟口感像榴槤但沒有榴槤味。值得一提的是牙買加的華人餐館並沒有受到美式中餐的污染,所以料理方法還是尊循傳統,不像美國中餐搞出一大堆在肉上澆糖漿的爛點子。

這麼美好的體驗,你是不是也想去牙買加看看呢? 很抱歉在這裡要潑你一點冷水。牙買加政府對台灣護照並不友善。疑似某政治實體的壓力,牙買加政府不承認中華民國護照,甚至不能在上面蓋簽證,基本上就是把那本綠色有國徽的東西當成是旅遊筆記本。中華民國外交部網站上聲稱的落地簽證,經查證牙買加駐邁阿密辦事處並不正確。申請牙買加簽證,必須先辦一張牙買加台胞證,夾在護照上,然後申請簽證蓋在那張牙買加台胞證上。麻煩的還在後面。因為護照上沒有簽證,又拿一張怪怪的白紙黑字給人家看,所以航空公司與出入關都會受到層層的刁難。一趟下來,充分體會到某政治實體如何利用國際現實傷害歷史民族情感。這樣的手段對將來的和平是好還是壞,我想對面或許應該也好好想一想。

一個比台灣還小的島,經濟也不理想,物資缺乏,卻能在音樂文化上走出自己的方向。台灣在華人音樂雖然也有類似的地位,但比起牙買加旺盛的創作能力,還有很多可以學習的方向。搭一個多小時的飛機能讓我體驗到這麼多,真的是很意外的事情。

Thursday, February 14, 2008

守成不易

在我們IT部門裡,分成新專案(capital project)與現有產品系統維護(production support)兩個大項目。系統維護支出是最不討好的一個項目。就像是每三個月送車去換機油,越換車還是越舊。出錢的老闆當然喜歡看新專案達成目標。至於現有的系統,能省就省了吧。偏偏公司裡面專案經理跟系統維護的主管是兩個人,在競爭資源的時候就難免會有大小眼的狀況。為了讓新系統可以提前發佈,專案經理有時會作出犧牲掉系統維護的決定。換言之,趕快給我做出來,以後維護是他家的事。

讓我想到幾年前Linux在企業界喊得多響,用了Linux就可以馬上省下多少多少。沒錯,省下作業系統的錢馬上可以讓專案預算降低,專案經理有功勞,公司也開心。既然這麼省,為什麼IBM與Oracle還搶著發行Linux平台相容的產品呢? 其實說穿了只是大家套好招的政治遊戲。跟資料庫與應用程式伺服器的價格比起來,作業系統的錢只是個零頭。一但進入系統維護之後,這些廠商就可以穩穩的收錢。五年十年下來,真正能省多少?

Tuesday, January 29, 2008

我該怎麼愛,台灣

在台南當台北人。在台灣當外省人。在美國當外國人。裡外不是人。

可能世界華人多少都要面對因為遷徙而造成的衝突吧。雖然我到現在三十幾年還沒有去過外省,雖然我在美國因為想家撐了這麼多年才申請居留,到了選舉,都會被扣上不愛台灣的大帽子。

親愛的政治人物請你們行行好。在外面闖並不是很逍遙的事。我想不出我這一輩子有哪一天不愛台灣,只是客觀因素讓我選擇在這裡奮鬥,請不要修理我。