<?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/"
	>

<channel>
	<title>Tech Notes</title>
	<atom:link href="http://luchaji.net/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://luchaji.net/wordpress</link>
	<description>YATB (Yet Another Tech Blog)</description>
	<lastBuildDate>Tue, 17 Aug 2010 19:35:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>C# Static and Instance Constructor Order</title>
		<link>http://luchaji.net/wordpress/?p=326</link>
		<comments>http://luchaji.net/wordpress/?p=326#comments</comments>
		<pubDate>Tue, 17 Aug 2010 19:02:37 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=326</guid>
		<description><![CDATA[Investigating the ordering of static and instance constructor calls.
Static constructors get called only once in the entire program&#8217;s lifetime- the first time the class or any of its members gets referenced.
Instance constructors are called per object instantiation.

public class Base
{
    static Base()
    {
        Console.WriteLine(&#34;Base static class constructor&#34;);
    }

    public Base()
    {
        Console.WriteLine(&#34;Base instance constructor&#34;);
    }
}

public class Derived : Base
{
    static Derived()
    {
       Console.WriteLine(&#34;Derived static class constructor&#34;);
    }

    public Derived()
    {
        Console.WriteLine(&#34;Derived instance constructor&#34;);
    }
}

class Program
{
    static void Main(string[] args)
    {
        Base b = new Derived();
        Console.WriteLine(&#34;Done&#34;);
    }
}

The program results are shown here:

Derived static class constructor
Base static class constructor
Base instance constructor
Derived instance constructor
Done

Something interesting came out of this test.
- instance constructors are called base class first, [...]]]></description>
			<content:encoded><![CDATA[<p>Investigating the ordering of static and instance constructor calls.</p>
<p>Static constructors get called only once in the entire program&#8217;s lifetime- the first time the class or any of its members gets referenced.</p>
<p>Instance constructors are called per object instantiation.</p>
<pre class="syntax-highlight:csharp">
public class Base
{
    static Base()
    {
        Console.WriteLine(&quot;Base static class constructor&quot;);
    }

    public Base()
    {
        Console.WriteLine(&quot;Base instance constructor&quot;);
    }
}

public class Derived : Base
{
    static Derived()
    {
       Console.WriteLine(&quot;Derived static class constructor&quot;);
    }

    public Derived()
    {
        Console.WriteLine(&quot;Derived instance constructor&quot;);
    }
}

class Program
{
    static void Main(string[] args)
    {
        Base b = new Derived();
        Console.WriteLine(&quot;Done&quot;);
    }
}
</pre>
<p>The program results are shown here:</p>
<pre class="syntax-highlight:csharp">
Derived static class constructor
Base static class constructor
Base instance constructor
Derived instance constructor
Done
</pre>
<p>Something interesting came out of this test.<br />
- instance constructors are called base class first, derived class second<br />
- static constructors are called derived class first, base class second</p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=326</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singapore First Impressions</title>
		<link>http://luchaji.net/wordpress/?p=323</link>
		<comments>http://luchaji.net/wordpress/?p=323#comments</comments>
		<pubDate>Tue, 27 Jul 2010 13:21:53 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Singapore]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=323</guid>
		<description><![CDATA[
Food heaven
Pricey housing
Temperature not so bad

]]></description>
			<content:encoded><![CDATA[<ul>
<li>Food heaven</li>
<li>Pricey housing</li>
<li>Temperature not so bad</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=323</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Day count conventions</title>
		<link>http://luchaji.net/wordpress/?p=321</link>
		<comments>http://luchaji.net/wordpress/?p=321#comments</comments>
		<pubDate>Sat, 24 Jul 2010 23:19:39 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=321</guid>
		<description><![CDATA[For accrued interest calculations, the calculator must be clear on the use of day count conventions.
Accrued interest is calculated as follows:
AI = P x IR x T
where
AI = accrued interest
P = principal
IR = interest rate, annualised
T = fraction of the year

The fraction of the year is calculated as follows:

actual/360, Each month is treated normally and the year is assumed to be 360 days e.g. in a period from February 1, 2005 to April 1, 2005 T is considered to be 59 days divided by 360.
30/360, Each month is treated as having 30 days, so a period from February 1, 2005 to April 1, 2005 is considered to be 60 days. The year is considered to have 360 days. This convention is frequently chosen for ease of calculation: the payments tend to be regular and at predictable amounts.
actual/365, Each month is treated normally, and the year is assumed to have 365 days, regardless of leap year status. For example, a period from February 1, 2005 to April 1, 2005 is considered to be 59 days. This convention results in periods having slightly different lengths.
actual/actual (ACT/ACT), Each month is treated normally, and the year has the usual number of days. For example, [...]]]></description>
			<content:encoded><![CDATA[<p>For accrued interest calculations, the calculator must be clear on the use of day count conventions.</p>
<p>Accrued interest is calculated as follows:<br />
<code>AI = P x IR x T<br />
where<br />
AI = accrued interest<br />
P = principal<br />
IR = interest rate, annualised<br />
T = fraction of the year<br />
</code></p>
<p>The fraction of the year is calculated as follows:</p>
<ol>
<li><strong>actual/360</strong>, Each month is treated normally and the year is assumed to be 360 days e.g. in a period from February 1, 2005 to April 1, 2005 T is considered to be 59 days divided by 360.</li>
<li><strong>30/360</strong>, Each month is treated as having 30 days, so a period from February 1, 2005 to April 1, 2005 is considered to be 60 days. The year is considered to have 360 days. This convention is frequently chosen for ease of calculation: the payments tend to be regular and at predictable amounts.</li>
<li><strong>actual/365</strong>, Each month is treated normally, and the year is assumed to have 365 days, regardless of leap year status. For example, a period from February 1, 2005 to April 1, 2005 is considered to be 59 days. This convention results in periods having slightly different lengths.</li>
<li><strong>actual/actual (ACT/ACT)</strong>, Each month is treated normally, and the year has the usual number of days. For example, a period from February 1, 2005 to April 1, 2005 is considered to be 59 days. In this convention leap years do affect the final result.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=321</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unreal</title>
		<link>http://luchaji.net/wordpress/?p=317</link>
		<comments>http://luchaji.net/wordpress/?p=317#comments</comments>
		<pubDate>Sat, 24 Jul 2010 19:47:38 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Singapore]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=317</guid>
		<description><![CDATA[The 19 hour ride into Singapore from NYC was smooth.  So smooth I didn&#8217;t want to leave the plane cabin&#8217;s double-width flat beds.
It was also the first time I&#8217;ve ever gotten an airline&#8217;s escort boarding the plane.  We were the only passengers with a baby on the all business seat plane- and the airline staff carried our baggage and stroller onto the plane.  All along the flight- 40,000 feet over Canada, the Arctic, Siberia, and China- the service was high class.  A big shoutout kudos to Singapore Airlines!
A waiting company-hired driver awaiting us at the airport whisked us efficiently in the early morning to our residence.  Upon arrival, he refused to take a tip.  Is that the culture here?
The company-provided residence likewise is first world first class.
Today, a day after our arrival, a company-provided guide took us to a local food court.  WOWZERS.  It&#8217;s like a living dream come true.  Food stalls lined up from one of a football stadium-sized court to the other end.  And cheap!  Needless to say, the wife was very happy.
And at the same time, there was a live Chinese opera show in Mandarin.  [...]]]></description>
			<content:encoded><![CDATA[<p>The 19 hour ride into Singapore from NYC was smooth.  So smooth I didn&#8217;t want to leave the plane cabin&#8217;s double-width flat beds.</p>
<p>It was also the first time I&#8217;ve ever gotten an airline&#8217;s escort boarding the plane.  We were the only passengers with a baby on the all business seat plane- and the airline staff carried our baggage and stroller onto the plane.  All along the flight- 40,000 feet over Canada, the Arctic, Siberia, and China- the service was high class.  A big shoutout kudos to Singapore Airlines!</p>
<p>A waiting company-hired driver awaiting us at the airport whisked us efficiently in the early morning to our residence.  Upon arrival, he refused to take a tip.  Is that the culture here?</p>
<p>The company-provided residence likewise is first world first class.</p>
<p>Today, a day after our arrival, a company-provided guide took us to a local food court.  WOWZERS.  It&#8217;s like a living dream come true.  Food stalls lined up from one of a football stadium-sized court to the other end.  And cheap!  Needless to say, the wife was very happy.</p>
<p>And at the same time, there was a live Chinese opera show in Mandarin.  Awesome.  This is the exact reason why I took my kids here- to infuse them with a love of Chinese culture- and yet take on an education with westernized touches.  Livin&#8217; da Dream.</p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=317</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singapore At Long Last</title>
		<link>http://luchaji.net/wordpress/?p=310</link>
		<comments>http://luchaji.net/wordpress/?p=310#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:29:33 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Singapore]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=310</guid>
		<description><![CDATA[A picture is worth a thousand words.  Here&#8217;s a thousand words for now.  In brief, Singapore is even more beautiful in person than in pictures.  
It&#8217;s been an unbelievable ride.  

]]></description>
			<content:encoded><![CDATA[<p>A picture is worth a thousand words.  Here&#8217;s a thousand words for now.  In brief, Singapore is even more beautiful in person than in pictures.  </p>
<p>It&#8217;s been an <em><strong>unbelievable ride.</strong></em>  </p>
<p><img src="http://imgur.com/AamFb.jpg" alt="" title="Hosted by imgur.com" /></p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=310</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canary Wharf</title>
		<link>http://luchaji.net/wordpress/?p=308</link>
		<comments>http://luchaji.net/wordpress/?p=308#comments</comments>
		<pubDate>Fri, 16 Jul 2010 20:24:46 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Finance]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=308</guid>
		<description><![CDATA[The culture in Canary Wharf is a bit interesting.  Everyone heads down to the local watering pub after hours- and that&#8217;s where the real work gets done.  The players exchange the local office gossip, make contact with other folks without having to go through the dreaded Office calendar scheduler (ugh) &#8230;

]]></description>
			<content:encoded><![CDATA[<p>The culture in Canary Wharf is a bit interesting.  Everyone heads down to the local watering pub after hours- and that&#8217;s where the real work gets done.  The players exchange the local office gossip, make contact with other folks without having to go through the dreaded Office calendar scheduler (ugh) &#8230;</p>
<p><img src="http://imgur.com/H67HF.jpg" alt="" title="Hosted by imgur.com" /></p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=308</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Image::EXIF</title>
		<link>http://luchaji.net/wordpress/?p=306</link>
		<comments>http://luchaji.net/wordpress/?p=306#comments</comments>
		<pubDate>Sun, 11 Jul 2010 05:52:21 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=306</guid>
		<description><![CDATA[While trying to use perl to extract photo metadata information from my camera files, I ran into a very common problem.  My perl script failed to find the Image::EXIF perl module.  Well, no problem, I&#8217;d just hit up cpan for it.  And sure enough, cpan is only too happy to oblige with a download of the latest Image::EXIF module code. 
After I downloaded and extracted the tarball, I followed the usual README instructions to build and install this perl module.  Then I hit upon another error:
cc  -shared -O2 -g -L/usr/local/lib EXIF.o asahi.o canon.o casio.o exif.o exifgps.o exifutil.o fuji.o getopt.o jpeg.o leica.o makers.o minolta.o nikon.o olympus.o panasonic.o sanyo.o tagdefs.o timevary.o  -o blib/arch/auto/Image/EXIF/EXIF.so 	\
	   -lexif  	\
/usr/bin/ld: cannot find -lexif

What&#8217;s this exif library?  I searched for this exif library online and found the source here. 
Exif is a lower level C library used by the perl Image::EXIF module.  I extracted, built, and installed this library without any other problems.  Once installed, I was able to extract photo metadata information just fine. 
Perl rocks. 
]]></description>
			<content:encoded><![CDATA[<p>While trying to use perl to extract photo metadata information from my camera files, I ran into a very common problem.  My perl script failed to find the Image::EXIF perl module.  Well, no problem, I&#8217;d just hit up cpan for it.  And sure enough, cpan is only too happy to oblige with a download of the latest <a href="http://search.cpan.org/~ccpro/Image-EXIF-0.99.4/EXIF.pm">Image::EXIF module code</a>. </p>
<p>After I downloaded and extracted the tarball, I followed the usual README instructions to build and install this perl module.  Then I hit upon another error:</p>
<p><code>cc  -shared -O2 -g -L/usr/local/lib EXIF.o asahi.o canon.o casio.o exif.o exifgps.o exifutil.o fuji.o getopt.o jpeg.o leica.o makers.o minolta.o nikon.o olympus.o panasonic.o sanyo.o tagdefs.o timevary.o  -o blib/arch/auto/Image/EXIF/EXIF.so 	\<br />
	   -lexif  	\</p>
<p>/usr/bin/ld: cannot find -lexif<br />
</code></p>
<p>What&#8217;s this exif library?  I searched for this exif library online and found the <a href="http://downloads.sourceforge.net/project/libexif/libexif/0.6.19/libexif-0.6.19.tar.gz?use_mirror=softlayer&#038;ts=1278826928">source here</a>. </p>
<p>Exif is a lower level C library used by the perl Image::EXIF module.  I extracted, built, and installed this library without any other problems.  Once installed, I was able to extract photo metadata information just fine. </p>
<p>Perl rocks. </p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=306</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singapore Part III</title>
		<link>http://luchaji.net/wordpress/?p=304</link>
		<comments>http://luchaji.net/wordpress/?p=304#comments</comments>
		<pubDate>Tue, 29 Jun 2010 01:31:26 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Singapore]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=304</guid>
		<description><![CDATA[A lot of folks say Singapore is &#8217;such a small country!&#8217;  I find this comment incredulous.  Why?  According to my fact checking (see earlier post), Singapore&#8217;s land mass is greater than that of metropolitan New York City.  Yet in over two decades in NYC, I have never been to every corner of the city.  And I wouldn&#8217;t even if I had the chance.  There are neighborhoods you&#8217;d never visit even if they invite you over a thousand times.  So why complain over Singapore&#8217;s &#8220;small size&#8221;? 
In fact, in all my time in NYC, I&#8217;d say there are no places to go during the winters.  The winters here are so cold that we just stay home almost the entire season.  That&#8217;s another reason NYC doesn&#8217;t suit me. 
]]></description>
			<content:encoded><![CDATA[<p>A lot of folks say Singapore is &#8217;such a small country!&#8217;  I find this comment incredulous.  Why?  According to my fact checking (see earlier post), Singapore&#8217;s land mass is greater than that of metropolitan New York City.  Yet in over two decades in NYC, I have never been to every corner of the city.  And I wouldn&#8217;t even if I had the chance.  There are neighborhoods you&#8217;d never visit even if they invite you over a thousand times.  So why complain over Singapore&#8217;s &#8220;small size&#8221;? </p>
<p>In fact, in all my time in NYC, I&#8217;d say there are no places to go during the winters.  The winters here are so cold that we just stay home almost the entire season.  That&#8217;s another reason NYC doesn&#8217;t suit me. </p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=304</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://luchaji.net/wordpress/?p=300</link>
		<comments>http://luchaji.net/wordpress/?p=300#comments</comments>
		<pubDate>Wed, 23 Jun 2010 12:45:40 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=300</guid>
		<description><![CDATA[&#8220;There are no limits. There are only plateaus, and you must not stay there, you must go beyond them.&#8221;
&#8220;Absorb what is useful.  Reject what is useless.  Add specifically what is your own.  &#8221;  
“Showing off is the fool&#8217;s idea of glory.”
Bruce Lee
]]></description>
			<content:encoded><![CDATA[<p>&#8220;There are no limits. There are only plateaus, and you must not stay there, you must go beyond them.&#8221;</p>
<p>&#8220;Absorb what is useful.  Reject what is useless.  Add specifically what is your own.  &#8221;  </p>
<p>“Showing off is the fool&#8217;s idea of glory.”</p>
<p>Bruce Lee</p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=300</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great News!  Chinese Renminbi Appreciates!</title>
		<link>http://luchaji.net/wordpress/?p=298</link>
		<comments>http://luchaji.net/wordpress/?p=298#comments</comments>
		<pubDate>Mon, 21 Jun 2010 19:39:54 +0000</pubDate>
		<dc:creator>admin0</dc:creator>
				<category><![CDATA[Singapore]]></category>

		<guid isPermaLink="false">http://luchaji.net/wordpress/?p=298</guid>
		<description><![CDATA[This is the best news for a Singapore ex-pat from the US ever.  The US dollar has been falling relative to the Chinese renminbi in the currency markets for years.  That has always been bad news for me- as I watch my spending power decline each time I head to China. 
But hah!  No more.  Now that I get paid in Singaporean dollars, I dread the US dollar decline no more.  In fact, I now praise it.  Each 1% appreciation in Chinese renminbi is like a 1% raise for me.  Super f&#8230;.ing awesome. 
]]></description>
			<content:encoded><![CDATA[<p>This is the best news for a Singapore ex-pat from the US ever.  The US dollar has been falling relative to the Chinese renminbi in the currency markets for years.  That has always been bad news for me- as I watch my spending power decline each time I head to China. </p>
<p>But hah!  No more.  Now that I get paid in Singaporean dollars, I dread the US dollar decline no more.  In fact, I now praise it.  Each 1% appreciation in Chinese renminbi is like a 1% raise for me.  <strong>Super f&#8230;.ing awesome</strong>. </p>
]]></content:encoded>
			<wfw:commentRss>http://luchaji.net/wordpress/?feed=rss2&amp;p=298</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
