<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
   xmlns:html="http://www.w3.org/1999/html"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
   <title>Tung Wai Yip's blog</title>
   <link>http://tungwaiyip.info/blog</link>
   <description>Tung Wai Yip's blog</description>
   <language>en</language>
   <copyright></copyright>
   <ttl>60</ttl>
   <pubDate>Mon, 07 May 2012 07:00 GMT</pubDate>
   <managingEditor></managingEditor>
   <generator>PyBlosxom http://pyblosxom.sourceforge.net/ 1.3.2 2/13/2006</generator>
<item>
   <title>Forget About The Fog. Bring Sunglasses, Sunscreen When You Visit San Francisco</title>
   <guid isPermaLink="false">2012/2012-05-07_forget_about_the_fog_bring_sunglasses_sunscreen_when_you_visit_san_francisco</guid>
   <link>http://tungwaiyip.info/blog/2012/05/07/forget_about_the_fog_bring_sunglasses_sunscreen_when_you_visit_san_francisco</link>
   <description><![CDATA[
<p>
Dolores Park on Sunday is perfect. The beautiful sunshine, the gorgeous view to the downtown, the newly completed children playground swarming with running kids. Everyone is having a blast. What a lovely day it is!
</p>


<img class="center_layout" src='/2012/img/dolores_park.jpg' alt="Dolores Park"/>
<p style="text-align:center">Dolores park (<a href="http://www.flickr.com/photos/jamison/3955664025/in/photostream/">Jamison Wieser</a>)
</p>

<p>
The only issue, ouch! Barely an hour under the sun is enough to get me sunburn. I know. I should have put on sunscreen. I have a tube with me but I just didn't expect such short exposure will do me any harm. This is a mistake I would have made many times.
</p>

<p>
But where is the San Francisco fog? The weather condition that the city is so well known for? A city shrouded in dense and cool fog. Foghorn blows the deep and the ghostly sight of cargo ship slowly emerge from the mist. The reputation of San Francisco fog spread so far that sometime visitors would ask for advice to plan around fog. How should they prepare themselves in the foggy weather. Bring umbrella? Trench coat? This is good for building up film noir atmosphere, but what you need in San Francisco is actually sunglasses and sunscreen.
</p>

<p>As it turns out, San Francisco is one of the most sunny city in United States. It is not my wishful thinking. It is sunny according to <a href="http://www.worldfactsandfigures.com/weatherfacts/numbersunny_city_desc.php">meteorologists' statistics</a>. 160 sunny days a year put it among the top most sunny cities. It even ranks favorably to the sunshine state of Florida, which is actually rather cloudy.
</p>

<p>But what about the fog that engulf the city so often? It is of course no illusion. We residents experience it regularly. People who knows about San Francisco may point out to the effect of microclimate. Areas close to each other may experience dramatically different climate due to different geographic features like hills and valley. In general it means the coastal side is far more foggy than the bay side. To a visitor, it means Golden Gate Bridge and Golden Gate Park can be quite foggy, while Union Square, Embarcadero and the gorgeous Dolores Park are a lot less susceptible.
</p>

<p>The microclimate explains some of the paradox. But what if I say the west side is also rather sunny? You may laugh at me really hard for saying this. That's pretty much people's response when the city of San Francisco announce plan to build a major solar power system on top of the <a href="http://sfwater.org/index.aspx?page=402">Sunset Reservoir</a> a few years ago. Everyone knows it is foggy in the Sunset district. To build a solar system there sounds so absurd that it is widely ridiculed. But wouldn't a professional solar developer have better idea then people who make judgment base on gut feeling? Indeed fog does not come all day to Sunset and it does get quite a bit of sun. According to the developer Recurrent Energy, the solar resource in Sunset is  on average only 15% lower than the sunniest areas of the City and is consider quite good. With this solar power installation, it more than triple the energy San Francisco generate from the sun.
</p>

<img class="center_layout" src='/2012/img/sunset_reservoir.jpg' alt="Sunset Reservoir Solar System"/>
<p style="text-align:center">Sunset Reservoir Solar System (Recurrent Energy)
</p>


<p>
To make sense of the fog city so sunny paradox, it helps to understand a common bias known as <a href="http://en.wikipedia.org/wiki/Base_rate_fallacy">base rate fallacy</a>. Scientists find that people have a tendency, when making judgments of the probability with which an event will occur, to ignore the base rate and to concentrate on other specific information. Overall fog is a rather infrequent phenomenon. But the specific attribute of San Francisco's fogginess affect people's judgment more than the general base rate. To give another example, if city A hails 30 times a year, you will be right to consider it far more prone to hail than other cities. So how likely is it going to hail next Monday? Some people maybe tricked to think it is quite likely. They ignored the fact that hail is a rare phenomenon and even hail prone city A has 326 hail free days.
</p>

<p>Let's not get distracted. Meteorologists say San Francisco is a sunny city. Bring sunglasses and sunscreen to enjoy your the visit. Don't get sunburnt like me.
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Mon, 07 May 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>&amp;D\anger'"+&lt;b&gt;@?!mb Against Code Injection</title>
   <guid isPermaLink="false">2012/2012-05-01_dangerous_bomb_against_code_injection</guid>
   <link>http://tungwaiyip.info/blog/2012/05/01/dangerous_bomb_against_code_injection</link>
   <description><![CDATA[
<p>
I have to build my web app against code injection. I find that the problem requires us to see input string used in several different context.
</p>

<ul>
<li>In HTML/XML as text.</li>
<li>In HTML/XML as an attribute inside the quote.</li>
<li>In URL as query parameter.</li>
<li>In JavaScript to dynamically create or edit DOM elements.</li>
</ul>

<p>In each context, there are different rule in escaping them. Since the data can move from one context to another, they have to be properly escaped in all cases.
</p>

<p>To help test for proper escaping, I have come up with a string that has lots of special characters below. Put it in your test database and paste it in your input fields. Observe if this causes problem anywhere. In properly escaped system, the string should be transfered and reconstructed verbatim.
</p>

<pre>
  &amp;D\anger'"+&lt;b&gt;@?!mb
</pre>

<p>A related issue is whether your code support unicode correctly. I find it helpful to insert a string below into the test data to test it out right from the beginning.
</p>

<pre>
  \u4e09\u570b\u5fd7 or
  三國志
</pre>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Tue, 01 May 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>The Last of Doyle Drive</title>
   <guid isPermaLink="false">2012/2012-04-29_the_last_of_doyle_drive</guid>
   <link>http://tungwaiyip.info/blog/2012/04/29/the_last_of_doyle_drive</link>
   <description><![CDATA[
<p>
<img class="center_layout" src='/2012/img/last_of_doyle_drive.jpg' alt="The Last of Doyle Drive"/>
</p>

<p>
The Doyle Drive demolition starts on Friday night. By Sunday morning the old viaduct is already reduced to toppled piles. The replacement Presidio parkway looks great by the way.
</p>


]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Sun, 29 Apr 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>讀道德經</title>
   <guid isPermaLink="false">2012/2012-04-25_laozi</guid>
   <link>http://tungwaiyip.info/blog/2012/04/25/laozi</link>
   <description><![CDATA[
<p>讀完老子《道德經》的全文。我的古文水平麻麻，為何突然要讀這部道家經典呢？事緣我無意發現陳鼓應《老莊新論》一書，書中他用西方哲學概念來分析道家哲學。我從前對中國哲學不是不明白就是沒有興趣，但是用他的角度來理解古人思想，令我恍然大悟，對道學另眼相看。《老莊新論》是討論老莊經典的書，我從未讀過老子，只從書中引述的章節間接接觸原著，有隔靴搔癢的感覺。《道德經》不過5000多字，於是決定一鼓作氣，不管自己文化根底有限，發力將原著連同評論一併讀完。讀後覺得甚有得著，所以在此把學到的紀錄一下。</p>

<p>未開始前我先得交代慚愧的事，《老莊新論》是我1996年買的。那時興致勃勃，一直想一有時間就會讀。這樣等著等著，書一直擱在書架上，轉眼竟然擱了15年！今日才終於開卷，算是未為晚也吧。
</p>

<img class="center_layout" src='/2012/img/dao_word_cloud.jpg' alt="Laozi Word Cloud" / >
<p style="text-align:center"><b>道德經 Word Cloud</b><br />
www.tagxedo.com</p>

<p>老子所說的「道德」和平常用語指的道德倫理有所不同，「道」是指老子以為的宇宙規律。陳鼓應對老子思想有很清晰的概論：</p>

<blockquote style="clear: both">
「老子哲學的特異處，就在於突破了（中國哲學）這一局限，把人類思考的範圍，由人生擴展到整個宇宙。他看人生種種問題，乃從宏觀出發，而又能微觀地作多面的審視。
</blockquote>
<blockquote>
老子的整個哲學系統的發展，可以說是由宇宙論伸展到人生論，再由人生論延伸到政治論。然而，如果我們了解老子思想形成的真正動機，我們當可知道他的形上學只是為了應合人生與政治的要求而建立的。」
</blockquote>


<p>
老子哲學的最重要觀念為「自然無為」，「虛靜」和「柔弱」。我相信從古至今，他的思想都是反主流的，被評為是消極和逃避的。因為世人多用主流觀念來評價道學，而要真正理解它是必須超越平常思想的局限。《老莊新論》所做到的就是開放眼界，引導我們用新思維來理解道家學說。
</p>

<p>
老子認為任何事物都應順應它自身的情況去發展，不必以外界的意志去制約它。他從觀察山水萬物的發展得出這樣的結論，而我就從現代科學的認識來印證他的哲學。科學令我體會到自然是如何偉大，而人為意志的是如何渺小，這正是符合老子所提倡「自然無為」的概念。Complexity Science對我影響尤甚，用complex system的方法來分析各種事物，無論是氣候、生物、社會組織等均可見這些系統是如何奧妙，要用人力控制殊不容易。生命就是一個極奇妙的complex system，如何由基因發展成人，我們所知的還是很少，但每一項新的科學發現都令我們更欣賞自然的奧妙。一般人以為有病看醫生就是請醫生檢查，吃藥然後得以復原。然而醫學界對藥物之類的療法有個術語叫Medical Intervention，即是用醫藥科技來干擾人體。用干擾一詞是強調醫藥治療是不自然，可能會付出代價的。如果身體出了大問題不得已才用科技來干擾它，要是小事就寧可不去干擾了。小兒幾次傷風感冒看醫生，醫生檢查過認為無大礙，就叫回家休息行了，亦沒有下藥。這不是因為醫生不盡力，而是他明瞭自然的免疫系統才是療病的最大功臣。與其去干擾它，不如臥床養病，讓免疫系統自然地發揮功能為上。這就是老子「無為而無不為」的意思。
</p>

<p>
在日常生活當中有很多可以應用道學的地方，譬如我覺得做父母也應該「無為」一點。現代父母是太緊張孩子的發展了，為了孩子成功事事主動幫忙。但是孩子每次遇到困難有大人幫忙，不是害他失去學習機會，將來養成依賴的性格嗎？我有時嫌小孩做事太慢或者搞得太亂想幫手，想來也應該克制下。無為並不是不管教的意思，而是認識每個孩子都有潛在能力，父母應做的是消取障礙讓他們有嘗試的機會，過份干預反而會壓抑自然發展。最理想是做到「我無為，而民自化」，不用刻意教導而使孩子自己摸索出道理。
</p>

<p>
陳鼓應在篇末對老子作出一連串批評，譬如老子常用類比法(analogy)來建構論據，邏輯甚為脆弱。我覺得他的批評十分中肯，而這反而更能令我接納道家哲學。正是因為這些批評，解除了要以他作為古代聖賢，要全面擁戴的束縛。老子固然是開創了道學的偉人，但古人的思想用今日的科學邏輯標準來看自然是錯漏百出。讀書不能一字不漏照單全收，而是要批判地過濾不適用的部分以提取有用的精華。
</p>

<p>
譬如老子說人應該「柔弱不爭」，大家一定覺得這是很蠢的，是退縮和不長進的做法，在這強調競爭的社會根本是不可行的。那麼我們就靈活一點好了，不要單純地天天不爭，事事不爭。另一方面大家可曾細心留意過自己或者身邊的人常執著於無謂的爭執呢？有時是爭持不下，有時是勝了一仗，但雙方從此結怨，以後得不償失。這正是採納「不爭」思想的良機。不作無謂的鬥爭並不是消極被動，而是走出困局，開創新局面的靈機。
</p>

<p>
我是因為老子的批評而更接納它，這不是道學認為萬物皆有反面的例證嗎？
</p>


]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Wed, 25 Apr 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>OnTrak Journal</title>
   <guid isPermaLink="false">2012/2012-04-20_ontrak_journal</guid>
   <link>http://tungwaiyip.info/blog/2012/04/20/ontrak_journal</link>
   <description><![CDATA[
<!-- center image -->
<img class="center_layout" src='/2012/img/Muni38.png' alt="38 Geary" / >

<p>
I have started a new blog as a journal to the work I'm doing in the <a
href="http://ontrakinfo.wordpress.com/">OnTrak project</a> to analysis public
transit information. I'm making progress slowly but it is surely a fun project.
</p>


]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Fri, 20 Apr 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>Learning Journal - Presbyopia</title>
   <guid isPermaLink="false">2012/2012-04-17_presbyopia</guid>
   <link>http://tungwaiyip.info/blog/2012/04/17/presbyopia</link>
   <description><![CDATA[
<p>Unfortunately I seems to start to suffer from this.</p>

<p><a
href="http://www.ncbi.nlm.nih.gov/pubmedhealth/PMH0002021/">Presbyopia</a> is a
condition in which the lens of the eye loses its ability to focus, making it
difficult to see objects up close.
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Tue, 17 Apr 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>Learning Journal - Personal Fable</title>
   <guid isPermaLink="false">2012/2012-03-24_learning_journal_-_personal_fable</guid>
   <link>http://tungwaiyip.info/blog/2012/03/24/learning_journal_-_personal_fable</link>
   <description><![CDATA[
<p>This is my new experiment. I'm taking short note on things I've learned. The first entry is personal fable.
</p>

<p>
<b><a href="http://en.wikipedia.org/wiki/Personal_fable">Personal fable</a></b> - a term coined by David Elkind (1967) that is used in psychology to describe a form of egocentrism normally exhibited during early adolescence, and it is characterized by an over-differentiating of one's experiences and feelings from others to the point of assuming those experiences are unique from those of others. A person might believe that they are the only one who can experience whatever feelings of joy, horror, misery, or confusion they might encounter.
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Sat, 24 Mar 2012 07:00 GMT</pubDate>
</item>
<item>
   <title>Census of Children Population in San Francisco (2nd trial)</title>
   <guid isPermaLink="false">2012/2012-03-09_census_of_children_population_in_san_francisco_(2nd_trial)</guid>
   <link>http://tungwaiyip.info/blog/2012/03/09/census_of_children_population_in_san_francisco_(2nd_trial)</link>
   <description><![CDATA[
<p>
I just realize the chart I have made for on the <a href="http://tungwaiyip.info/blog/2011/06/23/sf_children_flee_city_before_entering_school_census_data_shows">census data of San Francisco's children</a> was done badly. Here is my second trial. I thing this should be more clear. The key take away is San Francisco lost a big percentage of children in the 0-5 group after 5 years, but not so much on the older age group.
</p>

<div style="width: 700px;">
<img class="center_layout" src='/2012/img/census_children_population.png' alt="census children population"/>
</div>

<br />

<div style="width: 700px;">
<img class="center_layout" src='/2012/img/census_children_population_percentage.png' alt="census children population percentage"/>

</div>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Fri, 09 Mar 2012 08:00 GMT</pubDate>
</item>
<item>
   <title>Fanny and Alexander</title>
   <guid isPermaLink="false">2012/2012-03-08_fanny_and_alexander</guid>
   <link>http://tungwaiyip.info/blog/2012/03/08/fanny_and_alexander</link>
   <description><![CDATA[
<p>This is a continuation of the my <a href="http://tungwaiyip.info/blog/2011/11/12/la_maison_en_petits_cubes">7 great movie series</a> that I thought I will do in a week. It really takes much longer. But as least the movies are good. And I think that's what really matters!
</p>

<p>
Ingmar Bergman's Fanny and Alexander is saga of a rich family the Ekdahls. I am particular impressed by the confrontation scene between Alexander and the Bishop. The Bishop, whom Alexander never have much affection with, becomes his step father when he marries his widowed mother. Alexander has mischievously made up a rumor about the Bishop mistreating his former wife. His maid informed the Bishop, which leads to the inquisition scene. Being a man of honor the Bishop clearly consider this a serious defamation. Alexander flat out deny he has made such accusation. The denial has took the Bishop by surprise. How dare would Alexander lie in front of everyone? So the Bishop escalates the pressure, making Alexander swear with his hand on the bible and explain that any further lying will be considered perjury, a very serious crime. In every step Alexander just dig himself deeper into a hole. This leads to his final breakdown and the severe punishment.
</p>

<p>The power of this scene is that we can follow each character's mind and see how end step lead to this explosive end. The Bishop is no ordinarily villain. In fact he is completely right. It maybe somewhat harsh to apply his institutional power on a kid. But we also see how Alexander's willfulness provoke him. The Bishop told him he consider himself wise and fair, why does Alexander hate him? Again he is right, it is fair to say he is wise and fair even if he is also cold and dull. It is a thought provoking exercise to try to make sense of the conflict. How someone seemingly making every right step will come out so wrong.
</p>




]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Thu, 08 Mar 2012 08:00 GMT</pubDate>
</item>
<item>
   <title>Hang Hang and Mammy on TV</title>
   <guid isPermaLink="false">2012/2012-01-17_hang_hang_and_mammy_on_tv</guid>
   <link>http://tungwaiyip.info/blog/2012/01/17/hang_hang_and_mammy_on_tv</link>
   <description><![CDATA[
<p>
Hang Hang and mammy got on ABC news tonight. They show up at 1:21 in the video
when the narrator says "mothers bundle up their babys". The shoot lasted for a
grand total of, well, 2 seconds. Next time we will work on having some actual
dialog :)
</p>

<object id="otvPlayer" width="400" height="268"><param name="movie" value="http://cdn.abclocal.go.com/static/flash/embeddedPlayer/swf/otvEmLoader.swf?version=&station=kgo&section=&mediaId=8509086&cdnRoot=http://cdn.abclocal.go.com&webRoot=http://abclocal.go.com&configPath=/util/&site=" ></param><param name="allowScriptAccess" value="always"></param><param name="allowNetworking" value="all"></param><param name="allowFullScreen" value="true"></param><embed id="otvPlayer" width="400" height="268" type="application/x-shockwave-flash"	allowscriptaccess="always" allownetworking="all" allowfullscreen="true"	src="http://cdn.abclocal.go.com/static/flash/embeddedPlayer/swf/otvEmLoader.swf?version=&station=kgo&section=&mediaId=8509086&cdnRoot=http://cdn.abclocal.go.com&webRoot=http://abclocal.go.com&configPath=/util/&site="></embed></object>


]]></description>
   <category domain="http://tungwaiyip.info/blog">/2012</category>
   <pubDate>Tue, 17 Jan 2012 08:00 GMT</pubDate>
</item>
<item>
   <title>Atonement</title>
   <guid isPermaLink="false">2011/2011-12-25_atonement</guid>
   <link>http://tungwaiyip.info/blog/2011/12/25/atonement</link>
   <description><![CDATA[
<p>
Atonement is one melancholy film that captivates me. It opens in the Tallis castle. Cecilla and Briony, the aristocrat sisters, both have a crush on the house keeper's son Robbie. When the disenchanted young girl Briony made a false statement against Robbie, she did not know her action will bring ruin to Robbie and cause him to be convicted of a crime that he did not commit.
</p>

<p>The story fast forward to world war II. The war effort has interrupted their cloistered life and bring down the distance between the aristocrats and lay people. Robbie was send to fight in France. And both sister volunteered to work as nurses. Cecilla and Robbie has a reunion before he was sent off. These brief episodes becomes a yearning that stay with them, with Cece's call to "come back to me" a recurring voice that stay with him.
</p>

<!-- center image -->
<img class="center_layout" src='/2011/img/atonement.jpg' alt="Atonement"/>

<p>
I have seen the movie about four times and know almost every scene. The Dunkirk retreat scene is a work of mastery. Demoralized soldiers loosing their discipline while waiting for evacuation. Ruins are everywhere. Horses were shot and equipment being destroyed. The whole apocalyptic scene was done in one long sweeping shot.
</p>

<p>A lot of scenes are played twice in the movie. Sometimes it shows us something new by looking at things at a different angle. Mostly it offers us plenty of opportunities for retrospection, plenty of what-if contemplation. When we see lovely scenes that we wish would have happened, it brings up great emotional feeling with a lot of depth.
</p>


]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Sun, 25 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>Home Power Usage</title>
   <guid isPermaLink="false">2011/2011-12-24_home_power_usage</guid>
   <link>http://tungwaiyip.info/blog/2011/12/24/home_power_usage</link>
   <description><![CDATA[
<p>I have bought the Kill A Watt meter a while back. I went on to measure every
gadget and applicances I can possibly measure. Here is some result to share.
</p>

<table>

<tr>
<th>Wattage</th>
<th>Appliance</th>
</tr>

<tr>
<td>0W</td>
<td>
Clock Radio 1<br />
Stereo off<br />
TV off<br />
LCD monitor off
</td>
</tr>

<tr>
<td>1-5W</td>
<td>
Fax machine standby <br />
Mac Mini sleeping <br />
Wifi router <br />
Charging small gadget <br />
Inkject printer idling <br />
clock Radio 2
</td>
</tr>

<tr>
<td>6-10W</td>
<td>
Stereo playing Radio<br />
DSL Router<br />
</td>
</tr>

<tr>
<td>11-25W</td>
<td>
Stereo playing CD<br />
Laptop 1  <br />
15" LCD monitor  <br />
Compact Florescence tube  <br />
Space header (fans only)  <br />
Mac Mini On (+8W when playing DVD)  <br />
Motorola Set-top box (use same amount of power whether on or off)
</td>
</tr>

<tr>
<td>20-60W</td>
<td>

Core i5 laptop <br />
<ul style='margin-top:0;'>
<li>0-1W while sleeping </li>
<li>6W recharging while sleeping </li>
<li>20W when idle </li>
<li>Power use increase when charging other devices or running many applications</li>
</ul>
</td>

<tr>
<td>30W</td>
<td>10cu ft refrigerator (24 hour avg)</td>
</tr>

<tr>
<td>46W</td>
</td>
<td>Water Boiler & Warmer (24 hour avg)<br />
Compact refrigerator (24 hour avg)
</td>
</tr>

<tr>
<td>70W</td>
<td>
32" LCD TV
</td>
</tr>

<tr>
<td>340W</td>
<td>space heater (24 hour avg)</td>
</tr>

</table>

<p>My main observation is the concern on power usage by electronic gadgets, and
also the phantom watt issue, that is gadget continue to draw power when they are off,
is largely overblown. Most sustain on just about 1 watt of power. The only rogue
applicance is the set top box that uses 18W whether it is on or not. Even that
is only 18W. In fact all the electronic gadgets added together does not match thw
power usage of one space heater. This is evident in my skyrocketing winter power
bill (or in hotter climate, the summer air conditioning cost).
</p>

<p>Another interesting find. My new refrigerator uses 50% less electric than a
much smaller but dated compact refrigerator. At this rate, it will actually come
very close to the estimated annual electric cost of $38 that is posted in the
tag in the store.
<p>




]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Sat, 24 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>Rivers And Tides</title>
   <guid isPermaLink="false">2011/2011-12-23_rivers_and_tides</guid>
   <link>http://tungwaiyip.info/blog/2011/12/23/rivers_and_tides</link>
   <description><![CDATA[
<!-- right image -->
<img class="left_layout" style='margin-right:1.5em;' src='/2011/img/rivers_and_tides.jpg' alt="River and Tides" />

<p>
Sinuous rivers, pods make of rock slabs, a circular hole, these are some of the
recurring forms artists Andy Goldsworthy use in his sculptures. He create his
arts inspired and situated in a natural setting. They are often ephemeral. A
string of flower petals flowing down the stream, driftwood on the beach to be
washed away by rising tides, ice that is going to vanish without a trace. They
may seem impermanent. And yet it perfectly symbolize the flow of the nature. In
this documentary you will see the creation of many works by Andy Goldsworthy.
They are really very inspiring.

</p>




]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Fri, 23 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>Snow Park</title>
   <guid isPermaLink="false">2011/2011-12-18_snow_park</guid>
   <link>http://tungwaiyip.info/blog/2011/12/18/snow_park</link>
   <description><![CDATA[
<!-- center image -->
<img class="center_layout" style='margin-top:1ex;margin-bottom:1ex;' src='/2011/img/snow_park550.jpg' alt="Snow Park"/>


<p style="clear: both">
We have much fun in the snow park in civic center this afternoon. There are sled ride for the kids. They can make snow man in a patch of artificial snow. Like a typical day of activity, kids are tireless, parents are tired.
</p>



]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Sun, 18 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>Book Reading Statistics</title>
   <guid isPermaLink="false">2011/2011-12-17_book_reading_statistics</guid>
   <link>http://tungwaiyip.info/blog/2011/12/17/book_reading_statistics</link>
   <description><![CDATA[
<p>The Kindler e-reader I got one year ago has sparked a major book reading drive for me. At the end of 2011, I have completed 35 books in a span of 15 months. The full list of book is compiled in the entries of
<a href="http://tungwaiyip.info/blog/2011/04/13/2010_reading_list">Apr</a>,
<a href="http://tungwaiyip.info/blog/2011/09/05/2011_08_reading_list">Aug</a>,
<a href="http://tungwaiyip.info/blog/2011/11/20/2011-11_reading_list">Nov</a>,
<a href="http://tungwaiyip.info/blog/2011/12/15/2011-12_reading_list">Dec</a>.
</p>

<p>Even though the drive is triggered by Kindle, I am far from abandoning paper book for ebook. 17 out of the 35 books I've read are physical books. I have done a lot to clean out the piles book I've purchased but never read. But this is offset by the new paper books I've purchased recently. This drive has also gives me a lot of confidence to tackle long and classical books. It has instilled a discipline in me to follow through a long book to completion. I plan to read <b>Les Misérables</b> and <b>紅樓夢</b> in the coming months.
</p>

<p>Here is a little tally. There are 8 technical (computer science) book, 5 fictions, 5 business and economics books, 4 popular science, 2 academics and 11 are uncategorized.</p>

<p>
I am still stuck with a number of academic books. They can not be read at a fast pace like fictions. There are mathematics to digest, and in other cases, paper or programming exercise to do to really understanding the subject. I queue them up one by one and hopefully can see some result in next year.
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Sat, 17 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>2011-12 Reading List</title>
   <guid isPermaLink="false">2011/2011-12-15_2011-12_reading_list</guid>
   <link>http://tungwaiyip.info/blog/2011/12/15/2011-12_reading_list</link>
   <description><![CDATA[
<p>I have finished 5 more books in my last push in 2011. Many of them are short books however.
</p>

<br />

<p><b>The Question of Separatism</b>
By Jane Jacobs (1980)
</p>

<p>
This short book from great thinker Jane Jacobs takes on the contemporary issue of Quebec separatism. Unlike other discussions on separatism, which is invariably emotion laden, Jane Jacob is making a largely rational and non-partisan argument on the issue that embroils her country.
</p>

<p>
Drawing on the lesson from the peaceful break up of Norway from Sweden in the early twentieth century, she lays down the foundation of an independent Quebec in this book. Ever skeptical on large centralized government and the bureaucracy it brings about, Jane Jacob believes it is possible for an independent Quebec to thrive. Ultimately it can bring economic development and cultural diversity that benefits both itself and the rest of Canada.
</p>


<br />


<p><b>The 4-Hour Workweek</b>
By Timothy Ferriss (2009)
</p>

<p>
After reading Tim Ferriss's 4-Hour Body, I've already decided he is not my favorite writer. But the book has come through the library reservation system after many weeks. So I give it a look anyway.
</p>

<p>
The idea of 4-hour workweek is he shows you how to setup a Internet mail order company, outsource everything you possibly can to service firm, and cut down most of the things you used to do everyday because they are just time waster. When everything works according to his scheme, you will have so much time left that you can travel around the world while money automatically roll into your account with little work required from you.
</p>

<p>There are actually quite a lot of wisdom and good advices in the book. The problem is they are so greatly amplified that they becomes just hot air. His contrarian theories are backed not by evidence or statistics but total self-conviction and a handful of anecdotes. If motivational talk is your thing then this is the book for you.
</p>

<p>
Ferriss is a huge fans of what I'd call <b>strict</b> Pareto principle. The idea is 20% of your work gets 80% of result. The other 80% of work is such waste of time that you should just not do it. I find the best way to practice strict Pareto principle is on his book. Since 80% of the book is going to be useless anyway, I just skim through the other 20%. The result is I've wasted much less time on this book. As least I can claim a small victory base on his method.
</p>

<br />

<p><b>One Day, One Dollar 美國華工田園生涯</b>
By Peter C.Y. Leung (1984，1993)
</p>

<p>
California's Sacramento river delta is a fertile agricultural region. Back in 19th century, Chinese migrant farm labor are instrumental in developing the estuary into productive farms. Chinatowns are booming along the river. They were bustling with activities back in the days.
</p>

<p>Fast forward to 1980. These Chinatowns are in its last days. Most residents have already left. These once bustling towns are only left with a small number of elderlys. To record the history before they vanish, historian C.Y. Leung visited and interviewed the elders and compiled their history into this book.
</p>

<p>Migrant workers recount their story in first person format. They left behind their village in China to escape poverty and found work in farms or packaging factories in the Sacramento delta. They worked really hard to make a living. Some of them are able to move up the economic ladder to become tenant farmer or merchants. Many travel back to China to get marry, but after only a short union, they left the spouse behind and return to California to work. In some case they did not get to see their children after many years.
</p>

<p>This is a fascinating book on a forgotten history. It may be an really obscure book today. But when it is first published, it has received a well deserved recommendation from then California Secretary of State March Fong Yu.
</p>

<br />

<p><b>Programming HTML5 Applications</b>
By Zachary Kessin (2011)
</p>

<p>
This is a short book on programming HTML5 applications. The best is the chapter 2 on JavaScript. It gives a great tutorial on programming JavaScript in functional programming style. Otherwise it is yet another resources on HTML5. I prefer Mark Pilgrim's presentation in his <b>HTML5: Up and Running</b> quite a bit more. (The coverage of this two books actually have little overlapping).
</p>



<br />


<p><img class="right_layout" style="margin-right:1em;"  src='/2011/img/godel_escher_bach.jpg' alt="Gödel, Escher, Bach" /></p>


<p><b>Gödel, Escher, Bach: An Eternal Golden Braid</b><br />
By Douglas R. Hofstadter (1979)
</p>
<p>
This is a fascinating book that probe the nature and limitation of mathematics, artificial intelligence and human mind. It is intriguing but rather difficult book to follow, with concept that involves recursion, self referencing, meta-mathematics and meta-meta-mathematics and so on. Nevertheless it is a rewarding journey that really open your mind. Also it has the best introduction to molecular biology that I've seen anywhere. At least it is the best from the point of view of a computer scientist.
</p>

<p>The book is uniquely brilliant that it intertwine the abstract concept above with the art of Escher and Bach. In fact the author has created his own parable of Achilles and Tortoise and use them and their dialog to reenact the concept he is exploring. His story is written with much talent and highly entertaining.
</p>

<p><b>Gödel, Escher, Bach</b> also has a personal meaning to me. I have stretched the reading of this book over many months. Every night when I try to rock my baby Hangchee to sleep I pick up this book. While I was gently swaying him, my mind is occupied with all these fascinating and entwined idea of Hofstadter. Soon enough Hangchee will get big and not need me to rock him to sleep anymore. But while he was a baby, we read <b>Gödel, Escher, Bach</b> together.
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Thu, 15 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>CAHSR - Hard times are the right time</title>
   <guid isPermaLink="false">2011/2011-12-13_cahsr_hard_times_are_the_right_time</guid>
   <link>http://tungwaiyip.info/blog/2011/12/13/cahsr_hard_times_are_the_right_time</link>
   <description><![CDATA[
<p>Public support for California's high-speed rail project is eroding. The main concern: How can we embark on construction of an infrastructure project of this
magnitude in a time of economic difficulty?
</p>

<p>
"Hard times are the right time. Not only does it create jobs, it makes the cost
of land acquisition and construction cheaper", <a
href="http://www.sacbee.com/2011/12/11/4112777/has-the-time-come-to-derail-high.html">says
Dan Richard</a> of the High-Speed Rail Authority.
</p>
]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Tue, 13 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>My New Work Place</title>
   <guid isPermaLink="false">2011/2011-12-01_my_new_work_place</guid>
   <link>http://tungwaiyip.info/blog/2011/12/01/my_new_work_place</link>
   <description><![CDATA[
<p>
<img class="center_layout" src='/2011/img/my_new_work_place.jpg' alt="My new work place"/>
</p>

<p>
This is my new work place in the financial district. I'm having a lot of fun
with my two large monitors. I look up a bunch of panoramic pictures, aligned the
monitors and then fit the pictures across the monitor as wallpaper :)
</p>
]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Thu, 01 Dec 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>Solve Puzzle While You Are Sleeping</title>
   <guid isPermaLink="false">2011/2011-11-29_solve_puzzle_while_you_are_sleeping</guid>
   <link>http://tungwaiyip.info/blog/2011/11/29/solve_puzzle_while_you_are_sleeping</link>
   <description><![CDATA[
<p>
Monday my colleague reports severe a problem in our test system. It was my fault. I checked in an incomplete work into our system last Monday. What I don't understand is why no QA or customer report this for an entire week. Nevertheless I fixed it right away.
</p>

<p>After solving the problem, I go back to do other works.
</p>

<p>Then I realized what has happened. We have 2 days off last week and only one release went out before I checked in my bug. I was confused yesterday. The way I did the fix will actually do great harm. The fix goes into a wrong branch. And I let the problem escape the QA's detection so that it could break our production system. This literally wake me up at night and I got out of bed to fix the problem around 6am.
</p>

<p>Did I mention I sorted out the confusion while I was sleeping? Yes, somehow I accurately figured out the sequence of events in my dream. It wakes me up because I worry my colleagues who works in European timezone and other late nighter would have published my faulty build to the customers.
</p>

<p>I don't know what my mind was doing while I was sleeping. Does it work in autopilot mode and solve the problem I couldn't solve during day time? Or perhaps I just couldn't relax and bring my day time issue into bed?
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Tue, 29 Nov 2011 08:00 GMT</pubDate>
</item>
<item>
   <title>I Love Holiday Weekend</title>
   <guid isPermaLink="false">2011/2011-11-27_i_love_holiday_weekend</guid>
   <link>http://tungwaiyip.info/blog/2011/11/27/i_love_holiday_weekend</link>
   <description><![CDATA[
<p>
The roads are clear. Parking is easy to find. I walk into restaurants without waiting in line. Crowds thin out as everybody left town. Those of us who stay enjoy a much quieter town.
</p>

<p>
People return home to spend time with their family. While some folks who have left San Francisco maybe returning to their family here, on the balance there must be more people who go away then returning. As the city feels so quiet during the holidays.
</p>

<p>
Since people migrates to large city region for economic opportunities. Perhaps one indicator of the city's vibrancy and the degree it attracts migrant workers is to see if it turns into a ghost town during long holidays.
</p>

]]></description>
   <category domain="http://tungwaiyip.info/blog">/2011</category>
   <pubDate>Sun, 27 Nov 2011 08:00 GMT</pubDate>
</item>
</channel>
</rss>

