<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>@kevenlin is working on Web Apps, iPhone Apps and options trading

Email: k@kevenlin.com


var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var pageTracker = _gat._getTracker("UA-191689-8");
pageTracker._trackPageview();
</description><title>by Keven Lin</title><generator>Tumblr (3.0; @lambdalog)</generator><link>http://kevenlin.com/</link><item><title>Clojure + Mathematica</title><description>&lt;p&gt;A few people asked how I wrote a webapp using Clojure with Mathematica.  The solution is actually quiet simple - Clojure runs on JVM and &lt;a href="http://clojure.org/java_interop"&gt;Java interop&lt;/a&gt; (ability to call any Java libraries) works great.  Mathematica provides a &lt;a href="http://www.wolfram.com/solutions/mathlink/jlink/"&gt;J/Link Toolkit&lt;/a&gt; that allows you to control the Math kernel from Java.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Why Clojure?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;You could also use Java and link to Mathematica, but &lt;a href="http://clojure.org/"&gt;Clojure&lt;/a&gt; has the advantages of a functional and dynamic language.  I won’t go into the details of Java vs. Clojure.  Paul Graham made a good argument for Lisp in &lt;a href="http://www.paulgraham.com/icad.html"&gt;Revenge of the Nerds&lt;/a&gt; that’s definitely worth reading.  Mathematica also includes a Python library for the MathLink library which does not support the newer versions of Python.  You could also power Mathematica websites using &lt;a href="http://www.wolfram.com/products/webmathematica/"&gt;webMathematica&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;2+2 with Clojure and Mathematica&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;An equivalent of “hello world” program, following is the code performing a simple arithmetic using Mathematica.  Note that to run the script, I need to force run JVM in 32-bit mode (using -d32 option) in Snow Leopard because J/Link package does not provide the 64-bit library.  To run the script, all you have to do is call java and make sure to include both J/Link and clojure jars.&lt;/p&gt;

&lt;p&gt;&lt;script src="http://gist.github.com/225585.js"&gt;&lt;/script&gt;&lt;b&gt;A Mathematica Webapp&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Compojure is a micro web framework that is similar to Sinatra.  It is an ideal choice to demo a stock quote webapp get latest stock price using the Mathematica’s FinancialData function.&lt;/p&gt;

&lt;p&gt;&lt;script src="http://gist.github.com/225605.js"&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;Result:&lt;br/&gt;&lt;img src="http://media.tumblr.com/tumblr_ksk5relpp61qzoqxe.png"/&gt;&lt;/p&gt;</description><link>http://kevenlin.com/post/232335981</link><guid>http://kevenlin.com/post/232335981</guid><pubDate>Tue, 03 Nov 2009 16:40:12 -0800</pubDate></item><item><title>Twitter Analytics using Mathematica</title><description>&lt;p&gt;&lt;p class="Text"&gt;
 Twitter has been just about everywhere lately.  As its popularity continues to grow, how do you keep track of the expanding list of friends and followers?  As more companies are using Twitter to promote their products, good tools are necessary to manage hundreds or thousands of contacts and analyze their Twitter social graph .&lt;br/&gt;&lt;br/&gt;Twitter has an open api, and &lt;span style="font-style: italic;"&gt;Mathematica&lt;/span&gt; is the best analytical tool out there.  &lt;span style="font-style: italic;"&gt;Mathematica&lt;/span&gt;’s image manipulation capability also makes it a very nice data visualizer.  So let us plug Twitter in &lt;span style="font-style: italic;"&gt;Mathematica,&lt;/span&gt; and play with the data.&lt;br/&gt;&lt;br/&gt;In the examples, let’s use &lt;span&gt;&lt;a href="http://twitter.com/Wolfram_Alpha"&gt;&lt;span class="HyperlinkInline"&gt;Wolfram_Alpha&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; (my personal twitter data is not very interesting).  WolframAlpha has just recently launched, and they have been actively posting news and updates with Twitter.  Let’s first look at W|A’s recent tweets.
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[329]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_1.gif" alt="twitter_analytics_1.gif" width="158" height="73" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[331]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_2.gif" alt="twitter_analytics_2.gif" width="871" height="28" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 So here we import the user’s timeline, and transform the list of XMLObjects to a list of rules from attribute to value.

&lt;/p&gt;
&lt;p class="Text"&gt;
 Now we can visualize the time and frequency of the user’s recent tweets in a timeline, where x-axis is the date and  y-axis is the number of seconds during the day (eg. 30000s = 8:20 am).   
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[334]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_5.gif" alt="twitter_analytics_5.gif" width="357" height="43" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[336]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_6.gif" alt="twitter_analytics_6.gif" width="874" height="553" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;


&lt;p class="Text"&gt;
After seeing Mathematica’s visualizations, we want to do analysis and play around with the friendship data.  Let us load up the users Wolfram Alpha is following,
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[338]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_7.gif" alt="twitter_analytics_7.gif" width="135" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[338]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_8.gif" alt="twitter_analytics_8.gif" width="1825" height="109" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 In[339]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_9.gif" alt="twitter_analytics_9.gif" width="97" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[339]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_10.gif" alt="twitter_analytics_10.gif" width="18" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 All friends’ profile data are loaded, and the size is consistent with the number on the website.  To apply a filter, say look for the friends with screen name begins with “a”,
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[340]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_11.gif" alt="twitter_analytics_11.gif" width="534" height="28" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[341]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_12.gif" alt="twitter_analytics_12.gif" width="414" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 And put the name to the profile picture.
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[342]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_13.gif" alt="twitter_analytics_13.gif" width="417" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[342]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_14.gif" alt="twitter_analytics_14.gif" width="494" height="67" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 One of most important features on Wolfram Alpha is performing arithmetic and comparisons on objects.  For example, try &lt;span&gt;&lt;a href="http://is.gd/IERo"&gt;&lt;span class="HyperlinkInline"&gt;comparing&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; between three stocks GOOG, AAPL and MSFT, or add up your &lt;span&gt;&lt;a href="http://is.gd/Amq5"&gt;&lt;span class="HyperlinkInline"&gt;nutrition value&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; of a meal at McDonald’s.  I also want to compare between a list of friends, which can be easily done by:&lt;br/&gt;&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[343]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_15.gif" alt="twitter_analytics_15.gif" width="352" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[343]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_16.gif" alt="twitter_analytics_16.gif" width="470" height="264" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Now I’m interested to find out which friends have most followers, by sorting the friends with follower counts, and take top 20 results.
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[344]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_17.gif" alt="twitter_analytics_17.gif" width="637" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 Visualize of the results with a directed graph.  An arrow from user A to user B indicates that user A is following user B.
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[345]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_18.gif" alt="twitter_analytics_18.gif" width="144" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[345]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_19.gif" alt="twitter_analytics_19.gif" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="Text"&gt;
 We can also visualize the same list of users in a bubble plot.  X - axis is number of followings,  y - axis is number of followers, and the size of the image is determined by the ratio of  followers / friends (ie, image is bigger if number of followers / number of friends is higher).
&lt;/p&gt;



&lt;p class="CellLabel"&gt;
 In[346]:=
&lt;/p&gt;



&lt;p class="Input"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_20.gif" alt="twitter_analytics_20.gif" width="147" height="12" style="vertical-align:middle;border:0px"/&gt;&lt;/p&gt;

&lt;p class="CellLabel"&gt;
 Out[346]=
&lt;/p&gt;



&lt;p class="Output"&gt;
 &lt;img src="http://dl.getdropbox.com/u/82/Mathematica/twitter_analytics_21.gif" alt="twitter_analytics_21.gif" width="736" height="716" style="vertical-align:middle;border:0px;" usemap="#map_21"/&gt;&lt;map name="map_21"&gt;&lt;area shape="rect" coords="372,593,386,579" title="4892&lt;br /&gt;----&lt;br /&gt;5341" nohref&gt;
&lt;area shape="rect" coords="388,584,401,570" title="11208&lt;br /&gt;-----&lt;br /&gt;11299" nohref&gt;
&lt;area shape="rect" coords="184,634,198,621" title="16229&lt;br /&gt;-----&lt;br /&gt;16156" nohref&gt;
&lt;area shape="rect" coords="151,643,165,629" title="9775&lt;br /&gt;----&lt;br /&gt;9602" nohref&gt;
&lt;area shape="rect" coords="419,574,432,560" title="31996&lt;br /&gt;-----&lt;br /&gt;31323" nohref&gt;
&lt;area shape="rect" coords="709,496,723,483" title="17874&lt;br /&gt;-----&lt;br /&gt;17173" nohref&gt;
&lt;area shape="rect" coords="149,633,163,619" title="3521&lt;br /&gt;----&lt;br /&gt;1837" nohref&gt;
&lt;area shape="rect" coords="490,426,504,412" title="181021&lt;br /&gt;------&lt;br /&gt;76875" nohref&gt;
&lt;area shape="rect" coords="119,641,134,627" title="3725&lt;br /&gt;----&lt;br /&gt;1123" nohref&gt;
&lt;area shape="rect" coords="113,639,128,624" title="12978&lt;br /&gt;-----&lt;br /&gt;2255" nohref&gt;
&lt;area shape="rect" coords="108,644,123,629" title="9089&lt;br /&gt;----&lt;br /&gt;1290" nohref&gt;
&lt;area shape="rect" coords="107,646,122,630" title="8085&lt;br /&gt;----&lt;br /&gt;919" nohref&gt;
&lt;area shape="rect" coords="104,639,121,622" title="13735&lt;br /&gt;-----&lt;br /&gt; 602" nohref&gt;
&lt;area shape="rect" coords="102,648,119,631" title="572&lt;br /&gt;---&lt;br /&gt;23" nohref&gt;
&lt;area shape="rect" coords="103,637,120,619" title="16006&lt;br /&gt;-----&lt;br /&gt; 387" nohref&gt;
&lt;area shape="rect" coords="101,623,121,603" title="27636&lt;br /&gt;-----&lt;br /&gt; 317" nohref&gt;
&lt;area shape="rect" coords="94,262,129,227" title="318287&lt;br /&gt;------&lt;br /&gt; 426" nohref&gt;
&lt;area shape="rect" coords="94,51,130,15" title="485263&lt;br /&gt;------&lt;br /&gt; 553" nohref&gt;
&lt;area shape="rect" coords="82,651,137,596" title="19652&lt;br /&gt;-----&lt;br /&gt;  7" nohref&gt;
&lt;area shape="rect" coords="48,686,171,563" title="18954" nohref&gt;&lt;/map&gt;&lt;/p&gt;





&lt;p class="Text"&gt;
 Because of Wolfram Alpha, most programmers probably have seen what &lt;span style="font-style: italic;"&gt;Mathematica &lt;/span&gt;can do.  Its applications are endless: I have been using it to analyze stock arbitrage opportunities, and we are also interested in analyzing the way people read &lt;span&gt;&lt;a href="http://getcomicstrips.com/"&gt;&lt;span class="HyperlinkInline"&gt;comics on iPhone&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;.&lt;br/&gt;&lt;br/&gt;The examples above were over spare hours (or minutes) over last few nights just for fun.  If anyone has any suggestions about Twitter / &lt;span style="font-style: italic;"&gt;Mathematica&lt;/span&gt;, let me know (@&lt;span&gt;&lt;a href="http://twitter.com/kevenlin"&gt;&lt;span class="HyperlinkInline"&gt;kevenlin&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;).  This &lt;span&gt;&lt;a href="http://blog.wolfram.com/2009/04/30/twittering-with-mathematica/"&gt;&lt;span class="HyperlinkInline"&gt;blog post &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;from WolframBlog will also show you other cool things such as tweet from &lt;span style="font-style: italic;"&gt;Mathematica&lt;/span&gt;.
&lt;/p&gt;&lt;/p&gt;</description><link>http://kevenlin.com/post/114641863</link><guid>http://kevenlin.com/post/114641863</guid><pubDate>Thu, 28 May 2009 20:28:00 -0700</pubDate></item><item><title>Newest addition to the family: Damian Lin


function...</title><description>&lt;img src="http://30.media.tumblr.com/UZO9qYaGrmq7wzvpbFtCtVy3o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Newest addition to the family: &lt;b&gt;Damian Lin&lt;/b&gt;&lt;/p&gt;

&lt;script&gt;
function days_from_today(date1) {
    var ONE_DAY = 1000 * 60 * 60 * 24
    var today=new Date()
    var date1_ms = date1.getTime()
    var date2_ms = today.getTime()
    var difference_ms = Math.abs(date1_ms - date2_ms)
    return Math.round(difference_ms/ONE_DAY)
} 
var birth=new Date()
birth.setFullYear(2009,3,13)
document.write("&lt;p&gt;He's " + days_from_today(birth) + " days old today")
&lt;/script&gt;</description><link>http://kevenlin.com/post/100070323</link><guid>http://kevenlin.com/post/100070323</guid><pubDate>Sat, 25 Apr 2009 11:57:00 -0700</pubDate></item><item><title>Pair Trading using Mathematica</title><description>&lt;p&gt;Pair Trading is one of the ideas that I have been very interested in, but could not find right tool for analysis.  Sure, most traders use Excel, but that’s simply too many copying and pasting cells.  &lt;a href="http://collison.ie"&gt;Patrick&lt;/a&gt; showed me the cool &lt;a href="http://collison.ie/blog/2009/04/using-mathematica-to-generate-web-20-company-names"&gt;things&lt;/a&gt; he could do with Mathematica, and I thought that might be the perfect tool for stock analysis.
&lt;br/&gt;&lt;br/&gt;
So what is &lt;b&gt;Pair Trading&lt;/b&gt;?  In short, it is a market-neutral strategy used by hedge funds and investment bank.  Trader first identifies two stocks which prices have moved together in past.  When the spread between the stocks widen for any reasons, buy the underperforming stock and short the outperforming one.  When the spread eventually converge and the trader will close the positions and profit. 
&lt;br/&gt;&lt;br/&gt;
Mathematica has lots of impressive features for stock analysis.  For example,  &lt;br/&gt;&lt;br/&gt;&lt;img src="http://dl.getdropbox.com/u/82/mathematica-capture.png"/&gt;&lt;br/&gt;
One line of code will grab GOOG prices since 2006 and plot on a chart.  Note that I don’t have to write parsers for stock data, because financial data is part of larger set of  &lt;a href="http://www.wolfram.com/technology/guide/LoadOnDemandCuratedData/"&gt;curated data&lt;/a&gt; that comes with Mathematica.
&lt;br/&gt;&lt;br/&gt;
Now let’s use Mathematica on Coca-Cola(KO) and Pepsi(PEP), a classic example of a correlated pair.  
&lt;br/&gt;&lt;br/&gt;&lt;img src="http://dl.getdropbox.com/u/82/mathematica-capture2.png"/&gt;&lt;br/&gt;&lt;br/&gt;
As expected, the pair has similar movements in prices over lasts year.  Now we plot the price of KO divided by PEP and get the following chart.  (Note: Blue Curve is the KO / PEP pair ratio, Red Line in middle is mean, Blue and Yellow Lines are 1 standard deviation, and Red and Green Lines are 2 standard deviation).
&lt;br/&gt;&lt;br/&gt;&lt;img src="http://dl.getdropbox.com/u/82/mathematica-capture3.png"/&gt;&lt;br/&gt;&lt;br/&gt;
The price ratio seems to oscillate around a mean.  But we do see when the ratio appears to go below and above 2 standard deviation from the mean.  The strategy is to &lt;b&gt;execute a paired trade when the pair ratio is over +/- 2 standard deviation from mean.  When the ratio reverts to mean, we will close the positions&lt;/b&gt;.
&lt;br/&gt;&lt;br/&gt;
As shown on the chart, the price ratio is currently around +2 standard deviation, now might be a good time to &lt;b&gt;SHORT KO / LONG PEP&lt;/b&gt;.  For options trading, you would buy a KO put and buy a PEP call that expire on same time.  
&lt;br/&gt;&lt;br/&gt;
Trader should be aware of risk of &lt;b&gt;drifting&lt;/b&gt;.  This happens when the two correlated stock prices start to drift apart.  The risk can be controlled if trader closes the pair (and take loss) if their prices do not converge within a time interval (eg. 6 months) or when pair ratio is above certain tolerable line (say +/- 3 standard deviations).
&lt;br/&gt;&lt;br/&gt;
Mathematica has simplified the analysis with &lt;b&gt;stats and charting library&lt;/b&gt; and &lt;b&gt;curated finance data&lt;/b&gt;.  Only 5 lines of code are needed to produce this analysis.  It is also worth mentioning Mathematica also has awesome documentation to help you get started.  If you have Mathematica, you can download &lt;a href="http://dl.getdropbox.com/u/82/pair-analysis.nb"&gt;the notebook&lt;/a&gt;.&lt;/p&gt;</description><link>http://kevenlin.com/post/99760050</link><guid>http://kevenlin.com/post/99760050</guid><pubDate>Fri, 24 Apr 2009 13:09:00 -0700</pubDate></item><item><title>Two reasons why most entrepreneurs fail</title><description>&lt;p&gt;“by doing nothing, and by doing the wrong things.” - pg via &lt;a href="http://news.ycombinator.com/item?id=444368"&gt;Hacker News&lt;/a&gt;&lt;/p&gt;</description><link>http://kevenlin.com/post/72413741</link><guid>http://kevenlin.com/post/72413741</guid><pubDate>Thu, 22 Jan 2009 13:59:00 -0800</pubDate></item><item><title>Family Portrait</title><description>&lt;img src="http://27.media.tumblr.com/UZO9qYaGrhdj0s8zEEYqsx11o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Family Portrait&lt;/p&gt;</description><link>http://kevenlin.com/post/64365734</link><guid>http://kevenlin.com/post/64365734</guid><pubDate>Thu, 11 Dec 2008 14:28:29 -0800</pubDate></item><item><title>Ingredients for great beer.  Taken from Granville Island...</title><description>&lt;img src="http://26.media.tumblr.com/UZO9qYaGrgkzuxpfxN02Dq7Po1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Ingredients for great beer.  Taken from Granville Island Brewery.&lt;/p&gt;</description><link>http://kevenlin.com/post/60940623</link><guid>http://kevenlin.com/post/60940623</guid><pubDate>Fri, 21 Nov 2008 15:14:30 -0800</pubDate></item><item><title>A classic metaphor from Taleb : A turkey is fed for a 1000 days...</title><description>&lt;img src="http://29.media.tumblr.com/UZO9qYaGrffun3akCdVO8glYo1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;A classic metaphor from &lt;a href="http://www.edge.org/3rd_culture/taleb08/taleb08_index.html"&gt;Taleb&lt;/a&gt; : &lt;br/&gt;&lt;br/&gt;A turkey is fed for a 1000 days - every day confirms to its statistical department that the human race cares about its welfare “with increased statistical significance”.  On the 1001 day, the turkey has a surprise. &lt;/p&gt;</description><link>http://kevenlin.com/post/56067522</link><guid>http://kevenlin.com/post/56067522</guid><pubDate>Thu, 23 Oct 2008 21:09:53 -0700</pubDate></item><item><title>"that code should be seen not as a static thing, like the answer to a math problem, but as an..."</title><description>“that code should be seen not as a static thing, like the answer to a math problem, but as an evolving effort to figure out the right question to be the answer to; and that it should thus be written to be easy to change.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Paul Graham, on the one thing every software engineer should know&lt;/em&gt;</description><link>http://kevenlin.com/post/55987432</link><guid>http://kevenlin.com/post/55987432</guid><pubDate>Thu, 23 Oct 2008 09:50:07 -0700</pubDate></item><item><title>Update: Years are automatically updated.


var montharray=new...</title><description>&lt;img src="http://27.media.tumblr.com/UZO9qYaGret4k4p6sRtCWIe5o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; Years are automatically updated.&lt;/p&gt;
&lt;script&gt;

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countup(yr,m,d){
var paststring=montharray[m-1]+" "+d+", "+yr
var today = new Date()
var difference=(Math.round((today -Date.parse(paststring))*100/(365*24*60*60*1000))/100)

document.write("&lt;p&gt;Time flies.  It\'s been " + difference + " years since the girls were born")
}
countup(2005,07,18)
&lt;/script&gt;</description><link>http://kevenlin.com/post/53577316</link><guid>http://kevenlin.com/post/53577316</guid><pubDate>Tue, 07 Oct 2008 23:28:00 -0700</pubDate></item><item><title>Ack bundle in TextMate - Faster Find in Project </title><description>&lt;p&gt;One thing that bothered me with TextMate was the Find in Project function.  In searching for replacement, &lt;a href="http://www.oliyiptong.com/blog/2008/10/04/ack/"&gt;Olivier&lt;/a&gt; pointed me to Ack!, which is an excellent tool to replace find+grep.&lt;/p&gt;
&lt;p&gt;While doing so, I came across a nifty Ack bundle for Textmate.  It’s REALLY FAST.  &lt;a href="http://somethinglearned.com/articles/2008/06/03/ack-tmbundle-a-faster-find-in-project-for-textmate"&gt;Enjoy!&lt;/a&gt;.&lt;/p&gt;</description><link>http://kevenlin.com/post/53566171</link><guid>http://kevenlin.com/post/53566171</guid><pubDate>Tue, 07 Oct 2008 21:34:46 -0700</pubDate></item><item><title>Open source library for quantitative finance</title><description>&lt;a href="http://quantlib.com"&gt;Open source library for quantitative finance&lt;/a&gt;: &lt;p&gt;Open source framework for modeling, trading and risk management in finance.  Includes Python binding.  Despite the market turmoil, anyone wants to start a hedge fund?&lt;/p&gt;
&lt;p&gt;(found via &lt;a href="http://news.ycombinator.com/item?id=309198"&gt;http://news.ycombinator.com/item?id=309198&lt;/a&gt;)&lt;/p&gt;</description><link>http://kevenlin.com/post/50882914</link><guid>http://kevenlin.com/post/50882914</guid><pubDate>Fri, 19 Sep 2008 10:40:42 -0700</pubDate></item><item><title>research done by mechanical turk</title><description>&lt;a href="http://joshua.schachter.org/2008/09/amateur-economist.html"&gt;research done by mechanical turk&lt;/a&gt;: &lt;p&gt;brilliant!  casual research by surveying random population using mechanical turk.&lt;/p&gt;</description><link>http://kevenlin.com/post/50293013</link><guid>http://kevenlin.com/post/50293013</guid><pubDate>Mon, 15 Sep 2008 13:31:00 -0700</pubDate></item><item><title>MemCache Flush All (for memcache_client )</title><description>&lt;p&gt;Some times we might want to clear memcache without restarting memcache server.&lt;/p&gt;
&lt;p&gt;When calling Cache.get / set, we are really using a wrapper module Cache that simplify access to memcache client.&lt;/p&gt;
&lt;p&gt;To flush memcache, call CACHE.flush_all&lt;/p&gt;</description><link>http://kevenlin.com/post/49813270</link><guid>http://kevenlin.com/post/49813270</guid><pubDate>Thu, 11 Sep 2008 22:31:13 -0700</pubDate></item><item><title>Contact form for iTune support</title><description>&lt;a href="http://www.apple.com/support/itunes/store/browser/"&gt;Contact form for iTune support&lt;/a&gt;: &lt;p&gt;This link is hidden so deeply, it always takes me few minutes to dig it up again.&lt;/p&gt;</description><link>http://kevenlin.com/post/49480013</link><guid>http://kevenlin.com/post/49480013</guid><pubDate>Tue, 09 Sep 2008 17:00:50 -0700</pubDate></item><item><title>Ruby include, extend, require and load explained</title><description>&lt;p&gt;The Ruby ‘include’ statement references to a named module; it appends features of a module into classes or other modules.  &lt;/p&gt;
&lt;p&gt;‘extend’ adds the features of a module to one instance (object) at run-time&lt;/p&gt;
&lt;p&gt;‘require’ is used for loading nonmodule Ruby sources and binaries.  ’require’ is similar to a ‘load’ ,but it will not load a file if it has already been loaded.&lt;/p&gt;
&lt;p&gt;‘include’ and ‘require’ are essentially unrelated.  You may need to do a require follow by an include to use some externally stored module.&lt;/p&gt;</description><link>http://kevenlin.com/post/48623547</link><guid>http://kevenlin.com/post/48623547</guid><pubDate>Wed, 03 Sep 2008 15:07:01 -0700</pubDate></item><item><title>Git - revert / undo local modifications</title><description>&lt;p&gt;&lt;b&gt;To undo local modification to file&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;git checkout -f /path/to/file &lt;/p&gt;

&lt;p&gt;&lt;b&gt; To revert a recent commit &lt;/b&gt;&lt;br/&gt;
git reset HEAD~&lt;/p&gt;

&lt;p&gt;Good reference for Git material: &lt;a href="http://linux.yyz.us/git-howto.html"&gt;Kernel Hackers’ Guide to git&lt;/a&gt;&lt;/p&gt;</description><link>http://kevenlin.com/post/45727144</link><guid>http://kevenlin.com/post/45727144</guid><pubDate>Tue, 12 Aug 2008 15:35:00 -0700</pubDate></item><item><title>Tai Chi Demonstration by Master Yuan Zhen Wu, 32nd generation...</title><description>&lt;embed id="VideoPlayback" style="width: 400px;height: 326px" allowfullscreen="true" src="http://video.google.com/googleplayer.swf?docid=-8955573882306813918&amp;hl=en&amp;fs=true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Tai Chi Demonstration by Master Yuan Zhen Wu, 32nd generation warrior monk from Shaolin Temple.  http://shaolintemple.ca&lt;/p&gt;</description><link>http://kevenlin.com/post/44860454</link><guid>http://kevenlin.com/post/44860454</guid><pubDate>Tue, 05 Aug 2008 15:59:00 -0700</pubDate></item><item><title>approach on product design</title><description>&lt;a href="http://paulbuchheit.blogspot.com/2008/02/most-import-thing-to-understand-about.html"&gt;approach on product design&lt;/a&gt;: &lt;p&gt;Paul Buchheit:&lt;/p&gt;
&lt;p&gt;What is the humble approach to product design? Pay attention. Notice which things are working and which aren’t. Experiment and iterate. Question your assumptions. Remember that you are wrong about a lot of things. Watch for the signals. Lose your technical and design snobbery. Whatever works, works.&lt;/p&gt;</description><link>http://kevenlin.com/post/44596562</link><guid>http://kevenlin.com/post/44596562</guid><pubDate>Sun, 03 Aug 2008 17:12:04 -0700</pubDate></item><item><title>Restart Apache w/ mod_rails on Leopard</title><description>&lt;p&gt;sudo apachectl restart&lt;/p&gt;</description><link>http://kevenlin.com/post/42724109</link><guid>http://kevenlin.com/post/42724109</guid><pubDate>Fri, 18 Jul 2008 09:01:41 -0700</pubDate></item></channel></rss>
