Feeds:
Posts
Comments

Archive for the ‘Working’ Category

有些朋友會奇怪,我間中會談及法律。我的法律常識是從何而來呢?

在一九九八年,我以學位畢業生資格報讀了倫敦大學法律系校外生,並以自修生身份報名參加一九九九年的法律考試,我報考的科目包括:英國法律系統、憲法、刑事法及合約法。我開始每天背誦數個不同的案例。後來,對考試的信心不大,沒有去考場赴考。這件事的最大的結果是,家裡的書架排滿了很多法律書藉及案例書,這些變成了我日後空餘時的讀物。直至二零零六年搬家時,忍痛拋掉數十本的法律書藉。至此,我仍常念掛這些曾陪伴我的法律書及案例書。

我心中的法律概念,從基本的法律原則開始,尤其是我當年自修的英國法律系統、憲法、刑事法及合約法這四個科目,內容歴歴在目。這些科目的基本理念,構成我自有一套的法學框架。我學懂了這個框架來跟我從報章的案件作比較。有時,為了加強自己的信念,我會到台灣的一些法律的討論區跟不同的法律學者交手。由於沒有律師資格,不能在網上為別人提供法律的意見,但仍可在法律的觀點上跟人討論。香港沒有這類型的討論區,討論法律是一種忌諱。跟身邊的朋友講自己對法律的看法時,尤其是香港人,他們會覺得你狂妄自大。我並不是想發表偉論,我只想交流,但香港並不遇到真心交流法律理念的人。所以,我會用互聯網跟台灣的法律學者交流。

曾在香港的法庭去聽聆訊,跟我記在心中的著名的例案相比,實在是太沉悶了。一般法庭的法官,質素跟著名的大法官,相去甚遠。當學習真正的法律思考,看來,只有早出生三、四十年,跑到英國的高等法院,看看那個時代大法官,如何思考,如何制訂影響後世的案例。對我而言,二十世紀中期的歐洲法庭是那樣的令人著迷。要我處身在現時的香港的悶蛋法庭,對著貪心追求金錢回報的法律從業員,我想,我不如轉行。要為金錢而染汚了耳目,這個代價我付不起。

我喜愛到圖書館看舊版本的法律書。因為種種原因,舊版書會有一些法律觀點是新版所沒有的。就好像金庸小說一樣,當你看過舊版金庸,你會發覺有些是新版金庸所沒有的。幾個版本一並閱讀,就會發覺當中的樂趣。

我原本想從事法律工作,可惜,身處香港這個金錢掛帥的地方。人們喜歡談論投資多於談論法律。於香港,我就像一個火星的法律學者。從初初自習法律,到今天的我,累積了十多年的人生經歴的我,對法律考試的成績很有信心,但,我己不會再報考法律了,因為法律己成為我人生的一部份了。

Read Full Post »

最近有同事發現有一個Ms Access的VBA不能正常地在一部測試用的64bit 的Window 2003上運行。雖然那個是預訂在32bit 視窗上運行的。

我們追查原因的時候,發現Scripting engine 的版本太舊。是故我們到微軟的網頁,希望可以下載Window Script 5.7,才發現沒有64 bit的版本。Windows Script在視窗

之前希望安裝IIS 的監察軟件,也發現缺少了64bit 的支援。

眼看蘋果將64 bit OS正規化,而微軟則視它為「二奶」。很多更新只推出了32 bit,遲遲都未看到64 bit的蹤影。

想當年,微軟能一力擔成設計USB的創舉,現在連支援64 bit 都力有不遞。現在的微軟已是明日黃花了。

後記:經跟朋友討論,其實,微軟的32bit及64bit看來是不同的開發團隊,他們有不同的產品,所以很多時候,有些產品只有 32bit或64bit的版本。 至於Microsoft Scripting Engine沒有新的64 bit 版本是比較可惜的,用它來寫VBScript, JScript的文本程式是十分方便的。

Read Full Post »

一九八三年,家父添置了一部蘋果二型電腦。當年整套電腦包括了主機、彩色監視器及一台五又四分一寸的磁碟機。當年父親花了四千五百元,向剛在台灣讀完電腦的堂兄購入。家中的的每個人,當視它為一部電視遊戲機。

我第一次寫電腦程式,有賴當時的東方日報。那時,東方日報有一頁的副刊,叫做「歡笑樂園」,是專為學童而設的副刊,當中有「蔡志忠」的「大醉俠」漫畫,也有給學生投稿的畫廊及作文專欄。我的三姊及四姊的稿件間中也被採納,作文的稿酬為10元、圖畫的稿酬25元。而我,對當中一個教電腦的專欄特別有趣興。專欄的作者叫做「蔡敏機」,有次在專欄刊登一個「俄羅斯輪盤」的電腦程式。這是我第一個嘗試的程式,我把專欄剪下,跟著專欄的內容輸入電腦。由於專欄的篇幅有限,將多行程式連在一起。結果,我將所有程式當成一行,當然,最後不能正確地運行。

後來,當我看到另一期解除程式時,才知道自己攪錯了。跟著,我開始跟著專欄寫練習四則運算的電腦程式。我發覺,我可以一方面練習算術,一方面學習寫電腦。於是,我開始在圖書館閱讀寫程式的書。到了初中學,我會一方面上堂,一方面寫程式,老師們還以為我在勤力地寫筆記呢! 這時,每到午餐,我會省下數元,好讓我每個月買「電腦時代」。每期的「電腦時代」都有不同的程式。我喜歡對著這本電腦雜誌,演算著每一個電腦指令的結果。

到了上大學的時候,我申請了支助及貸款,並用貸款買了一部IBM XT 電腦。電腦課程教的是Pascal,由於我已習慣寫電腦程式,所以,學Pascal是十分輕鬆的。到了大二年級,我要用電腦編寫物理學有關的模擬程式,由於,我比較熟識GW Basic,我就用它交了一份自己很滿意的習作。

大學三年級,我開始自己學習C語言,結果自己儲錢賣了一套Microsoft C連帶Microsoft Assembly 6.0。後來,畢業後做了年多,又回到大學做研究。我開始寫Visual Basic及網頁。

但,這時,我仍只是個應用者,對電腦語言的認識還算很皮毛。我真正掌握一種電腦語言,就時在數年後,我離開大學,到外面教C電腦語言。那時,有很多人學電腦,我一個星期會教四到五班C語言,從教學角度,我反而更真正認識及掌握C語言。

自此以後,我常將日常的工作,考慮可否利用簡單的的程式來解決。我離開全職教電腦後,從事編程的工作。以前的訓練,使我在工作上解決了不少問題。

Read Full Post »

今天利用Google Translate去確認俄文翻譯時,發現了很古怪的結果。

當翻譯俄文:「опеределенный」時,不論輸出是英文或漢語,結果都是php.ini。參看以下的連結:
http://translate.google.com/#ru|en|%D0%BE%D0%BF%D0%B5%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9

這很明顯有以下的可能性:
1. 翻譯的指令不成功。
2. 翻譯資料出現問題,可能人為出錯,也可能曾被入侵。

在正常情況下,Google Translate會保留不能被翻譯的字眼。這是我第一次看到有檔案名字,這情況不尋常。
如果有駭客看中某些Open Source Project,他可以主動參與,然後加入一些漏洞及加入Google Translate API的代碼。這些漏洞可以利用諸如SQL Injection的技巧,然後取得網站的設定檔案、甚至是密碼檔案。

我將這個問題匯報給Google Translate: http://groups.google.com/group/google-translate-general/browse_thread/thread/3df92ee489bc810c#

等他們的回覆好了。

Read Full Post »

協作管理,意思是管理多位作者同時創作的管理方法。「協作」這詞語最早被用在「谷歌」的「協作系統」中,可是「協作系統」的英文名「Google Site」卻沒有協作的意思。「谷歌」的「協作系統」是一個網頁系統。這個系統的優點是容許多位作者同一段時間去更改網頁內容。當兩位作者同一時間開啟同一份文件而又在差不多的時候進行更新,第一位更新者可以順利更新,新二位更新者會收到訊息,該頁已被其他人更新。這種型式,就是最常見的協作手法之一。

協作管理的最大的功用就是提供版本管理的服務。我們利用栛作系統,就可以追蹤每個版本之間的分別,以及由誰去負責某個版本等等。Open source型式開發的計劃,多數採用協作管理,這樣,不同的地域、時間的人,可以根據自己的生活的規律來參與Open source的開發,大家討可以利用「協作系統」來招募參與者、分配不同的角式、引發討論、分析問題、制訂目標、更新內容、版本管理、擬訂合約細節、編寫說明、進行翻譯、追蹤及跟進問題、甚至用作測試等等。

自從協作管理在互聯網上誕生後,大大小小不同的跨國性的計劃就不斷地展開。而不同型式的「協作管理系統」也不斷地誕生。最早期的有Concurrent Version Control, Subversion, Microsoft Visual Source Safe,..等等。以至到近期的github, Google Code, Google Wave, SourceForge, CodePlex, Google Site, OfficeLive, Google Documents, wordpress,…等等,不再局限在程式編寫,亦包括文件、網頁、繪圖、Blog等等的協作計劃。

協作管理將會是未來的「團隊管理」的大趨勢。

Read Full Post »

管理開發團隊並不是一件容易的事。管理的方法有很多不同的種類,按照著不同的情況及需要來採納不同的管理方法。一般來說,制訂設計方針是一個其中的一個非常有效及重要的管理方法。

系統開發是一件很複雜及艱巨的事,在開發之前,就要考慮很多不同的因數,例如:不同的事故下系統的運作方式、系統備份、重新啟動、後備或替代系統、除錯模式、監察模式、工作分流、等等。

在開發每一個環節都需要考慮各種變數,對團隊來說是一個很大的負擔。團隊管理者可以透過訂立設計方針,來針對不同的情況所需要作出的反應。開發團隊的成員,只要跟從已經訂立的設計方針來設計系統,就可以集中在純設計方面。

訂立設計方針,需要對整個系統以及每一個參與或使用者都要有深入的認識。所以,在訂立設計方針的過程,很依賴管理者的經驗。可是,設計方針後,團隊面對最大的問題卻是在執行方針裡面。要團隊每一個人都樂於執行設計方針,是很艱巨的。

我的經驗是,引導團隊從已發生的問題上,去思考設計方針的問題。引導他們去提出不同的方案,協助他們去分析每個方案的優劣。每一位團隊的成員,就會很清楚「設計方針」是幫他們去解決現有的問題。況且,提案也是從他們的角度去提出,他們就會很樂意的去執行大家所制訂的「設計方針」。

一個有良好的「設計方針」及擁有執行「設計方針」能力的團隊,效率就會提高。

Read Full Post »

Recently, a lot of people are talking about developing iphone applications. Iphone is hot and it gives golden opportunities for programmers. Seeing the great wave in technology, I have started my career in writing iphone applications, too.

Unfortunately, I am new to Mac platform and I am not used to write code in Objective-C. Therefore, I have to spend a lot of time learning everything from scratch. The learning process is hard and this recall me on how I learned jQuery two years ago.

If you want to learn a new language and get used to the language, you have to study the basic concepts, analysis examples and try to write you own. It especially took you a lot of time in searching relevant examples and looking up the syntax of commands before you can complete one piece of your own code.

Two years ago, the resources available for people to learn jQuery are limited. Almost all my knowledge was come from the jQuery’s website: www.jquery.com. And you can still find examples, syntax and basic concept there. The website had provided sufficient information for me at the beginning. However, as I reached certain level of understanding of jQuery, I found out that, if I want to have further understanding and improvement in effectiveness of writing jQuery code, I have to write my own jQuery plugins. So, I changed my focus to jQuery plugins and started to write jQuery plugins in a latter time.

As you visit www.jquery.com, you will find a brief introduction about how to write a jQuery plugin. However, the information provided is not sufficient for advanced learners who needed to write plugins for specific purpose. At that time, I was requested to write an online magazine using jQuery In order to apply jQuery plugins in my project, I’d spent a lot of time, searching relevant plugins from the internet and downloading them to my computer. I’d studied the code of the plugins line by line. I’d tried to use them and then rewrite them in my code before I could have a full understanding about every plugins I download. And, finally, I was able to convert my knowledge to a workable solution in my project.

If there was a book which had provided an in-depth explanation of the concepts of jQuery plugin, together with useful examples categorized by the nature of application, I could save a lot of time and I could have a shorter learning cycle in jQuery and jQuery plugins.

In the mid-December, I’ve received a book from Packt. “jQuery 1.4 Plugin Development – Build powerful, interactive plugins to implement jQuery to its best – Beginner’s Guide” which is a eBook written by Giulio Bai.  I’ve started reading the eBook during my Christmas holiday.  As you know, a book for concepts and examples is essential in learning jQuery, this book is what I looked for a long time.

During my holiday, in most of the time, I liked to sit in front of my computer with a cup of hot coffee. One day, I opened the eBook, I started reading from the front page, then I skipped the first Chapter, which is about the introduction on jQuery. On the other hand, as a designers of some jQuery plugins, I am quite interested how other people teaches jQuery plugin. So, I have read chapter 2 carefully. After finished reading chapter 2, I found myself quite satisfied with the book. In this chapter, the language is plain, the steps are clear and everything is quite easy to understand. And this is the first book that introduces the concepts and differences between function plugins and method plugins.

The topics as well as the examples in books are comprehensive: Image plugins, audio plugins, video plugins, form plugins, menu plugins, navigation plugins, animation plugins, utility plugins, etc.  This book save us a lot of time from collecting different type of jQuery plugins.  Thus, we can focus on those plugins that we feel interested.

The most valuable materials are always in the later part of a book.  So, if you turn the pages to later part, for instance, Chapter 13, you’ll find a top 10 list of jQuery Plugins recommend by the author, Guilio. In this chapter, he had shared the findings and thoughts which he had spent a lot of time and effort before in studying those top jQuery Plugins.  And he will tell you what’s the secrets for top 10 jQuery plugins.

I recommend people reading this book. And I think this book is especially useful for those who have the basic knowledge of jQuery and wants to have a in-depth understanding of jQuery and jQuery plugins.  If you have spare time, you can try the “pop quiz” section provided in the latter part of every chapter. And you’ll find a lot of fun in do the pop quiz, too. Here is the link and cover of the book:

jquery 1.4 plugin develop - Beginner's Guide

Read Full Post »

人生有幾多個十年?這句說話不是出自在電視劇集中人物的口號,是來自一個資深的IT企業家。乘著科網熱,於十年前成功地賺取到數千萬,為了堅持營運,在股票禁售期後沒有放棄生意,結果身家變回原狀。

他說,他後悔沒有做Exit Plan。兩年前,他看中iPhone App的市場,毅然再戰江湖。今個浪潮沒有盲目的熱錢。收入的多少在乎的不是「大行的推介」,而是使用者的認同。不需耍有Angel Investors,不需要有公關公司包裝,使用者看到的是下載次數,其他使用者的評論。

這個新科網浪的玩家再不是投資銀行、財團,而是真真正正的IT人。

「人生有幾多個十年」這句說話從電視劇集中人物的口中說出來,我沒有絲毫的感覺。但從這位企業家口中說出來,牽起我的共鳴。

十年前的我不是創業的料子。經過十年的洗禮,人生有很多頓悟,我手上的刀子磨銳了嗎?

Read Full Post »

前一天,有一個入職差不多半年的Programmer走過來問我。

他剛剛做了一個只有標題、公司標誌、功能選單、底部註釋的網頁。這個網頁是他從其他網頁中將內容抽起而成的。他不明白為何他做測試時,瀏覽器會彈出Stack Overflow的警告。其他同事寫的網頁,沒有發生問題,為何他的會發生問題呢?

於是,我將他設計的網頁打開一看。發覺引致瀏覽器會彈出Stack Overflow的警告的原因,是網頁中的有一些Javascript發生了問題。於是教他從Javascript角度跟進。

過了一段時間,他還未找到解決方法,又再回來求救。於是,我幫他做一個更詳細的分析,發覺主要的原因,是有一段Javascript運行了多過一次。這段Javascript運行一次,網頁不會出現問題,如果運行了兩次或以上,網頁就會發生問題。然後,我就著他繼續跟進。

又過了一段時間,他又過來,匯報了結果。原因是他錯誤地使用一個其他同事開發的Asp物件。當他使用該物件時,做少了一個步驟。缺少了這一個步驟,該物件不能斷定自己有沒有重覆執行,所以,每次遇到這個物件,它都會將網頁加入一段Javascript的程式。由於這個Programmer年資比較少,對我們訂立好的設計認識不深,所以犯下了這個毛病。

聽到了他的解釋。我就問他,最終用甚麼方法解決?

他說他跟足訂立好的步驟就可以解決了。

我說,你的思考方式不正確啊!JavaScript 的問題,應該用Javascript 解決。Programmer的價值在於發現以及去解決問題。

他說那個ASP物件用了這麼久,不應該有問題。

我說,程式的好壞不在於運行多久。JavaScript 不應該設計成只許運行一次,這是考慮得不夠周詳的問題。最簡單就是加入防止重覆執行的機制,或根本性地作出改動。ASP的問題,用ASP 解決,JavaScript 的問題用Javascript 解決。每一層次都各自解決問題,才會減少漏洞。

能減少漏洞的人,身價才高。我常常跟新入職的同事對話,了解他們的想法及思考的模式。我希望透過交流,從而提昇雙方的思考層次。這樣,整個團隊的能力也能漸漸的提昇。

Read Full Post »

So actually what will happen when your ip has been blocked by Google. 

If you’ve just “searched too fast” or “infected with computer virus” or running “robots”, the following will come up:

  1. You will be redirected to a page, a saying that “We’re sorry… … but your computer or network may be sending automated quries. To protect our users,  we can’t process your request  right now. The page is located in the sorry.google.com server, e.g., http://sorry.google.com/sorry/Captcha?continue=http%3A%2F%2Fwww.google.com&id=2517167959383899603&captcha=destorm.  Inside the page, there is a captcha, (usually pure characters, however, in some google server, the captcha may be pure numeric). If you want to see random captcha, here is the link: http://sorry.google.com/sorry/image?id=3997555809511330333 
  2. Of course, you have to type the Captcha correctly and press the “I’m human!” button, before you can resume normal operation.
  3. Then you there will be a redirect together with a posted “password” send to your original server.
  4. However, if you try other google’s servers, for example, http://www.google.ad …, etc.  You will be redirected to the sorry.google.com server again.  If you clear y0ur cookies and restart IE,  you will be redirected to the sorry.google.com again.

What will happen if you ignore these and keep on searching by typing the query in the address bar?

  1. Your IP will blocked for a longer time.  If you clear cookies,  you have to enter the captcha again.  Once, I’ve seen the Google’s Japan server keep asking me captcha regardless I’ve entered the captcha correctly.
  2. So far, I haven’t come across a case that google block the ip permanently.  So, after certain time, your ip will be released again.

Happy Programming

Cloudgen

Read Full Post »

Older Posts »