Monday, April 06, 2009
gsoc .. 兩年前、一年前、今年的想法
自此, 小弟不斷的留意與 GSOC 有關的消息. 直至一年前, GSOC 2008 的舉辦... 小弟心動了... 只可惜... 因為要到某銀行實習, 給了自己一個藉口, 繼而卻步於門前. 那一年... 小弟雖未能參與其中... 但亦在歐遊的期間, 參與了 Google Code Jam (GCJ). 由於未有準備 + 人在歐遊 , 結果很自然連第一round 都過不了.
這一年, GSOC 2009 舉辦了, 起初未有心動. 後來, 得到一位朋友的問題: "有沒有興趣參加這一年的 GSOC ?" 小弟對 GSOC 的情意結又一次的被觸動了.
事實上... 小弟這一年是 undergrad 的最後一年... 假如讀不上 mphil, 就是最後一年的學生生涯. 換句話說, 很大可能是最後一個參與 GSOC 的機會. 坦白說, 就算有多忙, 也要花時間參與.. 無論成功與否... 就像馬雲所說: "放弃才是最大的失败". (那麼... 不成功便成仁麼!? XD)
April 20 19:00 UTC 便是結果公報的時間, 靜候 ...
Anyway ... i will go for GCJ this year ~~~
Thursday, April 02, 2009
my gsoc proposal submitted to php.net
Proposal: Online editor for the PHP Manual ... http://wiki.php.net/gsoc/2009#online_editor_for_the_php_manual
Currently, the documentation work is synchronized by cvs. But still, there are potential conflicts due to redundant work. Besides, it's not that easy to share the works or even pipelining the works in a distributed environment. Therefore, a centralized environment is introduced.
The editor is still under development and the source can be found by http://cvs.php.net/viewvc.cgi/doc-editor/
Short Description: In order to ease the work of PHP Documentation Group, work on Online Editor for PHP Manual has already started by Yannick... The Online Editor mimicks an offline PHP documentation environment by using ExtJS as ide alike ui and providing xml-editor with CodeMirror syntax highlighting. The documentation group can make changes online, DocBook syntax check, CVS Log/Diff/Commit, patch review list, etc.
Full Description:
PhD OE allows PHP Documentation Group to carry documentation right ahead through the browser instead of using cvs to synchronize their local copy. There is ide alike ui on PhD OE so that the doc-group can directly edit the PHP DocBook xml online. Despite, PhD OE also eases the collaboration in an open documentation environment. Doc-group can share the workloads easily since they no longer need to pass the local modified copies around but on PhD OE. In addition to this, PhD OE does allow community contributor to submit patch so that the doc-group can review the patch in a centralized location like an issue list.
To find out the implemented features of PhD OE, visit following posts on mailing list:
Currently, there are some opening issues on the TODO list (found by - http://cvs.php.net/viewvc.cgi/doc-editor/TODO?revision=1.5&view=markup). One of the major task is to "Split main.js into several objects & files" because of the coding readability, continunity, and scaliability. main.js contains ui of PhD OE. There are 6922 lines of code in revision 1.21. It is obvious that maintaining such a large piece of codes is tidous and not that good. Thus, this proposal describe how to split the main.js and merge the js for deployment.
Right before talking about the split, let's see how to merge. ExtJS ant script make use of YUI compressor. So, there's no doublt that YUI compressor is a good choice to merge js in this project as the ui depends on ExtJS. Anyway, moving back to the split, main.js can be split based on module. I suggest Java alike model using 1 module 1 class 1 js. This is the practice I used in my own ExtJS project. Nevertheless the split is time consuming, the effort spent on this kind of refactoring allows me to better understand how the ui works and improve the structure. The proposed approach follows.
- Fork a branch to work on refactoring. The trunk keeps on development
- Refactor and Test the branch... Testing is important here! No failure should be induced by refactoring.
- Merge the modified trunk to the refactored branch.
- Freeze trunk, test the merge.
- Done.
Another task is to "Clean up class.php". Again, a refactoring task. class.php is the "bootstrap" residing on the apache server ... with 4075 lines of code in revision 1.21. As written in the TODO list, initial ideas for refactoring already exist. It would be splited into several smaller classes that are quite relatively independent to each other. The proposed appraoch would be somehow the same as refactoring main.js. Fork, Refactor & Test, Merge, Freeze & Test, complete!
Thirdly, according to the TODO list again... the mod_rewrite task is another "better to have first". It makes the codes look much better to understand. This task is pretty strict forward. Design the pattern, write the regular expression on apache conf (.htaccess could be the choice). And then, reflects the changes in both php and js. It's totally different from refactoring, no forking and no code freezing.
Finally, if there's still plenty of time, I would like to propose that the modified but not-yet-saved file should have a lock or google-doc alike collaborative editing. When someone is editing a file with file-based locking, others cannot edit it at the same time before the file is commited (lock released). This reduce the chance of having conflict in modification. If collaborative editing is considered, high level DocBook xml-tag locking can be considered. This means ... partly locking the file so that anyone can edit different parts of the same file. When conflict occur, notify the editors. This would be another busy task.
Timeline:
Community Bonding Period - Study current PhD OE architecture. Confirm refactoring procedures and exact deliverables with mentor.
May 23 ~ June 20 [around 4 man week] - Refactor & Test main.js
June 20 ~ June 27 [around 1 man week] - Merge Refactored code with trunk + Testing + Documentation
June 27 ~ July 4 - [around 1 man week] - Compile interim report
July 4 ~ July 18 [around to 3 man week] - Refactor & Test class.php
July 18 ~ July 25 [around 1 man week] - Merge Refactored code with trunk + Testing + Documentation
July 25 ~ August 15 [around 3 man week] - Implement mod_rewrite, reflect changes in php and js + Testing + Documentation
August 15 onwards - Compiling final report
Category (PHP, PELC, PEAR, other): PHP Manual
Wednesday, April 01, 2009
職業無分貴賤
今日在填 MPhil Application ... 到了 Grad School 一遊, 實在是有感而發 ....
職業無分貴賤 .. 是真的嗎 !?
...
...
...
XD
http://www.google.com/search?hl=en&rlz=1B5GGGL_enHK313HK313&q=%E8%81%B7%E6%A5%AD%E7%84%A1%E5%88%86%E8%B2%B4%E8%B3%A4&btnG=Search
Sunday, March 01, 2009
春,來了
無疑, 春天來了.
一年之計在於春... 很坦白的說, 最近兩三個星期很頹廢. 對時間的觀念像是完全忘卻了. 最近的時間觀念, 彷如垃圾一樣...
是時候要整頓一下!!
這一年有何大計? 可能不多...
1. 考上MPhil
2. 望能在最後一年的ug生涯 (應該要說最後的ug暑假), 做些什麼的... SummerOfCode? CodeJam?
事實上, 剩下來的時間並不多. focus 應該是放在 MPhil 上吧... 找工作?? 還是不要花時間去想吧... 好好的、盡力的, 考上MPhil ... 要是失敗了, 也不枉一番努力.. 也不會後悔自己多心吧.
快 grad 的 ug 朋友們... 如果你是有些東西想做, 用剩下來的時間追趕吧... 如果你是有些東西不想做, 用剩下來的時間離開吧... 追一追自己的目標, 不枉這兩三個月的努力.
Thursday, February 26, 2009
阿爸學打字
Friday, February 06, 2009
Y XO @ HK ?
對我來說, XO 只是給我用來編程或上網, 作用並不大. 小弟生於小康之家, 不用為飽肚憂愁. 由初中開始 (還記得是97-98年間的事), 家中已經擁有一台電腦. 到了現在, 很自然是一個擁有一台高階電腦的香港人. XO Laptop .. 就算技術有多高, 無疑是一台低階電腦. 坦白說, 當我一開始知道 XO 在香港推行, 實在質疑它的存在價值. 因為, 我很幸運, 生於我家.
到了這個星期五晚上 (tgif), 小弟有幸參與 香港青年協會 「一孩一電腦 學習多個寶」 的 XO 送贈儀式. 同學曾跟我說.. 為什麼要花時間出席這樣的影相活動? 以下, 可能是答案吧.
當我看見很多小朋友合力玩迷宮, 去到一個連小弟也未必有能力到達的難度...
當我看見大小同樂的時候...
當我看見他們面上的笑容...
腦袋浮現的是 比爾·蓋茨太太 Melinda Gates 接受訪問時的一句說話:
If you are successful, it is because somewhere, sometime, someone gave you a life or an idea that started you in the right direction. Remember also that you are indebted to life until you help some less fortunate person, just as you were helped. - Melinda Gates世界無論是有多富裕的地方, 街上亦會有乞丐, 社會亦會有較弱勢的一群. 香港同樣. 一位隨團家長聽到 XO 可以用來上網, 他很興奮的問我, 想確實一下. 我回答說. "係! 但首要條件是屋企要先有網絡..." 他聽了.. 給了我一個很失望的眼神... 我只可再說 "或者係 去政府場地、老麥等地, 都可免費上網". 然後的是... 我聽了一個令我覺得誇然的問題 .. "政府場地有免費上網的嗎?" 我猜想... 這位家長的日常生活, 隨了花時間到起居飲食、照顧家庭、及當個打工仔外, 應該沒有很多時間看新聞吧...
其實, OLPC Asia 的發起人 黃錫基 先生 常掛在咀邊的 ... "在退休前, 我曾推動香港 每人一手機、 每戶上寬頻. 退休後, 要推動 每童一電腦". 每人一手機, 我很認同. 但 每戶上寬頻, 其實還是有點距離. 而 每童一電腦, 我絕對支持、響應! 很可能... XO 在幫助香港所有小朋友能夠接觸亙聯網的一個先缺條件是... 寬頻.
話到於此, 跟你分享一下給了我很深印象的兩位小朋友吧.
第一位是一個小學一年級的小妹妹. 她很怕羞, 其他小朋友一齊比賽玩迷宮的時侯, 她跟不上.. 跟我說... "哥哥..迷宮很悶.. 有沒有其他呀?" 我之後教她玩畫畫. 可惜.. XO 操作不方便. 她又覺得悶了... 之後, 我問她 "你識唔識彈琴, 玩音樂呀?" 她答...不懂. 結果, 我便慢慢的教她玩 TamTamMini. 起初, 她很怕.. 因為她真的不懂音樂... 事實上, 我只可以教她按 .. Do Re Mi 三個音... (因為我都不懂 =.=") 當她聽到音樂, 便開始笑了 =] 然後, 我選了一隻貓貓作為發聲的樂器, 同樣的 Do Re Mi 以瞄瞄聲發出的三個音... 她便搶著 XO 的說... "我要玩我要玩". 最後.. 小朋友們一起合奏 "仙樂飄飄處處聞 的 Do Re Mi".. 我走到她的身旁, 她便以不同的發聲樂器, 給我奏了起來, 像是要給我示威一樣呢 ^^ 這是不出三十分鐘的經歷 XO
另一位小朋友, 應該是小三小四的小男孩... 在合奏的時侯, 他很苦惱 (將來可能跟我一樣對音律不通吧 ^^" 但他玩迷宮很厲害-.-... 上方的複雜迷宮照.. 就是他!) 他彈黎彈去... 歌不成歌.. 然後說了 .. "垃圾電腦!" 我聽了, 很失望. 但我聽得出他的語氣.. 是發脾氣的說. 我只好細細聲在他耳邊問他... "點解咁講呀?" 他說.."我都唔識玩.. 又慢又難用"... 然後我跟他說... "係, 的確係慢左少少.. 但係, 我地要學下有耐性架喎~" 他之後忽然的問我.. "我係唔係可以帶佢(XO)番屋企架? 之前姨姨話可以架~" 如果是垃圾電腦... 可以吸引他嗎 ^^? 可惜.. 現在還沒有這麼多的電腦... 做到 每童一電腦.
假如你對 每童一電腦 這計劃有興趣的話, 想了解更多的話 .. click here .. http://www.olpc.asia 想加入義工團隊? 到 facebook 吧
最後, 給大家送上, 小朋友們的賀年說話 =]
Wednesday, February 04, 2009
Google Chrome ON LINUX !?

If you're reading this... because u're interested and enjoyed using Chrome on Windows =]
Now, if you want to use Chrome like features on Linux .... YOU CAN INSTALL Google Toolbar and setting your homepage to "chrome://google-toolbar/content/new-tab.html" . Enjoy Chrome in Firefox!!!!!!!
read more on http://googleblog.blogspot.com/2009/01/google-toolbar-in-firefox-personalized.html and Thx Google ^^
