<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://llems.spaces.live.com/mmm2008-07-24_12.50/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fllems.spaces.live.com%2fcategory%2fStudy%2bNote%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>S.M.E.L.L.: Study Note</title><description /><link>http://llems.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&amp;_c=BlogPart&amp;partqs=catStudy%2bNote</link><language>en-US</language><pubDate>Tue, 12 Aug 2008 01:17:11 GMT</pubDate><lastBuildDate>Tue, 12 Aug 2008 01:17:11 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><cf:parentRSS>http://llems.spaces.live.com/blog/feed.rss</cf:parentRSS><live:type>blogcategory</live:type><live:identity><live:id>-2291131611838918521</live:id><live:alias>llems</live:alias></live:identity><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>Head First Design Patterns</title><link>http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!331.entry</link><description>&lt;div&gt;      我的假期可以说是过得很没意义。没有好好地孝敬父母，也没有好好地和老朋友叙旧，TCO也没有全心全意地去做。唯一的收获恐怕就只有这本惊世骇俗的好书了。&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;      看完这本书最大的感觉就是收获，实实在在的收获。这种收获不需要你付出太多的艰辛，或者付出太多的脑细胞。所有的东西就好像变魔术一样，就像幼儿园老师讲的故事一样装入了脑袋。希望我这样说不会给大家带来任何误解，因为这个世界上本不存在不需要代价的收获。看这本书我还是花了两个星期，其中有好几个通宵。只是那些通宵的夜晚是那样的让人心情愉悦，当天亮的时候，心中满是那种豁达的喜悦。当一切谜题解开，花上一个本来就睡不香的夜晚算什么呢？当你用Pattern来看世界，真的会觉得世界很简单，也很美好。每个人的价值观不同，做事的方法不同，只不过是每个人是不同Strategy的实例；88上qs一下好友不过是一个Observer Pattern的实现，可惜这个实现用的是Push的方法，所以不少observers会觉得annoyance；我的爱情是个Singleton，只可惜她是Lazy Initialized，所以至今我还没有得到她的reference，这样的实现是有理由和根据的，因为我希望我爱情的绽放是隆重的（both time and space expensive），不是那么简单的；现代社会有一种很牛逼的职业就是经纪人，他们做的不过是Facade的工作。&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;      正如网络上随处可见的评论一样，这本书最大的优点就是可读性。我没有必要再像看传统技术书籍一样，翻来翻去对照图片，自己画图理清经络，弄得头昏脑涨。而且对认知知识的运用使得这本书更加可爱，我可以像看故事会一样看这本书，或者像看我外甥的看图识字一样看这本书，而不会让收获有所削减。现在的我甚至对Pattern有些疯狂了，到Starbuzz喝咖啡，点咖啡的时候满脑子都是Decorator；到PizzaHut吃皮萨，会不自觉地研究起AbstractFactory；看三国演义，当诸葛亮送刘备去东吴相亲，掏出锦囊的时候，我会在想这是什么样的Command。&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;      看完全书，我又一次看了其他人给书写的praise。这一次我真的觉得这些为了推销而存在的东西是实实在在的。我要承认，这是第一本超过600页，并且从头到尾我都能用同样态度看完的书，也是第一次让我体会到“爱不释手”的感觉的技术书。书中的很多部分是我喜爱的，Fire Chair真的能让人有那种剑拔弩张的感觉，不知不觉对于Pattern的比较和选择这样很困难也很重要的问题就解决了。对Pattern的采访也让那些Pattern有了活脱脱的个性。当然我最喜欢的还是填字游戏，轻松的过程也就是复习的过程。&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;      当然，也必须承认自己的不足，书中用了很多的口语，其中大多数我是不懂的，所以我还有再看一遍的理由和必要。根据我的个性，我也必须说说书的不足。那个Pattern Guru是在太ugly，希望这是编辑的精心安排，希望读者把注意力放在更重要的地方。^_^&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;      PS: 我本不喜欢在space上放音乐的，但是书中提到的Model View Controller Song实在是太funny了，所以与大家分享。Googling &amp;quot;Model View Controller Song&amp;quot; will tell you the full story.&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2291131611838918521&amp;page=RSS%3a+Head+First+Design+Patterns&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=llems.spaces.live.com&amp;amp;GT1=llems"&gt;</description><comments>http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!331.entry#comment</comments><guid isPermaLink="true">http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!331.entry</guid><pubDate>Mon, 27 Feb 2006 21:21:32 GMT</pubDate><slash:comments>4</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://llems.spaces.live.com/blog/cns!E03443F01EAC5087!331/comments/feed.rss</wfw:commentRss><wfw:comment>http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!331.entry#comment</wfw:comment><dcterms:modified>2006-07-25T16:28:33Z</dcterms:modified></item><item><title>Ternary Search</title><link>http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!125.entry</link><description>&lt;p&gt;By applying Binary Search, we are employing the &amp;quot;Divide and Conquer&amp;quot; strategy. It's useful when search some value in [a, b] of a monotone function f(x). But it cannot be apply to search the extremum of a function. But &amp;quot;Divide and Conquer&amp;quot; can also be used in this case, provided the function is concave (like a quadratic, it has a single minima or maxima). The method is called Ternary Search.
&lt;p&gt;To find the minima of a function &lt;tt&gt;f(x)&lt;/tt&gt; between to points, &lt;tt&gt;a &amp;lt; b&lt;/tt&gt;, you can use something like the following:&lt;code&gt;&lt;pre&gt;    min = a;
    max = b;
    while (max &amp;gt; min + eps) {
        s1 = (2 * min + max) / 3;
        s2 = (min + 2 * max) / 3;
        if (f(s1) &amp;lt; f(s2)) {
            max = s2;
        } else {
            min = s1
        }
    }
&lt;/pre&gt;&lt;/code&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2291131611838918521&amp;page=RSS%3a+Ternary+Search&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=llems.spaces.live.com&amp;amp;GT1=llems"&gt;</description><comments>http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!125.entry#comment</comments><guid isPermaLink="true">http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!125.entry</guid><pubDate>Sat, 20 Aug 2005 05:49:15 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://llems.spaces.live.com/blog/cns!E03443F01EAC5087!125/comments/feed.rss</wfw:commentRss><wfw:comment>http://llems.spaces.live.com/Blog/cns!E03443F01EAC5087!125.entry#comment</wfw:comment><dcterms:modified>2005-08-22T17:38:52Z</dcterms:modified></item></channel></rss>