貝克漢自傳 – 我的立場

作者: David Beckham, Tom Watt

大衛.碧咸的自傳,唔講唔知已經出版了十年(2004年),曼聯七小福都已經退休了,突然感覺自己不再青春。

我唔係曼聯球迷,我只鍾意兩隊球隊,就係阿仙奴同失去左頂級聯賽資格好耐o既列斯聯。那時只覺得碧咸罰球和傳中好厲害,但並不是一個有速度同突破能力的球員。

2004年碧咸剛轉會到皇家馬德里,出書大賣的其中一個原因一定係佢同費格遜決裂的詳情,當然書中只有佢片面之詞,真相相信只有當時人先知道。除了師徒關系,書中記述了碧咸有小到大的成長歷程與所有對佢有好大影響的人,佢細細個踢波就已經好突出,佢同莫耶斯踢過波,去曼聯之前佢同蘇.甘寶係熱刺受訓,仲有其中有趣一段係佢同辣妹維多利亞何相識同第一次約會。

david-beckham-my-side

陶傑 – 昔白今黑

明報總裁,前總編輯劉進圖被兇徒狂斬之日,明報剛好刊登了副總編輯阮紀宏的一篇專論:「香港新聞業有史以來最自由」──明報這篇專論指出:香港的新聞業,在「港英」時代有限制,現在你看,今日特區,新聞自由空前高漲,出來遊行示威的,都是「杞人憂天」。

明報的運氣不大好。專論一刊登,還在網絡散發,劉進圖君即刻倒卧血泊。第二天,在「新聞自由有史以來最自由」的氣氛裏,這張報紙的招牌套了黑。

跟幾個知識份子閒聊──他們有一兩位,還認識劉進圖──我以消費者的身份,向知識份子請教:既然明報歌頌今日香港的新聞最自由,其僱員遭斬了,為什麼第二天又套黑了官方報頭?劉君遇斬,有許多愛國人士說,「未必與新聞自由有關」,而是出於「私人恩怨」。如果因「私人恩怨」,報紙不應為其私人的行為因果負責,為什麼套黑了報頭?

報頭套黑,即是為香港的新聞自由而哀悼了,既哀悼香港的新聞自由,那麼你前一天,卻很權威地告訴我「香港新聞業有史以來最自由」,那麼我該相信你前一天的歡呼,還是該相信你廿四小時後今日報頭套黑了的憤慨和哀悼?
Continue reading 陶傑 – 昔白今黑

陶傑 – 大危機

一百年前,歐洲爆發了第一次世界大戰。

第一次世界大戰的直接原因有許多,但這場仗稱得上「世界大戰」,最關鍵的原因是十九世紀末開始的第二次工業革命,電信、內燃機、石油的開發,令生活節奏由馬車的速度轉換成汽車,社會風貌由寧靜細膩的畫筆轉為電光一瞬的攝影,全球各地的距離前所未有接近:美國的一個電報可以左右歐洲的戰事;中東殖民地、亞洲的新政權,本來天各一方,但因為一場大戰,信息交流,新技術由歐洲向全世界散播,人人有份,像東方快車穿山過海,一路接通歐亞大陸的風景,全人類共同投入,駛向現代都市文明(Urban Modernity)。

第二次工業革命一百年來,爆發過兩次世界大戰,至少三次石油危機,其中的經濟生產與能源消耗,據說超過過去一千年的總和。

戰後全世界幾乎無一例外模仿美國,大興土木,修路造橋、建摩天大樓、推動房地產,鼓吹借貸,以消費換取GDP,只要稍有頭腦的人都可以預見,此一方式不但無以為繼,在人口已高達七十億的今天更無異於飲鴆止渴,溫室效應、海洋污染,地球生態系統已經開始有災難性的變化,中國北方的霧霾,足以連北京都不再適宜居住。
Continue reading 陶傑 – 大危機

陶傑 – 貪腐文化

中國社會的貪污,是文化基因的問題。

既然是基因,沒得改變,也不必解釋。英國人領導時期,訓練出來的文官,即所謂AO,在英國人的訓誡之下,規行矩步,像馬戲班馴獸師的口令下的一隻會走平衡木、穿衣服的猩猩,博得滿場兒童觀眾的歡笑和掌聲。

英國人走了,AO「當家作主」,不論當了政務司司長、局長,還是什麼專員,一旦與「內地交流」,到了某種程度,毫不例外,一定會變成「貪腐份子」。

中國人嘴巴裏說反貪腐,行為之中,兩千年都貪腐,當然偶爾會有一兩個像海瑞,包拯這類,天生的不喜歡錢,但因為稀罕,所以才成為兩千年少有的偶像。
Continue reading 陶傑 – 貪腐文化

StatsD – Installation and integration with Graphite

Previous: Install Graphite under pyenv virtualenv on Ubuntu

 

Compared to Graphite, installing StatsD server is just a piece of cake.

1. Install Node.js. For better management on Node.js, you could consider using nvm.

 

2. Checkout the StatsD project on GitHub.

git clone https://github.com/etsy/statsd.git

 

3. Copy the exampleConfig.js and name it to whatever you like and edit it as follow.
ex. statsdConfig.js.

{
  graphitePort: 2003
, graphiteHost: "<graphite host>"
, port: 8125
, backends: [ "./backends/graphite", "./backends/console" ] // console is for debug
, debug: true // For debug
, graphite: { legacyNamespace: false } // Better group all collected metrics under stats
}

Continue reading StatsD – Installation and integration with Graphite

Install Graphite under pyenv virtualenv on Ubuntu

It took me one and an half day to get the Graphite working…

1. Make sure you have pyenv and pyenv-virtualenv installed.

 

2. Install the following packages.

sudo apt-get install python-dev pkg-config libcairo2-dev memcached

 

3. Install Python 2.7 with enable-shared.

env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.8

Continue reading Install Graphite under pyenv virtualenv on Ubuntu

AngularJS – Service VS Factory VS Provider

Design pattern is very important if you want to build a manageable and scalable application. In AngularJS, we could develop module, which is also regarded as a dependency, for specific feature and it could be injected to the controller whenever it is needed. This dependency injection design help us to build clean and well structured application and reduce redundant code.

There are different ways to create the dependency. Most common terms are service, factory and provider which are all singleton and you can find a lot of discussion online about their differences, when and how to use them. Here are some notes which summarize the AngularJS documentation about writing Provider.
 

 

1. When a dependency is injected to the controller, the injector from AngularJS framework will register a recipe such that the injected controller could make use of the type provided by the dependency.
Continue reading AngularJS – Service VS Factory VS Provider

Django – Setup Django REST framework

We have the Django welcome page working already.

 

I would like to create some REST services on that setup. We could make use of the Django REST framework.

Let’s keep working on our <project_root>/django_poc project to manage articles by REST. The example in this post are based on the Django REST framework quickstart tutorial. It’s good to go through all of them which could give you a more thorough idea on how the REST framework works.

1. Install the Django REST framework in your virtualenv.

pip install djangorestframework

Continue reading Django – Setup Django REST framework

陶傑 – 理性話

中國的習總據說「決心反貪腐」,好像令大陸內外的「知識份子」,又覺得很振奮。

中國「反貪腐」,絕對不可能成功。理由很簡單:由文化角度,貪污歷史兩千年,連「西遊記」裏的唐三藏最後到了西天,要進門取經,連守在如來佛祖兩旁的迦葉、阿難,也伸手問唐僧索取「引見費」。貪污腐敗,在西方是罪行,在中國,一定是文化。

英國、瑞典、丹麥、加拿大,沒有貪腐,但不表示中國要模仿西方白人國家。世界文化是多元的,中國人不可能根治貪腐,正如其人民不可能改變膚色。斑馬一旦身上沒有了黑白斑紋,就不再是斑馬;中國人不再貪腐,就不再是中國人。許多香港人對中國沒有歸屬感,其中一個原因,是香港有英國人留下的廉政公署,而香港在「回歸中國」之後,廉政專員湯顯明接受中國的茅台款待而竟受到審判──這是很奇怪的案子:湯專員在做一個中國官員、也是「禮尚往來」的儒家中國人絕對應份做的事,為什麼他成為一名罪犯?
Continue reading 陶傑 – 理性話

Dream BIG and go for it =)