Friday, November 4, 2016

談五月天演唱會搶票 - 如何設計更好的系統

想要聽學長五月天的演唱會卻這麼難,開放的那一刻系統一打開就當掉,等到看到畫面的時候票也賣完了、拓元票務系統過不久便宣布他們系統掛了擇日再賣。想想發現這件事情其實跟我這學期在CMU修的每一堂課都有關連:

  • Information Security課講的Authentication, Fraud Prevention:抵制黃牛的記名機制
  • Packet Switch課講的Scheduling, Fair Queueing, Routing:公平性
  • Scalable System講的load balancing, database consistency, transaction, bandwidth, etc…:大流量系統設計

然後我發現這樣搶票有不少缺點:缺乏簡易有效的認證機制(用身分證不太有效率)、缺乏公開透明的購票狀態(大家只能看到圈圈在轉跟售完兩種狀態)等,於是我一直搶不到票。

拓元購票系統

搶票是統一時間大家一起連上線,所以拓元準備了很大的系統負載能力去等待這樣的流量,可以看到有不少機器在服務著所有的使用者:

> nslookup tixcraft.com
Server:     10.10.1.1
Address:    10.10.1.1#53

Non-authoritative answer:
Name:   tixcraft.com
Address: 52.36.104.197
Name:   tixcraft.com
Address: 52.37.22.23
Name:   tixcraft.com
Address: 52.33.63.158
Name:   tixcraft.com
Address: 52.88.158.112
Name:   tixcraft.com
Address: 52.37.88.199
Name:   tixcraft.com
Address: 52.35.97.122
Name:   tixcraft.com
Address: 52.34.117.237
Name:   tixcraft.com
Address: 52.26.7.103

同時為了防止黃牛買多過於正常消費者所需的票後轉售,也加上記名機制,透過身分證去驗證身份。然而網路上各種黃牛出現的新聞層出不窮,於是大家開始懷疑是否公平。
從我觀察的角度,每個人買到票的機率是差很多的,列舉幾個以下影響搶票成功率的變數:

  • 時間點:人的反應時間比電腦慢超級多,我們頂多可以控制在一秒內送出訂單,但是網路傳輸時間大約是10ms,系統反應時間更少。所以一個使用者要讓訂單在完全準確的時間出現在訂票系統面前是幾乎不可能用手動的。
wget tixcraft.com  0.01s user 0.01s system 16% cpu 0.112 total
  • 網路路徑:每個人連到票務系統的路徑是不同的,有的人剛好離系統主機近,所以比較有利,有人比較遠,所以反應速度慢等等,簡而言之,如果我們去看一個個的封包怎麼傳到對方系統的,會發現完全是不公平的,而且也是不應用程式能夠控制的(例如IP是怎麼route過去也是BGP互相同步後的結果)。可以用traceroute tixcraft.com看自己電腦怎麼連過去到對拓元系統的。

設計一個更好的系統

於是腦中就蹦出一個很粗略的系統設計想法,針對以上問題或許可以得到解決。先撇開商業層面,只討論技術的話,我覺得以下設計可以提供公開透明、公平、成本低的五月天演唱會訂票系統。

我把這個設計分成三部分解釋:

抽號碼牌後統一放榜

應該訂定一個時段(幾天的時間)讓大家有充裕的時間可以慢慢填寫資料、選時段與區域,並同時看已經有多少人登訂了哪些時段與區域。而這時候系統只會發出一個流水字號的號碼牌而非真正的門票。於是我們避免掉大家同一時間上線的高峰流量問題,同時大家也自動在看到數據之後自己分流到不同場次或區域。

使用手機號碼認證

登入系統開始選票之前,應該讓該帳號綁定一個手機號碼,並透過簡訊認證(成本約1元),唯有認證成功的帳號才可以開始訂票。由於手機號碼不容易被假造,所以可以有效控制黃牛問題。

放榜

放榜:就是領到的號碼牌有沒有真的抽到門票的意思。號碼牌可使用流水字號,所以是滿公開透明的,而系統只需要從這些號碼裡面亂數選出跟位置供給量一樣多的號碼給予門票即可。至於亂數公平與否可以使用公開的演算法如下:

In [1]: import random
In [2]: random.seed(555555) # can be picked by Mayday
In [3]: random.sample(set([1, 2, 3, 4, 5]), 3) # pick three from the set
Out[3]: [4, 5, 3]

由於演算法是公開的,有同樣seed值的人都可以算出同樣的數字,也可以算出自己有沒有中獎。至於怎麼選seed值就可以很有趣啦,像是讓五月天用抽樂透那樣的方法抽在宣傳上也滿好玩的。

其他細節

  • 信用卡可以於第一次登記領號碼牌時候就填上,而被抽到或有真正門票時候系統才刷卡
  • ATM轉帳實在是很古老的方式(雖然很多人在用),個人認為想規模化的系統不該用ATM轉帳
  • 這篇文章從想法出現到寫完只花了一個小時,若有不周之處請見諒

所以說?

讓大家同一時間搶票這件事情跟DDoS那個購票系統似乎沒什麼差別了,要在這麼高流量的情況下又保持好購票流程的完整性實在很困難。能夠從設計上分散流量是根本的解決方法,公開的選擇抽獎機制才會最接近100%的公平,且使用一般常見的認證機制如手機簡訊比較能實際的防止黃牛。

誒,我只是想看個五月天演唱會呀。

p.s.對於以上內容感興趣,或想實現的人歡迎跟我聯絡 http://www.heron.me

Monday, August 8, 2016

Pokemon Go 觀察之二三事

相較於一般網路上大家談論的事情,對於這次Pokemon Go的風潮我有以下幾點觀察。

不能戴著鴨舌帽在路上玩

因為這樣看起來實在太專業了,會造成行人的壓力。

成為道館長

趁其他隊伍把道館打下來之後,有短暫時間該道館會是白色的、不屬於任何隊伍,利用這段時間把自己最愛的神奇寶貝放上去,照張相之後跟朋友分享。

其實不用出門呀

Pokemon Go既然是App,讀取的GPS資料來自於手機系統,於是可以讓系統給予不同的GPS位置達到移動的效果,不用真的出門也可以去很多地方。

Wednesday, July 13, 2016

當兵這一年,我做了什麼

Heron Yang

眼看就快要退伍了,是時候記錄當兵這一年。

當兵,讓我別無選擇地,必須空下沒就學或工作自由的一年,但也幸運地空出不少屬於自己的時間。在休息與自我實現之間,我選擇持續走在我的道路上:Build Something People Want。於是,我利用這段時間,先是申請美國碩士,再是閱讀數十本以往沒機會細讀的書、學習各種應用程式開發,還有實作數個作品。

申請美國碩士

前四個月色調大多是關於碩士申請,過程包含考試、學校選擇、文件準備與送交申請等等,雖說事情很繁瑣、要顧慮的細節多;然而,平心靜氣地一步步準備,同時反思著自己想要讀的是什麼,也讓我更瞭解自己的志向。

  • TOEFL與GRE考試:若不滿意就得接著再考一次的過程,TOEFL必須兼顧聽說讀寫各種面向,還要練習一些考試技巧;GRE則是要從一開始全部選項都看不懂,到後來可以看懂一半選項。為了選擇好的學校,往往分數需要TOEFL高於100分、GRE高於320分
  • 學校選擇:從百名內的學校中,一一查看學校網頁,閱讀他們有提供怎麼樣的碩士,與自己的興趣是否相符,然後再從中篩選出適合申請的學校數所。大概需要幾週的時間做這件事情,同時有越多其他人的意見越好
  • 文件準備:讀書計畫、履歷、線上申請表與推薦信等,這部分壓力較小,但頗繁瑣,需要反覆確認與修正
  • 申請:注意每一所學校的申請截止日期,還有繳費事項等等,接著就等放榜即可

從過往經驗中以及對於未來的想法,我選擇的是唸資工相關的碩士,且希望偏向產業實務導向,更多的相關細節寫在Heron at CMU。學校申請約在12月截止,隔年2月開始我陸續收到CMU, UIUC, UCSD, USC, 和NYU的Admission,最終選擇CMU的MSIT-Mobility碩士

從幾本一直沒機會讀的經典書籍開始,讀書一直沒有解決我對於新知的需求,反而讓我想越讀越多。以下列舉一些這段時間看過的書:

  • Clean Code:程式世界中頗有名氣的一本書,對我幫助甚大,之後在寫程式過程中不斷想起書中的內容,也在AlphaCamp帶領了讀書分享會,那時候準備的講義與作業我編寫成一本電子書,稱之為「Clean Up Your Spaghetti」(把你的麵條式程式碼清理乾淨之意)。
  • Learning Linux Binary Analysis:前一年Packt出版社寫信給我,就這麼當了這本書的Reviewer、參與這本書的開發過程,作者是一個對於ELF格式的專家中的專家
  • The Practice of ProgrammingThe Unix Programming Environment:經典程式書籍,特別是一些程式習慣部分值得了解,可惜因為年代差距大,很多已經不合時宜了
  • HOOKED:講述人上癮一個產品或服務的原因,其中作者提出The Hook Model包含Trigger、Action、Variable Award與Investment四部分,非常受用,我則把筆記寫在這裡
  • The Shallows:作者在書中提出網路世代中,人們漸漸思考深度變淺、專注時間變短等問題,並深入探討其原因和問題,雖說並沒有明確給予一個解答,但非常值得了解,是之前在CMU交換時設計系老師所推薦的書,也是人機介面領域的熱賣書,我的閱讀筆記放在這裡
  • The life-changing magic of tidying up:一本極簡主義運用於環境整理的書,在生活中可以反覆用受,我的閱讀心得則寫在這裡

除了這些之外,我還看了其他各種書:「The Art of Photography: An Approach to Personal Expression」、「Seriously…I’m Kidding: Ellen DeGeneres」、「圖解設計師的色彩法則」、「少,但是更好」、「我敢在你懷你孤獨」、「我的不完美」、「為什麼我們這樣生活,那樣工作?」、「將模糊理論說清楚」等等。

學習新的東西除了讓自己可以有更多能力去實現想做的東西以外,也讓我感到興奮。當兵期間,新學的東西我會找方式去應用,這是一段我能隨心學習的時間。

Swift

2013時候,我看著Stanford CS193P線上課程學習Objective-C語言寫iOS的App,並與朋友上架了一份作品Pitch It;當兵這段時間,我再修了一次這堂課,不同的是這回是Swift語言,接著我跟做音樂的朋友合作,開發上架了ChordBox(一個提供即興創作者和絃靈感的App,支援Apple Watch)。

Node.js

各種常見的工具裡面,Node.js常常讓我無法忽視,於是我找了線上的教材,不著個幾天就能學會大部分的東西,接著,我用它來實作數個應用。有趣的是,原本我習慣用Python解決的問題漸漸移到Node.js上頭。這段時間我用Node.js做的東西有:

  • PinCafe:一個讓人搜尋台北咖啡廳的平台,可以根據需求輸入搜尋條件,如:有無插座、有無Wifi等
  • Ducky - Chat Robot:Facebook Messenger的聊天機器人,設計來聽使用者的心理煩惱

Parse

Parse是我非常喜歡的工具,雖然原先Parse.com不再提供服務,我仍覺得Parse是我在製作網頁或App時候最好的工具,於是這段時間我運用Parse寫了不少應用程式,並自己架設Parse Server與Parse Server Dashboard。

除了上述的PinCafe以外,有:

  • 食時掃讀:Android App,可讓使用者透過掃描商品條碼,得知該食物使否含有有害健康的反式脂肪
  • Lens Decider:透過點選喜歡與不喜歡相片的方式,協助攝影愛好者選擇他實際喜歡的鏡頭

Pebble

Pebble是我每天都會戴著的智慧手錶,它提供的開發環境頗有趣,是C與JavaScript語言,同時還有網頁版可以開發。我則寫了兩個手錶錶面的App上架到Pebble的App Store,至今有上百人下載,而我自己也用這錶面約半年了。

  • Count Days:透過手機上的頁面可以設定Dream Day,手錶錶面上會顯示距離Dream Day的天數(寫Pebble Watch與Phone App溝通這部分頗有趣,需要資料型態的轉換、不同程式類別的橋接等)
  • Solar Ring:模仿Apple Watch其中一個錶面,以圓圈方式表示太陽當日位置

Kali Tools

Kali Linux是一個提供資訊安全人員做安全測試用的作業系統,上頭已經裝載好很多安全測試的工具,可以對於測試對象執行各種掃描、攻擊等。而我認為透過瞭解這些工具,可以更明白現今比較常見的攻擊原理為何,以及實務面上他們是怎麼被運行的,所以選了常見的工具(我稱為Kali Tools),寫了一系列的文章在這裡

Qt

Qt可用來撰寫支援不同平台的應用程式,特別是想同時支援Mac與Windows系統時候,他會是很合適的選擇。於是在有朋友的畫圖協助下,我寫了一個電子雞,牠會在電腦視窗中走來走去,偶而肚子餓或生病等等,目前支援Mac系統。

做出東西給使用者使用,並可以幫助到人是我所在意的目的,以下是這段時間我發起的一些小專案作品,包含一些上文已經略述的部分。

1 Day, 1 Project

1 Day, 1 Project是一個練習快速發想問題後,並提出、測試、實作原型的工作坊,形式是一天一個作品,總共五天:

  • Day 1 - I am Hungry:發送過剩的食物給需要的人之發想與探討
  • Day 2 - PushCampus:校園訊息推播的構想與其商業模型
  • Day 3 - LoserCaca:魯蛇改造計畫
  • Day 4 - InstaCast:業餘表演人的直播平台
  • Day 5 - IdeaSeed:創業想法發想與合作之平台(後來我將它實作出來並架設在此

Ducky - Chat Robot (諮商機器鴨)

一個讓人想使用的東西分很多種,可能因為它解決了某些問題,也可能是因為它帶來好處。但不論如何,最需要解決的是那些讓人痛苦難受的問題。其中,身邊有很多朋友會遇到心理上的難處,而程度上已經需要醫療的幫助,然而往往沒有方便的管道即時提供幫助。於是,我參考Eliza演算法,實作一個中文版本的諮商機器鴨架設在Facebook Messenger上頭,讓人無時無刻都可以跟牠聊天。

可惜是這仍有很大的進步空間,個人認為應當先讓既有平台如張老師專線先加入Facebook Messenger或LINE管道以協助到更多人,而自動化部分則應該慢慢研究後實現,至於這隻機器鴨希望能扮演拋磚引玉的角色。

PinCafe

常常想找某地區的咖啡廳,卻不知道用什麼找嗎?現今方法中,Google Map不能看出咖啡廳是否提供插座與Wifi等等,而部落客的資料則是很分散不容易快速查詢,於是PinCafe就扮演了解決此問題的角色。

PinCafe是我和另外幾位朋友每週固定時間開會製作出來的平台,其中已經有師大與公館區域約百家咖啡廳的資料,並讓提供使用者可以根據區域、店家設備需求或營業時間查詢咖啡廳,而PinCafe有每家咖啡廳的位置、評價、部落客文章連結、相片等資訊。

結語

一年的時間,要經營一個長久的事業會稍嫌不適合,於是我選擇大量的學習並實作,同時試驗各種不同型態的程式想法,也期待這些作品在往後有人會感興趣然後進一步共同經營。當兵的最後幾個月我則在暑修CMU的Introduction to Computer System,複習與練習系統底層程式。

當然一年間能發生的事情不只是這些,而不論生活中我們能決定的部分有多少,我們都能選擇自己在意的事情與想走的方向。記得去年在美國UIUC聽歌手王大文的小型演講,他說:”Your life is like a story. And, make sure you are the one who’s holding the pen.” 共勉。

相關文章

Saturday, April 23, 2016

被台大拒絕了三次,於是我去了Stanford和CMU

註:此篇文章屬於我個人歷程與心情紀錄,本意用於分享給身邊好友,鼓勵大家開解自己,也不要太在意眼前得失。此文被過度熱烈的分享換來的社會大眾評論,或是造成部分人有爭執,皆不是我的本意,希望大家心平氣和當作看看故事即可,不需要吵呀:)


給被標題吸引進來的你,
這是一個關於我自己在升學路上的故事,曾經我有情緒也有撞牆期,而也許很多地方需要被討論與批評;但不論如何,現在,讓我平靜地述說這段歷程:我是怎麼被台大拒絕了三次,而又是怎樣讓我看見不同的天空。

起點

高中社團,師大附中的工業技術研究社,是我開始接觸寫程式的起點。高一的第一個學期,週五的社團課學長教我們在Linux上面寫C語言,第一次教if/else、第二次則用while/for排列一些圖案,而記得當時為了把輾轉相除法寫好,留到很晚肚子很餓,但從那時候開始我知道自己對於寫程式有很大的興趣,想一直學下去。
「做一個強一點的科展作品」像是被洗腦一樣,我的腦中被學長灌輸了這個想法。於是這變成我高中三年的故事主軸:我做了一台自動對發票機器。其中運用OpenCV做客製化的影像處理流程、SVM/PCA等算法做一個自己的Machine Learning分類器、Arduino加上伺服馬達等做成的機械手臂去翻發票。那時候一心只想把東西做好,一改再改,直到比賽時候已經第七還是第八版了。最後,這作品拿了三個全國第一名:全國科展、國際科展Intel特別獎、旺宏科學獎金牌。

第一次被拒絕

畢業時候,大小獎項有十幾個,還有市長獎也上了電視跟報紙;然而,這並不代表和升學上有多少關係。高中的科展道路上,唯有代表全國到海外參加國際競賽才能獲得保送資格,而這也是我唯一沒能得到的。還記得在科教館比賽爭取這個機會的時候,評審老師把五組參賽者各個叫進辦公室進行面試,而當時評審老師用英文向我說了一些鼓勵的話,卻沒有對於作品提問任何問題,聽完之後,我知道我沒有機會了。
於是我跟大家都一樣回到書本上去考學測,考前的幾個月全神貫注的準備,最終沒有考上原先的第一志願「台大資工」,而選上了也不錯的「交大資工」。學校指導我科展的資訊老師還特別寫了一封信給台大資工系,希望他們能夠讓我去讀,而當然跟大家想結果是一樣的:對方很有禮貌的拒絕了。我的老師最後跟我說:「厲害的人都哪裡去都能有自己的一片天」我不確定自己是不是厲害的人,但這句話確實讓我安心一些。
那時,我萌生出國念書的念頭,只是不論自己或家裡也不知道要怎麼弄,相對來說,眼前穩定的升學方法是很清楚的。知道自己會念交大資工這件事情大概不會有變數了,我利用升大學前這個較長暑假,去Stanford參加Summer College。他是需要經過申請並核准的,申請內容包含在校成績與essay等,好處是當時他不需要托福成績。於是,我就一人飛了過去,住在Standord一個夏天,並開心的修著Stanford的正課,我也紀錄了那時的點滴。出國的眼界開了之後,讓我往後想繼續出國念書的想法只剩越長越大的趨向。

第二次被拒絕

從Stanford回來之後到交大接著開始正式的大學,有很大的落差,從環境到上課內容皆是。特別是高中這段時間我已經接觸比較多的電腦的程式,交大第一年的課讓我有點沮喪,於是我報名了台大資工轉學考,想嘗試在第二年看是否有機會回到台北。當然,又沒有成功而且差很遠,當時我並沒有為了轉學考試念書,而我的心也從不在為考試念書這件事情上。
還好,交大有豐富的交換學生資源,觀察之後發現理論上只要有心,都能申請上。對於一個資工系的學生來說,有兩個單位提供交換,分別是學校國際處與電機系。首先,學校國際處的申請我排到了新加坡南洋理工大學,本來最想去的ETH被另外一個同班同學領走了。這時,由於不能同時答應兩邊的申請,我放棄新加坡南洋理工大學的機會,去申請電機系的交換學生計劃,最終能去CMU。
第一天到達CMU的時候氣溫是零下20幾度,開啟一個自己跟自己對話的一段時間之後,漸漸認識朋友,不論是大家的個性、文化、想法都無形中變成我的一部份。半年間,我仍持續寫部落格紀錄,最終這些故事編成一本書課程心得分享得到大家的喜歡,而一系列文章中,最後一篇我寫了 ”Thanks for being here, it’s the end of my trip, but not my life story.”

第三次被拒絕

大四初,當所有人在推甄申請時候,我也不例外,我投了台大資工碩士班。是的,還是沒有上,我的猜測是因為我的成績並非最頂尖的那一小群。於是,我選擇去當兵,並利用這段時間,讓我終於可以認真的去申請美國的碩士。
相對於台灣的推甄申請,申請美國學校麻煩許多。其中包含托福/GRE考試、Statement of Purpose文章、履歷、繁雜的表單、推薦信等,而為了讓考試成績達到好一點的狀況,我和幾位在準備的朋友都考了不少次,文章也請人幫忙潤飾。從一開始大約50幾間的學校篩選出十幾個感興趣的系,然後花幾個月的時間慢慢把所有需要的流程處理完。
很幸運的,這裡終於可以畫下一個句點。今年二月開始漸漸收到學校的回覆,其中有CMU、UIUC、UCSD、USC和NYU,每一個學校我相信都比台大更好,這個石頭也終於放下,於是能平心地寫這一篇文章分享歷程。最終,我選擇去CMU的INI念與網路系統相關的碩士,我也會繼續寫這段故事

想一想

三次的拒絕與三次的美國學校申請經驗,我想列下一些原因,對於我這樣的申請人,為何兩者之間錄不錄取有不同標準。

台大只在意成績,美國學校在意全面表現

「只在意成績」是很強的用詞,然而我覺得不為過,沒有100%也大約有95%以成績為衡量標準,於是乎,成績沒有屬於前5%的人並沒有其他方式去表現自己,直接不列入思考。對於這個議題似乎已經是多年命題,不好,但也有好。成績為標準能守護最高的公平性,但喪失其他層面的價值,如一個人的態度與想法。
而在申請美國學校的開始,人會常問「所以GRE要到320分嗎?」、「我推薦信很好能不能取代托福的爛成績?」之類的問題,然而他們沒有一個絕對的答案,學校會對每一個人整體的了解後去判斷是否合適就讀,於是大家開始注重每一個層面的表現,除了成績,還有英文能力、工作經驗、自我了解(才可以寫出有說服力的Statement of Purpose)、學術成就與課外表現等。

台灣學校申請規定死,美國學校申請較為彈性

學測推甄的時候,每一個項目多少分都清楚寫在手冊上,在嘗試用明文規定的方式保護公平性與多元性的時候,缺少了彈性。申請人必須依照要求去「提供」他們在意的東西,而並沒有一個地方可以讓申請人自由發揮,或是有溝通的可能。
相對申請美國學校時候,我有幾次關於他們提供彈性的例子。其中有一所學校要求必須修過某門學科才可以申請,然而即使我沒有修過仍被錄取;另一個例子是我當時的考試成績過了截止日之後有新的分數,大部分學校都表示願意讓我更新;申請所需的東西都是可以反覆修改、考試不滿意可以再考,不會有一次定生死的問題,而比較像是一種表達的過程。

世界很大,有很多學校

每個人都有自己的個性與想要的環境,而眾人眼中的好學校不見得就是適合自己的學校,於是也許台交清是我們一直以來認為的最高目標,然而,世界很大,學校很多。即使我嘗試三次申請台大沒有成功,而能表達的是這學校並不適合我;相對而言,申請國外的學校選擇變得更多,可以針對感興趣的申請好幾所,而非一所申請好幾次。退後一步之後,會看見很大的天空。

結語

從高中開始,我一直都很喜歡寫程式,並期許自己的東西能幫助到人。申請學校這件事情固然重要,但是記得,自己有沒有持續做想做的事情更是重要,而眾人常說「堅持到最後,你會追到你要的」,我則不這麼認為。堅持到最後,是對自己的負責,而從來沒有人保證你最終能獲得什麼,如果真獲得了,我們要感謝運氣。

Monday, April 18, 2016

The Life-Changing Magic of Tidying Up

As always, I like staying in a minimal environment, which covers from my physical environment to my presonal plans. While I was trying to find any book relating to the minimalism, I found this book, “The life-changing magic of tidying up”, with really high rating on Amazon. Therefore, I read it.

Overview

I can think of no greater happiness in life than to be surrounded only by the things I love. How about you? All you need to do is to get rid of anything that doesn’t touch your heart. There is no simpler way to contentment. What else could this be called but “the magic of tidying”.

The book is about a method for tidying designed by her: the KonMari Method. She suggested that we should only tidy once a while instead of cleaning the place regularly. And, she also mentioned that we should discard all the things that don’t “spark your joy” by touching the item and feeling it. Last, by having only small amount of items, it’s easy to store things in your eyesight, and be surrounded by only the things you like.

Quotes

Tidying in the end is just a physical act. The work involved can be broadly divided into two kinds: deciding whether or not to dispose of something and deciding where to put it.

Books you have read have already been experienced ad their content is inside you, even if you don’t remember. So when deciding which books to keep, forget about whether you think you’ll read it again or whether you’ve mastered what’s inside.

My basic principle for sorting papers is to throw them all away. I recommend you dispose of anything that does not fall into one of three categories: currently in use, needed for a limited period of time, or must be kept indefinitely.

There are three approaches we can take toward our possessions: face them now, face them sometime, or avoid them until the day we die. The choice is ours. But I personally believe it is far better to face them now. If we acknowledge our attachment to the past and our fears for the future by honestly looking at our possessions, we will be able to see what is really important to us.

Takeaways

The method in the book tells me the occasion of tidying, and the order of tidying different items. However, most of the content is about encourging the reader to discard things. The author believes that most of the things should be discarded, and that’s the key to have a tidy place with stuffs that you truly love.

I am not sure how this idea can be applied into my life, but it’s definitely a way to obtain a minimal lifestyle.

Friday, March 25, 2016

The Shallow

Preface

The Net seizes our attention only to scatter it.
“How do users read on the web?” he asked then. His succinct answer: “They don’t.”

The book, “The Shallow”, raises a common problem we all suffer nowadays: “we lost our deep reading ability.” The author studied on this issue from different aspects, which provides enough knownledge for us to understand why this happens. Although the book may not mention any specific solution, we can deal with it by bring up our own self-awareness for the first step.
In this post, I am sharing three different clips from the book. And, I think, they all answered some question in today’s tech world by descibing accurate insights.

AI

After AlphaGo won the Korean player, some people started to worried that the robots will take over the world. Some medias spreaded out articles with scary titles saying the robots may not be controllable in the near future. However, I totally disagree with these ideas, which I think they are barely based on the lack of knownledge. AI or robots are still machines, which do whatever we ask them to do, and they will never going to do “something out of control” if we don’t ask them to do so. It’s common and nature that people put emotions into the machine, but the machine eventually is still the machine. I believe, the way to build a real AI with its own emotion, mind, etc is to fully understand the human brain from Biological aspect. There’s the clip from the book that shares the same idea as mine.
The first academic conference dedicated to the pursuit of artificial intelligence was held back in the summer of 1956 - on the Dartmouth campus - and it seemed obvious at the time that computers would soon be able to replicated human thought. The mathematicians and engineers who convened the month-long conclave sensed that, as they wrote in a statement,“ every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it.” It was just a matter of writing the right programs, of rendering the conscious processes of the mind into the steps of algorithms. But despite years of subsequent effort, the workings of human intelligence have eluded precise description. In the half century since the Dartmouth conference, computers have advanced at lightning speed, yet they remain, in human terms, as dumb as stumps. Out “thinking” machines still don’t have the slightest idea what they’re thinking. Lewis Mumford’s observation that “no computer can make a new symbol out of its own resources” remains as true today as when he said it in 1967.
But the AI advocates haven’t given up. They’ve just shifted their focus. They’ve largely abandoned the goal of writing software programs that replicate human learning and other explicit features of intelligence. Instead, they’re trying to duplicate, in the circuitry of a computer, the electrical signals that buzz among the brain’s billions of neurons, in the belief that intelligence will then “emerge” from the machine as the mind emerges from the physical brain. If you can get the “overall computation” right, as Page said, then the algorithms of intelligence will write themselves. In a 1996 essay on the legacy of Kubrick’s 2001, the inventor and futurist Ray Kurzweil argued that once we’re able to scan a brain in sufficient detail to “ascertain the architecture of interneuronal connections in different regions,” we’ll be able to “design simulated neural nets that will operate in a similar fashion.” Although “we can’t yet build a brain like HAL’s,” Kurzweil concluded, “we can describe right now how we could do it.”
There’s little reasons to believe that this new approach to incubating an intelligent machine will prove any more fruitful than the old one. It, too, is built on reductive assumptions. It takes for granted that the brain operates according to the same formal mathematical rules as a computer does - that, in other words, the brain and the computer speak the same language. But that’s a fallacy born of our desire to explain phenomena we don’t understand in terms we do understand. John von Neumann himself warned against falling victim to this fallacy. “When we talk about mathematics,” he wrote toward the end of his life, “we may be discussing a secondary nervous system.” Whatever the nervous system’s language may be, “ it cannot fail to differ considerably from what we consciously and explicitly consider as mathematics.”

Modern Brain

Although I’ve spent lots of time on studying, my ability of memorizing things isn’t increased for years. I started to think that “do we really need to memorize things if there’s Internet?” The following clip from the book nicely explains the reason why people lose their momerizing skills.
What determines what we remember and what we forget? The key to memory consolidation is attentiveness. Storing explicit memories and, equally important, forming connections between them requires strong mental concentration, amplified by repetition or by intense intellectual or emotional engagement. The sharper the attention, the sharper the memory. “For a memory to persist,” writes Kandel, “the incoming information must be thoroughly and deeply processed. This is accomplished by attending to the information and associating it meaningfully and systematically with knowledge already well established in memory.” If we’re unable to attend to the information in our working memory, the information lasts only as long as the neurons that hold it maintain their electric charge - a few seconds at best. Then it’s gone, leaving little or no trace in the mind.
Attention may seem ethereal - a “ghost inside the head,” as the developmental psychologist Bruce MacCandliss says - but it’s a genuine physical state, and it produces material effects throughout the brain. Recent experiments wit mice indicate that the act of paying attention to an idea or an experience sets off a chain reaction that crisscrosses the brain. Conscious attention begins in the frontal lobes of the cerebral cortex, with the imposition of top-down, executive control overt the mind’s focus. The establishment of attention leads the neurons of the cortex to send signals to neurons in the midbrain that produce the powerful neurotransmitter dopamine. The axons of these neurons reach all the way into the hippocampus, providing a distribution channel for the neurotransmitter. Once the dopamine is funneled into the synapses of the hippocampus, it jump-starts the consolidation of explicit memory, probably by activating genes that spur the synthesis of new proteins.
The influx of competing messages that we receive whenever we go online not only overloads our working memory; it makes it much harder for our frontal lobes to concentrate our attention on any one thing. The process of memory consolidation can’t even get started. And, thanks once again to the plasticity of our neuronal pathways, the more we use the Web, the more we train our brain to be distracted - the process information very quickly and very efficiently but without sustained attention. The helps explain why many of us find it hard to concentrate even when we’re aways from out computers. Our brains become adept tat forgetting, inept at remembering. Our growing dependence on the Web’s information stores may in fact be the product of a self-perpetuating, self amplifying loop. As our use of the Web makes it harder for us to lock information into our biological memory, we’re forced to rely more and more on the Net’s capacious and easily searchable artificial memory, even if it makes us shallower thinkers.

Why CLI (Command Line Interface)

When I code, I prefer using CLI, the command line interface. The reason behind is that CLI brings me a clearer view of the whole system. The author mentioned that helpful interfaces aren’t always benefits the users, which is the part I would like to refer to the comparison between CLI and GUI.
In the early stages of solving the puzzle, the group using the helpful software made correct moves more quickly that the other group, as would be expected. But as the test proceeded, the proficiency of the members of the group using the blare-bones software increased more rapidly. In the end, those using the unhelpful program were able to solve the puzzle more quickly and with fewer wrong moves. They also reach fewer impasses - states in which no further moves were possible - than did the people using the helpful software. The findings indicated, as van Nimwegen reported, that those using the unhelpful software were better able to plan ahead and lot strategy, while those using the helpful software tended to rely on simple trial and error. Often, in fact, those with the helpful software were found “to aimlessly click around” as they tried to crack the puzzle.
Eight months after the experiment, van Nimwegen reassembled the groups and had them again work on the colored-balls puzzle as well as a variation on it. He found that the people who had originally used the unhelpful software able to solve the puzzles nearly twice as fast as those who had used the helpful software. In another test, he had a different set of volunteers use ordinary calendar software to schedule a complicated series of meetings involving overlapping groups of people. Once again, one group used helpful software that provided lots of on-screen cues, and another group used unhelpful software. The results were the same. The subjects using the unhelpful program “solved the problems with fewer superfluous moves and in a more straightforward manner,” and the demonstrated greater “plan-based behavior” and “smarter solution paths.”
In his report on the research, van Nimwegen emphasized that he controlled for variations in the participants’ fundamental cognitive skills. It was the differences in the design of the software that explained the differences in performance and learning. The subjects using the bare-bones software consistently demonstrated “more focus, more direct and economical solutions, better strategies, and better imprinting of knowledge.” The more that people depended on explicit guidance from software programs, the less engaged they were in the task and the less they ended up learning. The findings indicate, van Nimwegen concluded, that as we “externalize” problem solving and other cognitive chores to our computers, we reduce our brain’s ability “to build stable knowledge structures” - schemas, in other words - that can later “be applied in new situations.” A polemicist might put it more pointedly: The brighter the software, the dimmer the user.

Sunday, March 20, 2016

Use Unconscious Thoughts for Complex Problems (Paper Reading Note)

Preface

While I was reading “The Shallow”: What the Internet Is Doing to Our Brains, one paper was mentioned. As it suggests that unconscious thoughts offer better decision on complex problem, I am curious about it. Here is my study note of the paper, “Think Different: The Merits of Unconscious Thought in Preference Development and Decision Making”.

Conclusion: unconscious is good at making complex decisions.

  • The problem is that it feels wrong to make such an important decision so quickly.
  • Both conscious and unconscious systems can be very fast, slow, smart, or stupid. It all depends on what they are asked to do.
  • One needs enough processing capacity to deal with large amount of information, and one needs skills sophisticated enough to integrate information in a meaningful and accurate way.

Processing Capacity

  • Maximum amount of information thatch be kept under conscious scrutiny at any given time is about seven units (4060 bits per second), which is low.
  • The capacity of the entire human system is about 11,200,000 bits (including visual system, etc).
  • More elaborate, normative strategies only work well when all information is taken into account.

The Skills to Think

  • That is the integration of information in a meaningful way.
  • Consciousness may suffer from a power cut when too much pressure is put on its limited capacity, but as long as its capacity is enough to deal with a particular problem, it is likely to be a good thinker.
  • Researchers have long recognized the importance of incubation, the process whereby a problem is consciously ignored for a while, after which the unconscious offers a solution.
    • We put things to rest for a while and then suddenly, “Bing,” we feel we know it.
    • Not thinking about a problem for a while may lead people to forget wrong heuristics or inappropriate strategies in general.
    • Successive guesses converged, and the unconscious seemed to be closing in on the right answer quite a while before the answer was accessible to consciousness.

Experiment

  • A brief period of unconscious thought will lead to a better decision relative conditions under which unconscious thought is prevented.
  • When making complex decisions, conscious thought is inferior relative to unconscious thought.
  • Experiment 13: proofing that unconscious thinking provides better decision in some cases; experiment 45: testing the reason behind

Polarization Hypothesis

  • Distraction can lead to the change of a “mental set”, so, the role of the unconscious is proposed to be passive: putting a problem aside for a while allows for a fresh, unbiased new start.
  • Look into different options.

Clustering Hypothesis

  • Unconscious thought is expected to turn an initial, disorganized set of information into a clearer and more integrated representation of information in memory.

Wednesday, March 2, 2016

The Hook Model

Preface

The book, “Hooked: How to Build Habit-Forming Products”, is one of my favorites as it provides a well-structured model in building something people addict to. Impressively, for me, it pointed out the problems I had faced while building new things, and explained reasons behind.

This post is my study note of reading the book.

Why Habit

Habits are “behaviors done with little or no conscious thought”. By forming a habit for users in using the product, the company can gain following benefits:
  • increasing customer lifetime value (CLTV)
  • providing pricing flexibility
  • supercharging growth: people are more likely to share
  • sharpening the competitive edge: products that change customer routines are less susceptible to attacks from other companies

Habit Zone

  • frequency: how often the user us the product
  • preceived utility: how useful and rewarding the behavior is in the user’s minde over alternative solutions
Habits cannot form outside the habit zone.

“Are you building a vitamin or painkiller?”

Answer: “Successful products or services seem at first to be offering nice-to-have vitamins, but once the habit is established, they provide an ongoing pain remedy.”

Notice: not all the products or services need to form habits, ex. insurance products.


1. Trigger

External

External triggers are embedded with information which tells the user what to do next.
  • paid triggers: advertising / search engine marketing (habit-forming companies tend not to rely on paid triggers for very long)
  • earned triggers: favorable press mentions, hot viral videos, and featured app store placement (require investment in the form of time spent on public and media relations)
  • relationship triggers: one person telling others about a product or serivce (a highly effective external trigger for action)
  • owned triggers: app icon, email newsletter, subscribe (prmopt repeat engagement until a habit is formed)

Internal

Internal triggers are attached to existing behaviors and emotions.
  • when users form habits, they are cued by internal triggers
  • designer must know their user’s internal trigger (the pain they seek to solve)
  • “we often think the Internet enables you to do new things, but people just want to do the same things they’ve always done.”
  • what people say they want (declared preferences) are far from what they actually do (revealed preferences).
  • “user narratives”: “5 Whys Method” (keep asking whys)
  • negative emotions frequently serve as internal triggers

2. Action

The Fogg Behavior Model


B = MAT

  • [M] motivation: the energy for action (seek pleasure or avoid pain), and the right motivators create action by offering the promise of desirable outcomes
  • [A] ability: simply start removing steps until you reach the simplest possible process
  • [T] Trigger: mentioned above
To pick from M, A, T: always start with ability.

Ease / Simple

Influence simplicity:
  • time
  • money
  • physical
  • brain cycles
  • social deviance (how accepted the behavior is by others)
  • non-routine (how much the action matches or disrupts existing routines)
Good examples
  • logging in with facebook
  • sharing with the twitter button
  • searching with google
  • taking photos with the apple iphone
  • scrolling with pinterest

Brain Biases (Heuristics and Perceptions)

Heuristics are shortcuts we take to make quick decisions.
  • the scarcity effect: the appearance of scarcity affected their perception of value (“n items left” tags on Amazon)
  • the framing effect: the mind takes shortcuts informed by our surrounding to make quick and sometines erroneous judgments (ex. famous violin player at subway)
  • the anchoring effect: people often anchor to one piece of information when making a decision (buy more not always cheaper)
  • the endowed progress effect (profile strength interface on Stack Overflow)
Note: Mental Notes help designers build better products through heuristics.

3. Variable Award

Without variability, we are like children in that once we figure out what will happen next, we become less excited by the experience.

Many habit forming products offer multiple types of variable rewards:

Type: The Tribe

Fueled by connectedness with other people
Our brains are adapted to seek rewards that make us feel accepted, attractive, important, and included.
Ex.
  • Facebook like / comment / share
  • Stack Overflow: contributing to a community (no one knows how many will be received from the community when responding to a question)

Type: The Hunt

The search for material resources and information
The need to acquire physical objects, such as food and other supplies that aid our survival, is part of our brain’s operating system.
Ex.
  • machine gambling
  • Twitter (users scroll and scroll and scroll to search for variable rewards in the form of relevant tweets)
  • Pinterest (cut-off pictures at bottom)

Type: The Self

The search for intrinsic rewaords of mastery, competence, and completion
Their self-determination theory espouses that people desire, among other things, to gain a sense of competency (peosonal form of gratification).
Ex.
  • video games: master the skills, desire for competency by showing progression and completion
  • email: mastery, completion, and competence moves users to habitual and sometimes mindless actions

Important Considerations

Variable Rewards Are Not a Free Pass
Mahalo.com: found that people didn’t want to use a Q&A site to make money; however, Quora: social rewards work.

Only by understanding what truly matters to users can a company correctly match the right variable rewrds to their intended behavior.

Maintain a Sense of Autonomy
“But you are free to accept or refuse”
  • If failed: Reactance, the hair-trigger response to threats to your autonomy.
  • Too many companies build their products betting users will do what they make them do instead of letting them do what they want to do.
  • Companies that successfully change behaviors present users with an implicit choise between their old way of doing things and a new, more convenient way to fulfill existing needs
Beware of Finite Variability
“Predictable after use”
Experiences with finit variability become less engaging because they eventually become predictable.
Ex.
  • FarmVille: CityVille, ChefVille, FrontierVille, … failed (new games were not really new at all)

4. Investment

The more users invest (time, data, effort, social capital, money, etc.) into a product or service, the more they value it. The reasons are:
  • we irrationally value our efforts (IKEA effect: people tend to like things they build on their own)
  • we seek to be consistent with our past behavior
  • we avoid cognitive dissonance
Notice: Asking users to do a bit of work comes “after” users have received variable rewards, not before.

Storing Value

  • content: memories and experiences, ex. itunes collection
  • data: information generated, collected, created by users, ex. songs, photos, news clippings
  • followers: ex. Twitter
  • reputation: monetizable, ex. vender reputation on eBay, TaskRabbit, Yelp, Airbnb, etc
  • skill: once users have invested the effort to acquire a skill, they are less likely to switch to a competing product, ex. photoshop
If users are not doing what the designer intended in the investment phase, the designer may be asking them to do too much.

Loading the next trigger

Habit-forming technologies leverage the user’s past behavior to initiate an external trigger in the future (reengage the user).

The Morality of Manipulation

Instead of asking “can I hook my users?”, we should ask: “should I attempt to?”

The Facilitator

Healthy habit.
If you find yourself squiming as you ask yourself these queations or need to qualify or justify your answers, stop! you failed.”
In building a habit for a user other than you, you can not consider yourself a facilitator unless you have experienced the problem firsthand.
Build the change they want to see in the world

The Peddler

Altruistic.
Would I actually find this useful?” the answer to this uncomfortable question is nearly always no, so they twist their thing until they caan image a user they believe might find the ad valuable.
Peddlers tend to lack the empathy and insights needed to create something users truly want.
Often the peddler’s project results in a time-wasting failure because the designers did not fully understand their users.
Beware of the hubris and inauthenticity

The Entertainer

Art is often fleeting; products that form habits around entertainment tend to fade quickly from users’ lives.
Entertainment is a hits-driven business because the brain reacts to stimulus by wanting more and more of it ever hungry for continuous novelty.

The Dealer

The only reason the designer is hooking users is to make a buck.
Ex. casinos and drug dealers.

Habit Testing (Existing Products)

Building a habit-forming product is an iterative process and requires user-behavior analysis and continuous experimentation.

Step 1: Identify

Dig into the data to identify how people are using the product.
Who are the product’s bahitual users?” (the more frequently your product is used, the more likely it is to form a user habit)
Don’t come up with an overly aggressive prediction.

Step 2: Codify

Codify these findings in search of habitual users to generate new hypotheses, study the actions and paths taken by devoted users.
You are looking for a Habit Path - a series of similar actions shared by our most loyal users.

Step 3: Modify

Modify the product to influence more users to follow the same path as your habitual users, and then evaluate results and coninue to modify as needed.

Discovering Habit-forming Opportunities

Creating a product the designer uses and believes materially improves people’s lives increases the odds of delivering something people want. Pual Graham advises entrepreneurs to leave the sexy-sounding business ideas behind and instead build for their own needs: “Instead of asking ‘what problem should I solve?’ ask ‘what problem do I wish someone else would solve for me?’”

Enabling technologies

Wherever new technogolies suddenly make a behavior easier, new possibilities are born.

Interface Change

Many companies have found success in driving new bahit formation by identifying how changing user interactions can create new routines.
“Live in the future”: Google Glass, Oculus Rift, Pebble watch, etc.

Quotes

Some nice or interesting sentences I found in the book:
  • Viral cycle time is the amount of time takes a user to invite another user, and it can have a messive impact
  • If you only build for fame or fortune, you will likely find neither. Build for meaning, though, and you can’t go wrong.
  • There’s a pain for the fear of missing out (FOMO).
  • 26 percent of mobile apps in 2010 were downloaded and used only once.
  • Behaviors are LIFO - “last in, first out.”

My Own Thoughts


1. Timing

In the last chapter of the book, the author suggest that we should keep eyes on emerging technologies and seek oppertunities. This remind me a TED Talk, “Bill Gross: The single biggest reason why startups succeed”, where the speaker claimed “timing” is the most important factor of a successful startup company. Both of them hold the same view on believing “timing” is the key of a successful startup.

2. Facilitator for All Team Members?

An interesting question popped up while I was reading the manipulation matrix part. The author suggested that it’s better to work as facilitator, so the maker himself/herself will have a deeper understanding of the product.

However, in real experiences, this might hold true only in the beginning - when there’s only one person on the team. As the project grows, people join into the team, and it’s impossible that everyone suffers from original problem that the team is trying to solve. That is, an designer of a video game startup company doesn’t have to like playing video games.

So, I raised the confliction I found here to one of my friends. She replied that, in a product group, some are facilitators while some are peddlers. For those peddlers, it’s okay that they haven’t experienced the problem the group is trying to solve as long as they agree with the team. That is, the point is whether the team has a same milestone instead of all being facilitators.