<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Zing-Ming</title>
	<atom:link href="https://zingming.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://zingming.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 20 May 2013 15:28:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='zingming.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/7a0ac105e0da81d6107d76ae44a673e0c7f488fb0767992eaf75d85b5f0abb23?s=96&#038;d=https%3A%2F%2Fs0.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Zing-Ming</title>
		<link>https://zingming.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://zingming.wordpress.com/osd.xml" title="Zing-Ming" />
	<atom:link rel='hub' href='https://zingming.wordpress.com/?pushpress=hub'/>
	<item>
		<title>My inner child thinks I am a sniper.</title>
		<link>https://zingming.wordpress.com/2013/05/20/my-inner-child-thinks-i-am-a-sniper/</link>
					<comments>https://zingming.wordpress.com/2013/05/20/my-inner-child-thinks-i-am-a-sniper/#comments</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Mon, 20 May 2013 15:28:48 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=1190</guid>

					<description><![CDATA[My inner child believes that I can shoot guns accurately with no training. After my American uncle explained how to line up the gun, I shot the bullseye. This target was shared between four people. I hit the bullseye twice. &#8230; <a href="https://zingming.wordpress.com/2013/05/20/my-inner-child-thinks-i-am-a-sniper/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>My inner child believes that I can shoot guns accurately with no training.</p>
<p>After my American uncle explained how to line up the gun, I shot the bullseye.</p>
<iframe class="youtube-player" width="640" height="360" src="https://www.youtube.com/embed/MO5sCeJXeM4?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe>
<p>This target was shared between four people. I hit the bullseye twice.</p>
<p><img data-attachment-id="1194" data-permalink="https://zingming.wordpress.com/2013/05/20/my-inner-child-thinks-i-am-a-sniper/bullseye/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg" data-orig-size="480,640" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;GT-S5830&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1367086127&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;3.55&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.1&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="bullseye" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg?w=225" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg?w=480" src="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg?w=640" alt="bullseye"   class="aligncenter size-full wp-image-1194" srcset="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg 480w, https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg?w=113&amp;h=150 113w, https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg?w=225&amp;h=300 225w" sizes="(max-width: 480px) 100vw, 480px" /></p>
<p>The adult part of me is glad that I have access to handguns only when I am visiting the United States.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2013/05/20/my-inner-child-thinks-i-am-a-sniper/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:thumbnail url="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg" />
		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg" medium="image">
			<media:title type="html">bullseye</media:title>
		</media:content>

		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2013/05/bullseye.jpg" medium="image">
			<media:title type="html">bullseye</media:title>
		</media:content>
	</item>
		<item>
		<title>Mister Rogers Remixed &#038; Autotuned</title>
		<link>https://zingming.wordpress.com/2012/06/10/mister-rogers-remixed-autotuned/</link>
					<comments>https://zingming.wordpress.com/2012/06/10/mister-rogers-remixed-autotuned/#comments</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Sun, 10 Jun 2012 14:39:18 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=1185</guid>

					<description><![CDATA[By Symphony of Science&#8217;s John Boswell for PBS Digital Studios]]></description>
										<content:encoded><![CDATA[<div class="embed-youtube"><iframe title="Mister Rogers Remixed | Garden of Your Mind | PBS Digital Studios" width="640" height="360" src="https://www.youtube.com/embed/OFzXaFbxDcM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
<p>By Symphony of Science&#8217;s John Boswell for PBS Digital Studios</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2012/06/10/mister-rogers-remixed-autotuned/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>
	</item>
		<item>
		<title>Still Not A Player / The Boy Is Mine remix</title>
		<link>https://zingming.wordpress.com/2012/05/07/still-not-player-boy-mine-remix/</link>
					<comments>https://zingming.wordpress.com/2012/05/07/still-not-player-boy-mine-remix/#comments</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Tue, 08 May 2012 01:30:22 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Audacity]]></category>
		<category><![CDATA[Big Pun]]></category>
		<category><![CDATA[Brandy]]></category>
		<category><![CDATA[Monica]]></category>
		<category><![CDATA[remix]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=1163</guid>

					<description><![CDATA[I finally figured out how to mix songs together. I used Audacity, a free, open source audio editing program. When I was younger, a friend (Tina) thought that Big Pun&#8217;s &#8220;Still Not a Player&#8221; and Brandy/Monica&#8217;s &#8220;The Boy Is Mine&#8221; &#8230; <a href="https://zingming.wordpress.com/2012/05/07/still-not-player-boy-mine-remix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I finally figured out how to mix songs together. I used <a href="http://audacity.sourceforge.net/">Audacity</a>, a free, open source audio editing program.</p>
<p>When I was younger, a friend (Tina) thought that Big Pun&#8217;s &#8220;Still Not a Player&#8221; and Brandy/Monica&#8217;s &#8220;The Boy Is Mine&#8221; would sound good remixed together. I think it sounds pretty good. <em>(Update: Link broke.)</em> </p>
<p><img data-attachment-id="1171" data-permalink="https://zingming.wordpress.com/2012/05/07/still-not-player-boy-mine-remix/bigpun/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg" data-orig-size="300,225" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="bigpun" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg?w=300" class="size-full wp-image-1171" src="https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg?w=640" alt=""   srcset="https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg 300w, https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg?w=150&amp;h=113 150w" sizes="(max-width: 300px) 100vw, 300px" /> <img data-attachment-id="1168" data-permalink="https://zingming.wordpress.com/2012/05/07/still-not-player-boy-mine-remix/boyismine/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg" data-orig-size="300,225" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="boyismine" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg?w=300" class="size-full wp-image-1168" src="https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg?w=640" alt=""   srcset="https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg 300w, https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg?w=150&amp;h=113 150w" sizes="(max-width: 300px) 100vw, 300px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2012/05/07/still-not-player-boy-mine-remix/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/05/bigpun.jpg" medium="image" />

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/05/boyismine.jpg" medium="image" />
	</item>
		<item>
		<title>Productivity Protip: RedFlagDeals + Google Alerts</title>
		<link>https://zingming.wordpress.com/2012/03/15/productivity-protip-redflagdeals-google-alerts/</link>
					<comments>https://zingming.wordpress.com/2012/03/15/productivity-protip-redflagdeals-google-alerts/#respond</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Fri, 16 Mar 2012 01:05:02 +0000</pubDate>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[deals]]></category>
		<category><![CDATA[lifehack]]></category>
		<category><![CDATA[protip]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=1073</guid>

					<description><![CDATA[If you want to wait for an item to go on sale, but you don&#8217;t want to waste your life on RedFlagDeals.com, you can create a Google Alert to automate the act of finding deals applicable to Canadians. Benefit from &#8230; <a href="https://zingming.wordpress.com/2012/03/15/productivity-protip-redflagdeals-google-alerts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you want to wait for an item to go on sale, but you don&#8217;t want to waste your life on RedFlagDeals.com, you can create a <a href="http://www.google.com/alerts">Google Alert</a> to automate the act of finding deals applicable to Canadians. Benefit from Canadian crowdsourcing, but have only customized information delivered to your inbox.</p>
<p>Let&#8217;s say you want to wait for olive oil to go on sale. Just create a new Google Alert with a search query like:</p>
<p><code>site:redflagdeals.com "olive oil"</code></p>
<p>This is a Google search for the term &#8220;olive oil&#8221; only within the domain redflagdeals.com.  Set the &#8220;Result type&#8221; to &#8220;Everything&#8221;, &#8220;How often&#8221; to &#8220;As-it-happens&#8221;, and &#8220;How many&#8221; to &#8220;All results&#8221;.</p>
<p>Whenever somebody creates a new forum post on RFD with the term &#8220;olive oil&#8221;, you will be notified of the post! Not all notifications will be about deals that you want, but it&#8217;s a better system than manually hunting for bargains.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2012/03/15/productivity-protip-redflagdeals-google-alerts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>
	</item>
		<item>
		<title>Easy JavaScript Colour Gradients</title>
		<link>https://zingming.wordpress.com/2012/03/13/javascript-color-gradient-library/</link>
					<comments>https://zingming.wordpress.com/2012/03/13/javascript-color-gradient-library/#respond</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Wed, 14 Mar 2012 02:15:01 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[rainbow]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=1024</guid>

					<description><![CDATA[RainbowVis-JS is JavaScript library I wrote for colour data visualization. Easily map numbers to a smooth-transitioning colour legend. Mappings Default 0 -&#62; #ff0000 10 -&#62; #ff4d00 20 -&#62; #ff9900 30 -&#62; #ffe500 40 -&#62; #ccff00 50 -&#62; #80ff00 60 -&#62; &#8230; <a href="https://zingming.wordpress.com/2012/03/13/javascript-color-gradient-library/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a title="RainbowVis-JS at github" href="https://github.com/anomal/RainbowVis-JS">RainbowVis-JS</a> is JavaScript library I wrote for colour data visualization. Easily map numbers to a smooth-transitioning colour legend.</p>
<h2>Mappings</h2>
<h3>Default</h3>
<p><span style="color:#ff0000;">0 -&gt; #ff0000</span><br />
<span style="color:#ff4d00;">10 -&gt; #ff4d00</span><br />
<span style="color:#ff9900;">20 -&gt; #ff9900</span><br />
<span style="color:#ffe500;">30 -&gt; #ffe500</span><br />
<span style="color:#ccff00;">40 -&gt; #ccff00</span><br />
<span style="color:#80ff00;">50 -&gt; #80ff00</span><br />
<span style="color:#33ff00;">60 -&gt; #33ff00</span><br />
<span style="color:#00e619;">70 -&gt; #00e619</span><br />
<span style="color:#009966;">80 -&gt; #009966</span><br />
<span style="color:#004db3;">90 -&gt; #004db3</span><br />
<span style="color:#0000ff;">100 -&gt; #0000ff</span></p>
<h3>Custom</h3>
<p><span style="color:#ff0000;">-0.5 -&gt; #ff0000</span><br />
<span style="color:#ff3333;">-0.4 -&gt; #ff3333</span><br />
<span style="color:#ff6666;">-0.3 -&gt; #ff6666</span><br />
<span style="color:#ff9999;">-0.2 -&gt; #ff9999</span><br />
<span style="color:#ffcccc;">-0.1 -&gt; #ffcccc</span><br />
<span style="color:#ffffff;">0 -&gt; #ffffff</span><br />
<span style="color:#ccffcc;">0.1 -&gt; #ccffcc</span><br />
<span style="color:#99ff99;">0.2 -&gt; #99ff99</span><br />
<span style="color:#66ff66;">0.3 -&gt; #66ff66</span><br />
<span style="color:#33ff33;">0.4 -&gt; #33ff33</span><br />
<span style="color:#00ff00;">0.5 -&gt; #00ff00</span></p>
<h2>Data Visualization</h2>
<p>This is a heatmap-style colouring that represents the relative <a href="http://distrowatch.com/dwres.php?resource=popularity">popularity of Linux distros</a>. Red is hottest and black is coldest.</p>
<table>
<tbody>
<tr>
<th>Linux Distribution</th>
<th>Popularity (average hits per day)</th>
</tr>
<tr>
<td>Mint</td>
<td style="background-color:#ff0000;">3065</td>
</tr>
<tr>
<td>Ubuntu</td>
<td style="background-color:#8aff00;">2170</td>
</tr>
<tr>
<td>Fedora</td>
<td style="background-color:#00ff3d;">1693</td>
</tr>
<tr>
<td>openSUSE</td>
<td style="background-color:#00ffb7;">1398</td>
</tr>
<tr>
<td>Debian</td>
<td style="background-color:#00ffc5;">1365</td>
</tr>
<tr>
<td>Arch</td>
<td style="background-color:#00f3ff;">1197</td>
</tr>
<tr>
<td>CentOS</td>
<td style="background-color:#0099ff;">980</td>
</tr>
<tr>
<td>PCLinuxOS</td>
<td style="background-color:#008cff;">950</td>
</tr>
<tr>
<td>Puppy</td>
<td style="background-color:#006dff;">876</td>
</tr>
<tr>
<td>Mageia</td>
<td style="background-color:#0041ff;">770</td>
</tr>
</tbody>
</table>
<h2>Canvas Drawing</h2>
<p>I drew this with HTML5 Canvas, but the below image is just a screen capture.</p>
<p><img loading="lazy" data-attachment-id="1026" data-permalink="https://zingming.wordpress.com/2012/03/13/javascript-color-gradient-library/rainbowvis-js-2/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png" data-orig-size="277,144" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="rainbowvis-js" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png?w=277" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png?w=277" class="aligncenter size-full wp-image-1026" title="See example.html for real Canvas drawing" src="https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png?w=640" alt="Rainbow arc originally drawn with HTML5 Canvas"   srcset="https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png 277w, https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png?w=150&amp;h=78 150w" sizes="(max-width: 277px) 100vw, 277px" /><br />
A working demo of these examples&mdash;with source code&mdash;are in the example.html file in the <a title="RainbowVis-JS at github" href="https://github.com/anomal/RainbowVis-JS">github repository</a>.</p>
<p><span id="more-1024"></span></p>
<h2>API</h2>
<p>The Rainbow class by default maps the range 0 to 100 (inclusive) to the colours of the rainbow (i.e., a gradient transitioning from red to yellow to lime to blue).</p>
<p><code>var rainbow = new Rainbow();</code> creates new instance of Rainbow. By default, the number range is from 0 to 100, and the spectrum is a rainbow.</p>
<p><code>rainbow.colourAt(number);</code> returns the hex colour corresponding to the number. If number is out of range, it returns the appropriate hex colour corresponding to either the minNumber or maxNumber.</p>
<p><code>rainbow.setSpectrum(colour1, colour2 [,colourN]);</code> sets the spectrum of the Rainbow object. By default, the spectrum is a rainbow. You must have a minimum of two colours, but you can specify more than two colours. Colours can be in the form &#8216;red&#8217;, &#8216;ff0000&#8217;, or &#8216;#ff0000&#8217;. For example, <code>rainbow.setSpectrum('red', 'yellow', 'white');</code> makes the &#8220;Rainbow&#8221; a colour gradient from red to yellow to white.</p>
<p><code>rainbow.setNumberRange(minNumber, maxNumber);</code> sets the number range of the Rainbow object. By default, it is 0 to 100.</p>
<p>If you find any bugs, please let me know.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2012/03/13/javascript-color-gradient-library/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/03/rainbowvis-js1.png" medium="image">
			<media:title type="html">See example.html for real Canvas drawing</media:title>
		</media:content>
	</item>
		<item>
		<title>My grandmother was a diva.</title>
		<link>https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/</link>
					<comments>https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/#comments</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Wed, 11 Jan 2012 04:11:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=881</guid>

					<description><![CDATA[Rebecca Liang 1924-2012 My grandma dressed in fashionable Western clothes and wore her hair in a beehive during the 1960s. She spent her income on chocolates and countless pairs of silk stockings, silk stockings being a luxury item at the &#8230; <a href="https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" data-attachment-id="882" data-permalink="https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/pp_rebecca_glamour_portrait/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg" data-orig-size="365,493" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pp_rebecca_glamour_portrait" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg?w=222" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg?w=365" src="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg?w=640" alt="" title="Rebecca Liang (1924-2012)"   class="aligncenter size-full wp-image-882" srcset="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg 365w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg?w=111&amp;h=150 111w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg?w=222&amp;h=300 222w" sizes="(max-width: 365px) 100vw, 365px" /></p>
<p style="text-align:center;">Rebecca Liang<br />
1924-2012</p>
<p>My grandma dressed in fashionable Western clothes and wore her hair in a beehive during the 1960s.  She spent her income on chocolates and countless pairs of silk stockings, silk stockings being a luxury item at the time. My grandma thought that being a secretary was the ideal job for a woman, because she thought that secretaries were glamourous.</p>
<p><img loading="lazy" data-attachment-id="971" data-permalink="https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/pp_5a/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg" data-orig-size="351,542" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pp_5a" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg?w=194" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg?w=351" src="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg?w=640" alt="" title="pp_5a"   class="aligncenter size-full wp-image-971" srcset="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg 351w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg?w=97&amp;h=150 97w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg?w=194&amp;h=300 194w" sizes="(max-width: 351px) 100vw, 351px" /></p>
<p>She thought that red was the prettiest colour, and she hated the colour black. The colour silver was not good enough to her; she deserved gold.</p>
<p><img loading="lazy" data-attachment-id="893" data-permalink="https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/pp_rebecca_deer/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg" data-orig-size="566,412" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pp_rebecca_deer" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg?w=566" src="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg?w=640" alt="" title="Rebecca feeding a deer"   class="aligncenter size-full wp-image-893" srcset="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg 566w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg?w=150&amp;h=109 150w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg?w=300&amp;h=218 300w" sizes="(max-width: 566px) 100vw, 566px" /></p>
<p>When we went to grandma&#8217;s place, there was always an open box of chocolates, which she encouraged us to eat.  My grandma sometimes made us a sweet, peanut, dessert soup that tasted like liquid peanut butter. However, she wasn&#8217;t always a good cook. Her version of &#8220;spaghetti&#8221; was fried pasta noodles with ketchup. But she made it for us, because my sister and I liked spaghetti.</p>
<p><img loading="lazy" data-attachment-id="911" data-permalink="https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/pp_ferriswheel/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg" data-orig-size="333,498" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pp_ferriswheel" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg?w=201" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg?w=333" src="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg?w=640" alt="" title="Rebecca poses"   class="aligncenter size-full wp-image-911" srcset="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg 333w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg?w=100&amp;h=150 100w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg?w=201&amp;h=300 201w" sizes="(max-width: 333px) 100vw, 333px" /> </p>
<p>Whenever I was bored, I could pore over her <em>National Geographic</em> collection, which she subscribed to for many years. My grandma was smart. She could do lightning-fast mental arithmetic and made sure people didn&#8217;t shortchange her. She was literate in English and Chinese, and she learned French and Japanese.</p>
<p><img loading="lazy" data-attachment-id="929" data-permalink="https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/pp_4d/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg" data-orig-size="522,371" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pp_4d" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg?w=522" src="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg?w=640" alt=""   class="aligncenter size-full wp-image-929" srcset="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg 522w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg?w=150&amp;h=107 150w, https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg?w=300&amp;h=213 300w" sizes="(max-width: 522px) 100vw, 522px" /></p>
<p>In her later years, my grandma started to forget, and became more depressed and silent. She started having trouble counting. When someone told her that I was her granddaughter, she told them they were crazy. She started losing her appetite, so we gave her Ensure or Boost meal replacement, in chocolate flavour.</p>
<p>My grandmother was 87 when she passed away in her sleep on the morning of January 1st, New Year&#8217;s Day. My grandma was a diva, and she was fabulous.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2012/01/10/my-grandmother-was-a-diva/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_glamour_portrait.jpg" medium="image">
			<media:title type="html">Rebecca Liang (1924-2012)</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_5a.jpg" medium="image">
			<media:title type="html">pp_5a</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_rebecca_deer.jpg" medium="image">
			<media:title type="html">Rebecca feeding a deer</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_ferriswheel.jpg" medium="image">
			<media:title type="html">Rebecca poses</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2012/01/pp_4d.jpg" medium="image" />
	</item>
		<item>
		<title>Best Monospace Font</title>
		<link>https://zingming.wordpress.com/2011/12/27/best-monospace-font/</link>
					<comments>https://zingming.wordpress.com/2011/12/27/best-monospace-font/#respond</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Tue, 27 Dec 2011 17:50:35 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Anonymous Pro]]></category>
		<category><![CDATA[Consolas]]></category>
		<category><![CDATA[DejaVu Sans Mono]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[Inconsolata]]></category>
		<category><![CDATA[monospace]]></category>
		<category><![CDATA[typeface]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=807</guid>

					<description><![CDATA[Here are my top four monospace fonts displaying &#8220;In 100 years, Gates and Jobs will be forgotten, but Torvalds&#8217; name will live on.&#8221; 1. Consolas I first noticed this font when looking at my friend&#8217;s printed Java code before a &#8230; <a href="https://zingming.wordpress.com/2011/12/27/best-monospace-font/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Here are my top four monospace fonts displaying &#8220;In 100 years, Gates and Jobs will be forgotten, but Torvalds&#8217; name will live on.&#8221;</p>
<h3>1. Consolas</h3>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png"><img loading="lazy" data-attachment-id="808" data-permalink="https://zingming.wordpress.com/2011/12/27/best-monospace-font/consolas/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png" data-orig-size="591,61" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="consolas" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png?w=591" src="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png?w=640" alt="In 100 years, Gates and Jobs will be forgotten, but Torvalds' name will live on." title="Consolas"   class="aligncenter size-full wp-image-808" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png 591w, https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png?w=150&amp;h=15 150w, https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png?w=300&amp;h=31 300w" sizes="(max-width: 591px) 100vw, 591px" /></a><br />
I first noticed this font when looking at my friend&#8217;s printed Java code before a test. I had never seen such a nice-looking monospace font, since I usually work in Ubuntu Linux. I found out that she printed it out in Notepad++, and it was a Windows font named <a href="http://en.wikipedia.org/wiki/Consolas">Consolas</a> designed by Lucas de Groot. I prefer free fonts to proprietary (especially Windows) fonts, but Consolas looks the best.</p>
<h3>2. DejaVu Sans Mono (&#8216;Monospace&#8217; font of Ubuntu 10.04 Terminal)</h3>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png"><img loading="lazy" data-attachment-id="823" data-permalink="https://zingming.wordpress.com/2011/12/27/best-monospace-font/dejavusansmono/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png" data-orig-size="602,66" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="dejavusansmono" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png?w=602" src="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png?w=640" alt="In 100 years, Gates and Jobs will be forgotten, but Torvalds' name will live on." title="Deja Vu Sans Mono"   class="aligncenter size-full wp-image-823" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png 602w, https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png?w=150&amp;h=16 150w, https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png?w=300&amp;h=33 300w" sizes="(max-width: 602px) 100vw, 602px" /></a><br />
This is the default Terminal font of Ubuntu 10.04. It is listed as <a href="http://mandrivausers.org/index.php?/topic/85593-monospace-font/">&#8216;Monospace&#8217;</a>, but <a href="http://ubuntuforums.org/showthread.php?t=1311281">&#8216;Monospace&#8217; is an alias</a> for DejaVu Sans Mono. <a href="http://en.wikipedia.org/wiki/DejaVu_fonts">DejaVu fonts</a> are free. It&#8217;s not as nice as Consolas, and the zero is dotted instead of slashed, but it looks very nice on the console.</p>
<h3>3. Inconsolata</h3>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png"><img loading="lazy" data-attachment-id="812" data-permalink="https://zingming.wordpress.com/2011/12/27/best-monospace-font/inconsolata/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png" data-orig-size="585,56" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="inconsolata" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png?w=585" src="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png?w=640" alt="In 100 years, Gates and Jobs will be forgotten, but Torvalds' name will live on." title="Inconsolata"   class="aligncenter size-full wp-image-812" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png 585w, https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png?w=150&amp;h=14 150w, https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png?w=300&amp;h=29 300w" sizes="(max-width: 585px) 100vw, 585px" /></a><br />
Inspired by Consolas, Raph Levien designed the free font <a href="http://en.wikipedia.org/wiki/Inconsolata">Inconsolata</a> and released it under the SIL Open Font License. It has a slashed zero, and the dots of the i&#8217;s and the periods are circles instead of squares, but the font looks a bit vertically stretched.</p>
<h3>4. Anonymous Pro</h3>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png"><img loading="lazy" data-attachment-id="811" data-permalink="https://zingming.wordpress.com/2011/12/27/best-monospace-font/anonymouspro/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png" data-orig-size="589,60" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="AnonymousPro" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png?w=589" src="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png?w=640" alt="In 100 years, Gates and Jobs will be forgotten, but Torvalds' name will live on." title="Anonymous Pro"   class="aligncenter size-full wp-image-811" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png 589w, https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png?w=150&amp;h=15 150w, https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png?w=300&amp;h=31 300w" sizes="(max-width: 589px) 100vw, 589px" /></a><br />
<a href="http://hivelogic.com/articles/anonymous-pro-programming-monospace-font/">Anonymous Pro</a> is another free font. The letters are aesthetically proportional and the zero is slashed, but it is a bit over-the-top with some overly serifed numbers and uppercase letters. </p>
<p>Dan Benjamin has a similar list in <a href="http://hivelogic.com/articles/top-10-programming-fonts/">Top 10 Programming Fonts</a>, if you want to see more favourably-reviewed monospaced fonts.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2011/12/27/best-monospace-font/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/12/consolas.png" medium="image">
			<media:title type="html">Consolas</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/12/dejavusansmono.png" medium="image">
			<media:title type="html">Deja Vu Sans Mono</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/12/inconsolata.png" medium="image">
			<media:title type="html">Inconsolata</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/12/anonymouspro.png" medium="image">
			<media:title type="html">Anonymous Pro</media:title>
		</media:content>
	</item>
		<item>
		<title>Make Perl regex script faster using grep</title>
		<link>https://zingming.wordpress.com/2011/12/26/perl-regular-expressions-slow/</link>
					<comments>https://zingming.wordpress.com/2011/12/26/perl-regular-expressions-slow/#respond</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Mon, 26 Dec 2011 14:35:08 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[egrep]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expressions]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=662</guid>

					<description><![CDATA[Perl&#8217;s implementation of regular expressions performs much worse than grep&#8217;s implementation of regular expressions (i.e., Thompson NFA). Time to match a?nan against an I needed to write a Perl script to process numerous large log files, and Perl&#8217;s regex matching &#8230; <a href="https://zingming.wordpress.com/2011/12/26/perl-regular-expressions-slow/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://swtch.com/~rsc/regexp/regexp1.html">Perl&#8217;s implementation of regular expressions performs much worse than grep&#8217;s implementation of regular expressions (i.e., Thompson NFA).</a> </p>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png"><img loading="lazy" data-attachment-id="663" data-permalink="https://zingming.wordpress.com/2011/12/26/perl-regular-expressions-slow/grep3p/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png" data-orig-size="301,148" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="grep3p" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png?w=301" src="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png?w=640" alt=""   class="size-full wp-image-663" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png 301w, https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png?w=150&amp;h=74 150w" sizes="(max-width: 301px) 100vw, 301px" /></a> <a href="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png"><img loading="lazy" data-attachment-id="664" data-permalink="https://zingming.wordpress.com/2011/12/26/perl-regular-expressions-slow/grep4p/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png" data-orig-size="301,148" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="grep4p" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png?w=301" src="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png?w=640" alt=""   class="size-full wp-image-664" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png 301w, https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png?w=150&amp;h=74 150w" sizes="(max-width: 301px) 100vw, 301px" /></a></p>
<p style="text-align:center;">Time to match <code>a?</code><sup><i>n</i></sup><code>a</code><sup><i>n</i></sup> against <code>a</code><sup><i>n</i></sup></p>
<p>I needed to write a Perl script to process numerous large log files, and Perl&#8217;s regex matching was not fast enough. </p>
<p>In a Unix/Linux environment, you can call the system() subroutine within Perl to execute shell commands like grep. In appropriate situations, it might be more efficient to call grep instead of using Perl to open files, read them line by line, and match each line against a regular expression. However, I needed backreferences to extract strings within a pattern, and <a href="http://www.panix.com/~elflord/unix/grep.html#backref">grep only supports backreferences within the regular expression</a>, not backreferences that can be used after. </p>
<p>I managed to reduce my script execution time for a given data set from 20 seconds to 11 seconds by combining grep and native Perl regular expression matching. I found the matching lines of the log files using grep, outputted the results to a temp file, and then used Perl regex matching to process the lines in the temp file.</p>
<p>For another part of my script, I tried using<br />
<code>system("echo '$string' | egrep '$pattern' &gt; /dev/null") == 0</code><br />
instead of<br />
<code>$string =~ m/$pattern/</code><br />
within a loop, because I thought that (e)grep would always be faster, but system calls are expensive, so it ended up making my script unbearably slow.</p>
<p>In summary, if you need to speed up your Perl script and your Perl script processes text files, calling grep might improve performance. However, calling grep within a loop tends to be inefficient.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2011/12/26/perl-regular-expressions-slow/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep3p.png" medium="image" />

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/12/grep4p.png" medium="image" />
	</item>
		<item>
		<title>The new TTC subway train has shiny things.</title>
		<link>https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/</link>
					<comments>https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/#comments</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Wed, 05 Oct 2011 01:00:01 +0000</pubDate>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[subway]]></category>
		<category><![CDATA[Toronto]]></category>
		<category><![CDATA[TTC]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=617</guid>

					<description><![CDATA[On Saturday, I walked from one end of the new TTC subway train to the other. As I passed by, I grabbed a red handle bar at the top and pulled it down to a vertical position. When I let &#8230; <a href="https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>On Saturday, I walked from one end of the <a href="https://zingming.wordpress.com/2011/09/05/new-ttc-subway-train-like-spaceship/">new TTC subway train</a> to the other.</p>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg"><img loading="lazy" data-attachment-id="618" data-permalink="https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/newttcsubway1/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg" data-orig-size="640,480" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon PowerShot A560&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1317468492&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;5.8&quot;,&quot;iso&quot;:&quot;400&quot;,&quot;shutter_speed&quot;:&quot;0.016666666666667&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="newttcsubway1" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg?w=640" src="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg?w=640&#038;h=480" alt="" width="640" height="480" class="aligncenter size-full wp-image-618" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg 640w, https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg?w=150&amp;h=113 150w, https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg?w=300&amp;h=225 300w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>As I passed by, I grabbed a red handle bar at the top and pulled it down to a vertical position. When I let it go, it moved back to its default horizontal position.</p>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg"><img loading="lazy" data-attachment-id="619" data-permalink="https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/newttcsubway2/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg" data-orig-size="640,480" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon PowerShot A560&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1317468244&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;5.8&quot;,&quot;iso&quot;:&quot;400&quot;,&quot;shutter_speed&quot;:&quot;0.0125&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="newttcsubway2" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg?w=640" src="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg?w=640&#038;h=480" alt="" width="640" height="480" class="aligncenter size-full wp-image-619" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg 640w, https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg?w=150&amp;h=113 150w, https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg?w=300&amp;h=225 300w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>Going south on the Yonge-University-Spadina line means that orange LEDs turn green. The next stop is a flashing LED. If the LED connects to another subway line, it might not turn green after you pass it.</p>
<p><a href="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg"><img loading="lazy" data-attachment-id="620" data-permalink="https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/newttcsubway3/" data-orig-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg" data-orig-size="640,480" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.6&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon PowerShot A560&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1317468401&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;5.8&quot;,&quot;iso&quot;:&quot;400&quot;,&quot;shutter_speed&quot;:&quot;0.008&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="newttcsubway3" data-image-description="" data-image-caption="" data-medium-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg?w=300" data-large-file="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg?w=640" src="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg?w=640&#038;h=480" alt="" width="640" height="480" class="aligncenter size-full wp-image-620" srcset="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg 640w, https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg?w=150&amp;h=113 150w, https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg?w=300&amp;h=225 300w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>Subway cars are connected together with shiny plates of metal that you can step on. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2011/10/04/new-ttc-subway-train-has-shiny-things/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway1.jpg" medium="image" />

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway2.jpg" medium="image" />

		<media:content url="https://zingming.wordpress.com/wp-content/uploads/2011/10/newttcsubway3.jpg" medium="image" />
	</item>
		<item>
		<title>Authenticity and Job Interviews</title>
		<link>https://zingming.wordpress.com/2011/09/24/authenticity-and-job-interviews/</link>
					<comments>https://zingming.wordpress.com/2011/09/24/authenticity-and-job-interviews/#comments</comments>
		
		<dc:creator><![CDATA[Zing-Ming]]></dc:creator>
		<pubDate>Sun, 25 Sep 2011 03:36:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[authenticity]]></category>
		<category><![CDATA[job interview]]></category>
		<guid isPermaLink="false">http://zingming.wordpress.com/?p=514</guid>

					<description><![CDATA[From my past experience as a job seeker, I performed the best on job interviews when I didn&#8217;t care about being weird. Sometimes people give well-meaning advice about what not to do during interviews, but this primes the interviewee into &#8230; <a href="https://zingming.wordpress.com/2011/09/24/authenticity-and-job-interviews/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>From my past experience as a job seeker, I performed the best on job interviews when I didn&#8217;t care about being weird. Sometimes people give well-meaning advice about what not to do during interviews, but this primes the interviewee into behaving as average as possible and suppressing personality.</p>
<p>For example, a younger peer advised me not to wear my hat, a <a href="http://en.wikipedia.org/wiki/Homburg_(hat)">homburg</a>, to an interview, because it was &#8220;weird&#8221;. As I approached the interview room, I felt fake for pretending to be a non-hat-wearing person when I would normally wear my hat. I felt self-conscious and awkward, and I pretended to be a normal, non-hat-wearing person. </p>
<p>When the interviewer asked me, &#8220;If I was blind, how would you describe the colour blue to me?&#8221;, I was more concerned with not being weird, and giving him the answer that I thought he wanted, than with answering honestly and being myself. The other interviewer thought that it would be an &#8220;easy&#8221; question for me because of my background in cognitive science and artificial intelligence. While one could argue that the question is actually &#8220;very difficult&#8221; to answer seriously because of the massive scope of the problem, one could also argue that my mind was simply not tuned to creative thinking that day. (Because I didn&#8217;t have my hat.)</p>
<p><span id="more-514"></span>That was my second interview of a week of five interviews. </p>
<p>I didn&#8217;t care much about preparing for my fifth and last interview, which was a phone interview at the end of a long day. I no longer cared about speaking formally, and I instead spoke casually and honestly, saying whatever came to my head with little censorship. When the interviewer asked about my skill level in Unix/Linux, I answered something ridiculous and pretentious like, &#8220;I know there are always going to be <em>Linux gurus</em> and <em>Unix gurus</em>, but I&#8217;m pretty good with the command line compared to the other students in my program.&#8221; My other answers were similarly spontaneous and atypical. This turned out to be a good thing, because I was eloquent and effusive instead of stilted and stale. I also learned during the interview that the job was much more interesting and appealing than I had initially thought.</p>
<p>I got the job.</p>
<p>For a previous summer job, I knew I performed really well on the interview too, because I answered honestly and I was being myself, although it was more about the integration of cognitive science &amp; AI with my personal goals and motivations. I learned that you should be yourself and answer honestly during a job interview. If they don&#8217;t like your true personality, then the work environment may be a poor fit for you anyway.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zingming.wordpress.com/2011/09/24/authenticity-and-job-interviews/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://1.gravatar.com/avatar/da9f301927dea6be1aaec36c04c7397c6757c92332f51303de99817ae1073ee4?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Zing-Ming</media:title>
		</media:content>
	</item>
	</channel>
</rss>
