Re-reading the Undoing Project

Test 1

Which of the following two gifts do you prefer?

Gift A: A lottery ticket that offers a 50 percent chance of winning $1,000
Gift B: A certain $500

Test 2

Which of the following do you prefer?

Gift A: A lottery ticket that offers a 50 percent chance of losing $1,000
Gift B: A certain loss of $500

This is the isolation effect

The isolation effect occurs when people have presented two options with the same outcome, but different routes to the outcome. In this case, people are likely to cancel out similar information to lighten the cognitive load, and their conclusions will vary depending on how the options are framed.

I am an LBT

LBT = Low Bullshit Tolerance

  1. An overall inability to entertain nonsense – check
  2. Continuously finding the need to roll your eyes at people – nope
  3. Extreme levels of relationship-threatening sarcasm – nope
  4. Experiencing multiple “smh” worthy moments, within the same day – check
  5. Very short attention span to things that don’t directly concern you – check

View at

普鲁斯特问卷 2019.01

























































理想的时间安排:(28, 34, 38)

每周七天,除去每天睡觉八小时之外,一共有 112 小时。今天,我找到了最理想的安排这 112 小时的方式。

休闲娱乐:31 小时(28%)


  • 周一到周五:每天三小时
  • 周末:每天八小时

健康起居:39 小时(34%)


  • 周一到周五:每天 4.5 小时 (其中 1.5 小时用来锻炼)
  • 周末:每天 8 小时

工作:42 小时(38%)



Created my first R package

Sometimes MVP is the key.

I’ve been wanting to learn to create my own R package for a while. Four months ago my goal was to create my first R package by end of June. Two days ago I gave it another try and started reading Hadley Wickham’s great book “R Packages”. However the book covered much more than what I needed, namely, to just create an R package and go.

This morning I spent an hour to create an R package following instructions from Hilary Parker. Now it’s officially done!

Next, I’ll grab my favorite functions and put them in a real package on github..

An Application of CDIFTT


Today I applied th so-called CDIFTT: Cross Desert Interstate Following Truck Technique. It proved to be successful, since I am alive and kicking right now. I indeed felt lucky having landed at home after a stressful day, which started from the morning.

I woke up at 8am after 5 hours sleep, which was short for a person who usually prefer to sleep for 9 hours. Thinking of the forthcoming 5 hours driving, I thought to myself, “I’m too old for that.” Nonetheless it was unavoidable.. I prepared myself for the trip, or that I thought so, over one cigarette, two cookies, three pieces of fruits, and four cups of coffee. Right after I set up, I found myself quite unreadily on a windy road cross desert where the wind practically blew my car from all directions and sounded scarily loud outside the windows no matter how much louder I turned on the music. The first hour was the hardest, since I was totally unprepared for such a driving condition. To make things worse, my stomach started to feel funny, and there was a kind of headache emerging from the back of my head. Eventually, I had to make an early stop when only less than one fourth of the trip was covered. I took myself to a Kentucky for a meal, and the mountaindew proved to be useful, since at that time, I was shaking from head to tail and felt fragile like a piece of glass. It was about noon and I was in the middle of an unknown highway town in New Mexico, watching the mid- day desert sunshine listening to the wind blowing outside the Kentucky. By the time I finished the two piece chicken meal, I felt much better, at least energy-wise, and kind of figured out what I should do in the rest of the trip. This was when I started the Following Truck Technique and brought myself home safely through this practice. Thinking back, I made the following list of plausibilities of the FTT:

1. On the interstates cross deserts, the highway limits are generally 75 miles per hour, while a car of my size driving at that speed already feels shaky in the wind. It is hence safer if I kept the speed around 70 miles per hour, which is exactly the speed of most trucks.

2. The trucks are very followable since they tend to keep the speed for a long while. Also in the desert area there is no heavy traffic, which makes it easier for the trucks to keep their speed.

3. It is psychologically comfortable to feel the heavy wind being partially blocked by the big thing, the truck, in front of me. What is more, having the sight of endless roads and far-away mountains blocked partially, one feels less hopelessly endless and long with the journey.

4. It is easy to follow a truck since they keep a constant speed so that I can temporarily speed up a bit till I settle down behind a truck with a comfortable distance.

The list may be extended. Today I followed some five trucks over two thirds of the trip. It might be worth mentioning that there were a few trucks that I lost since they were too fast for me to catch up with… I stopped following trucks during the last part, for about 80 miles, when getting closer to home. The end of driving was fast and easy, as always. Still, I found it hard to control the speed at a comfortable level by myself without using the FTT, which confirmed my observation that driving on a windy day, following a truck on a cross desert interstate is just the best thing that one can do!

说说 real-time TeXing



后来我发现这个教授现场打字的能力超强,好比他组织开一个 town-hall 会议让大家给数学系的将来提建议意见,大家畅所欲言的时候,他用 Word 现场打字并且排版,当然都放到大屏幕上给所有人看见,与此同时还主持会议和回答问题(所以经常是自己一边说一边记录自己的回答)。

我受到他的启发,也想试试开发自己这个能力。本着本人说做就做的习惯,尝试的方法就是上课回答学生问题的时候一边说话一边用 LaTeX 画个 diagram(我一直用 LaTeX 写好 slides 来教课,所以上课的时候电脑是一直连着大屏幕的,只要随手打开一个编译器输入就可以了)。尝试了几下感觉不错,让学生觉得跟变戏法一样的好玩也是提高他们兴趣的一个方法,当然 LaTeX 的输出也挺简洁有效的。

比较大型的一次尝试,是有一个学期参与一个实验教学项目,和一个资深高中教师教很多初中教师,我负责听课和帮忙,于是顺手把所有讲课过程都给敲了下来,那些学生还特别喜欢发言,我做的笔记于是有点像法庭记录,基本上是【谁】说了什么什么,然后【谁】又说了什么什么。当然内容都是很数学的,有时还要现场临摹有人随手在白板上画的 diagram,大家三言两语说得激烈或者 diagram 复杂的时候,我这敲字还真不那么容易呢。本来我倒是用这个做一个尝试和锻炼就算了,没想到后来还证明有用 —— 那年假期我接到任务,开始考虑把这个实验课程给变成教科书一样的内容,于是我拿出所有听课笔记,编辑整理剪切添加,折腾了一个假期,还真弄了一本很像书的成果出来。至于后来在那个基础上跟另外一个资深教师改编、演绎,重新设计了一堆教案演变成 beamer 形式的课件,那又是另外一回事了。

总而言之,在这些不断的小小挑战里,我被迫学会了快速用 LaTeX 做笔记的能力,其中包括许多小的 tips and tricks —— 可惜那时觉得将来反正不会忘的,不知道记录下来,其实现在都忘干净了。

最近开会的时候,只会默默打开 Mou 用 markdown 写写啦。真是退化啦。









2014 年七月写的 learning plan

My Learning Progress Plan

In 2014 Q3 I want to get comfortable with doing data science in the open source setting. This means covering a big ground with pieces of knowledge here and there, while focusing on using Python and R for mathematical computing and statistical modeling. I will read webpages / articles / books to get started with AWS, Hadoop, and Ruby, while using these resources to dive deep into machine learning algorithms. Text mining is going to be provide tremendous value to our business because of our setting, so I have and will be focusing on reading those.

2014.07 Start learning by doing. Conduct basic analysis. Start writing data dictionary. Small sample of data warehousing.
2014.08 Data warehousing in scale for a particular set of questions. Lay out the ground for opportunity scoring.
2014.09 Data warehousing in scale. Initial modeling of opportunity scoring done.

2014 Q3 learning goals (numbers are proficiency achieved out of a scale from 1 to 10)
Python [4] – Comfortable with simple tasks. Basic proficiency munging data using Pandas library.
R [4] – Statistical modeling. Text mining. Be more familiar with frequently used machine learning algorithms and their applicability to our data.
Machine learning [4] – Along with R.
AWS [2] – Comfortable working in the cloud. Find fast way to process the data into reasonable format. Build data warehouse.
Hadoop [2] – Basic knowledge of different solutions. Identify the long term coding tool for big data.
Ruby [1] – Basic knowledge of syntax structures. Efficient reader of the codes.

In 2014 Q4 My personal learning of Python and R will keep progressing, and I will take a 2-week vocation in Oct to Nov. While keeping doing what is started in Q3, I’d like to have a focus of (1) building a data warehouse and (2) finding a big data solution so that more detailed activities can be carried out much faster, and the whole company will eventually benefit from gaining data-driven insights.

2014.10 Data warehousing in scale. Evaluation and presentation of opportunity scoring. Identify next data mining projects.
2014.11 Data warehousing in bigger scale.
2014.12 Data warehousing in reasonable shape to enable quick retrieval of KPIs company wise.

2014 Q4 learning goals
Python [6] – Proficient using python for data munging and basic data analysis. Dive into modeling. Basic proficiency with general python usage.
R [6] – Statistical modeling. Text mining.
Machine learning [6] – Along with R.
AWS [3] – Comfortable working in the cloud.
Hadoop [3] – Implementation of big data solutions.
Ruby [2] – Read codes.