關於台灣的 Open Data

剛剛聽了行政院政務委員張善政在 COSCUP 2013 的演講「Open Data Initiatives for Taiwan」與座談。會中委員解釋了行政院制定的作業原則讓屬下部會公務員能夠放心去免費提供資料。他並且舉了故宮、Google 台灣防災地圖不動產交易實價登錄查詢作為三個推動開放資料的實例,解釋政府在過程中學到的寶貴意見:處理授權、聽取民間意見來改善資料釋出的方式與品質、和 Google 這樣的國際大廠合作的實務經驗等等。

感覺很好,必須要肯定張委員真的不是來打官腔而是來搏感情的。但是在這裡,我想要點出政府資料開放的動機。很清楚的,政府開放資料的動機是來自於產業面或是執法面:因為ㄟ批批(對,我故意的)很夯,所以開放資料來促進產業發展;或是因為防災撤離要即時,不能讓民眾覺得政府動作緩慢等等,所以整合防災地圖。Something is missing here。Open Data 的重要目標是提升政府透明度、促進公民參與,讓選民能夠擁有足夠的資訊在投票所做出正確的決定。深化民主。我在行政院的政府開放資料平台當中看不到這樣的願景(除了關於我們中的有略提到「政府透明度」),而是只是停留在授權、data schema 這樣的瑣事(雖然說瑣事也很重要)。這個方向只是再度證明行政院只是經濟部行政院;環保署只是經濟部環保署而已。

舉例來說,略去所有立法院的 Data(立法院不歸行政院管吧?),我在行政院的規劃沒有看到行政院院會紀錄的 Data,或是行政院各部會草案的資料。記得電信法第九條修正草案吧?個人認為,那些才是符合 Open Data 精神需要真正 Open 的 Data。不能再以法規的最低要求的方式把公報的 DOC 檔上網就收工。

後來跟 g0v.twclkao 簡單聊了一下,證實了這是 KPI 差異的必然:行政院科技會報的目標是經濟發展、研考會的目標是政府效率,促進民主參與這個目標還是只能留給 g0v.tw 來推動。

我非常肯定政府、學界、產業界、志工等在 Open Data 的努力,但是我希望我認為最重要,最有價值的目標不被忘記。

Re: Why mobile web apps are slow

Although the title broadly and vaguely referring to “mobile web apps”, Why mobile web apps are slow is actually a lengthy breakdown of JavaScript performance on mobile. tl;dr: too slow, and will stay relatively slow in feasible future.

Regretfully, because I was not formally trained as a computer scientist, I don’t have the necessary knowledge to judge whether or not the analysis of hardware architecture, garbage collection, or even interrupter development trends, are genuine or not. Nor I will try to be an web fanboy to pin the arthur as an Apple fanboy to repudiate what he just wrote. The question I would like to bring up is: Supposedly all of the analysis (and the conclusion) are true, what would the future holds for the Open Web, in post-PC world?

For the web to move away from JavaScript, there are currently two active proposals: Google Native Client (NaCl) and asm.js. NaCl comes with some trade-offs, like interpretability; asm.js on ARM is still in active development, and we will not know whether or not it would bring the same performance boost on x86.

Obviously, without JavaScript, the web as we (the front-end web developers) know it will cease to exist. It’s not necessary a bad thing though — while the web moving a way from a place I grew up, where everyone can find out the layout or logic of any website with view source, it had also involved to something much useful and powerful, embedded into everyone’s digital life more deeply. Yet, working on Mozilla payroll means there is no excuse to give up on the Open Web — even though I am not the person who make these decisions, thought experiments is always a fun thing to do.

So, maybe 10 years from now, website, or web apps would do this: Probe the CPU architecture of your hardware, drop the corresponding optimized asm.js or NaCl bytecode to your device, and render the entire screen with WebGL. There might even be Flash-like authoring tool for that, or even WebHAL — a library to abstract CPU/GPU differences. Think about what the Open Web gain or loose at that future.

As for JavaScript, in that future, people would have conversation like this comic (spooler alert below; thanks Kanru for the link):

— … Can’t remember its name. Today it’s mostly used just as a target language for compilers, but back in [the professor]’s days people actually used to write in it directly!

— Oh, that must be JavaScript!

Perhaps, just like Lisp at the time, a dynamic-typing language is still too advanced for hardware circa 2013.

Github Pull Request 進階操作速查

Github 發 Pull Request 已經幾乎成為貢獻開放原始碼專案的主流操作方法了。Github 的成功就是在於介面設計的相當順手,甚至是如果只是要修改單一檔案可以直接在線上編輯器完成。不過它的流程還是少了最後複雜的部分:在中大型專案,一個 Pull Request 雖然可以留言做 review,但是貢獻者需要一些進階的 git 指令操作能力才能完成 review 來來回回的修改。例如,以下是從 Yuren 那邊偷來的Gaia 在 Github 上面的 workflow:

Gaia Development workflow

因為這樣,我寫了一篇文件以 Pull Request 發出之後,和專案管理者往來會遇到的情境為脈絡,解釋貢獻者該怎麼操作才能順利完成貢獻流程:Github Pull Request 進階操作速查。既然是 Github 上的流程,放 gist 當然是理所當然 … 之後需求的話可以再轉到 repository。

PS: 當初寫的時候沒有搜尋,不過搜尋了才發現還真的沒有人寫過這個流程的中文說明(英文很多就是)。倒是 John Resig 寫了一個 npm package 可以讓專案管理者跳過 Github 的綠色按鈕直接 squash commit:pulley。我比較懶惰,如文章所述,我覺得寫 CONTRIBUTE.md 要求貢獻者照作比較快 😀