<?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>davinci’s notebook</title>
	<atom:link href="http://stargrads.net/blogs/davinci/feed/" rel="self" type="application/rss+xml" />
	<link>http://stargrads.net/blogs/davinci</link>
	<description>everything is an experiment</description>
	<lastBuildDate>Mon, 08 Mar 2010 04:11:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>fa</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Albert Kwok-Wai Yeung 「楊國偉」 and Agnes Yuk-Lan Yu 「余玉蘭」 are child abusers</title>
		<link>http://stargrads.net/blogs/davinci/2010/03/albert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers/</link>
		<comments>http://stargrads.net/blogs/davinci/2010/03/albert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 04:11:48 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[social issues]]></category>
		<category><![CDATA[Agnes Yuk-Lan Yu]]></category>
		<category><![CDATA[Albert Kwok-Wai Yeung]]></category>
		<category><![CDATA[child abuse]]></category>
		<category><![CDATA[child abusers]]></category>
		<category><![CDATA[余玉蘭]]></category>
		<category><![CDATA[楊國偉]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2483</guid>
		<description><![CDATA[
The title says it all.
]]></description>
			<content:encoded><![CDATA[<p><!--noadsense-->This post will not mean very much to anyone other than myself.</p>
<p><strong>Albert Kwok-Wai Yeung 「楊國偉」 and Agnes Yuk-Lan Yu 「余玉蘭」 are child abusers.</strong>  I just wanted to post this fact on the Internet so that it can be recorded for posterity<span id="more-2483"></span>.</p>
<p><a target='_blank' title='Child abusers Albert Kwok-Wai Yeung 「楊國偉」 and Agnes Yuk-Lan Yu 「余玉蘭」.' href='http://img197.imageshack.us/i/childabusersp.jpg/'><img src='http://img197.imageshack.us/img197/3269/childabusersp.jpg'></a></p>
<p>The nature of child abuse is such that it rarely occurs in public.  The recipients of the abuse are left to deal with its effects while the perpetrators typically face no ill consequences.</p>
<p>Actually, child abuse harms many more people than just the immediate recipients of the abuse.  The fact that Albert Kwok-Wai Yeung had been beating and threatening me since I was a child for studying the topics which would form the background of my intended Ph.D. did not merely cause me to drop out of the Ph.D. program.  It also wasted the efforts of everyone &#8212; teachers, professors, fellow graduate students, and colleagues &#8212; who helped me, who worked with me or wanted to work with me, or who otherwise poured their energies and resources into advancing science and attracting young people into their fields.  I could not attend certain scientific conferences because Albert Kwok-Wai Yeung had forbid me from or threatened me for doing so, and at many scientific meetings I could not contribute to the best of my abilities because of the need to hide my activities from him.  His actions meant that I could return very little to the scientific community for the resources that I consumed, which made me feel very guilty about being in my field, which in turn made it impossible for me to continue with my studies.</p>
<p>As another example, I&#8217;ve already written <a href="http://stargrads.net/blogs/davinci/2009/05/my-depression-in-waterloo-part-7-my-mothers-selfishness-re-visited/">previously</a> about how Agnes Yuk-Lan Yu would not stop criticising me, after I won a <abbr title="teaching assistant">TA</abbr> award, for <em>not</em> withholding information from my students &#8212; in other words, for <em>not</em> doing my job <em>poorly</em>.  Presumably, the university rewards graduate students who make an effort at teaching (even if the reward is only a little bit of recognition) to encourage the development of good lecturers.  Because of Agnes Yuk-Lan Yu&#8217;s behaviour, I stopped being a teaching assistant and never applied to lecture any courses.  Again, this wasted the efforts of many people at the university and harmed many people besides myself.</p>
<p>There is nothing that I can do to turn back the clock and undo the damage that Albert Kwok-Wai Yeung and Agnes Yuk-Lan Yu have done not just to my own scientific career, but to the broader scientific community &#8212; damage which they perpetrated through me.  But I want their names to be remembered in history for the child abusers and enemies of science that they are, so that people can learn through my mistakes how better to deal with others like them in the future.</p>
<p>&#8211; davinci 11954</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;t=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;title=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers&amp;notes=The%20title%20says%20it%20all." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;title=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers&amp;bodytext=The%20title%20says%20it%20all." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;title=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers&amp;annotation=The%20title%20says%20it%20all." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;t=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers&opener=bm&amp;ei=UTF-8&amp;d=The%20title%20says%20it%20all." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;title=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2010%2F03%2Falbert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers%2F&amp;title=Albert%20Kwok-Wai%20Yeung%20%E3%80%8C%E6%A5%8A%E5%9C%8B%E5%81%89%E3%80%8D%20and%20Agnes%20Yuk-Lan%20Yu%20%E3%80%8C%E4%BD%99%E7%8E%89%E8%98%AD%E3%80%8D%20are%20child%20abusers" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2483&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/05/thirteen-abusive-behaviours/' rel='bookmark' title='Permanent Link: Thirteen Abusive Behaviours'>Thirteen Abusive Behaviours</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2010/03/albert-kwok-wai-yeung-and-agnes-yuk-lan-yu-are-child-abusers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Physics of Star Trek by Lawrence M. Krauss</title>
		<link>http://stargrads.net/blogs/davinci/2009/12/the-physics-of-star-trek-by-lawrence-m-krauss/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/12/the-physics-of-star-trek-by-lawrence-m-krauss/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 15:22:57 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[a life in books]]></category>
		<category><![CDATA[Lawrence M. Krauss]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[plot devices]]></category>
		<category><![CDATA[science fiction]]></category>
		<category><![CDATA[space travel]]></category>
		<category><![CDATA[Star Trek]]></category>
		<category><![CDATA[The Physics of Star Trek]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=1501</guid>
		<description><![CDATA[
A popular book on the physics behind Star Trek's plot devices.
]]></description>
			<content:encoded><![CDATA[<p><!--noadsense-->The <a href="http://stargrads.net/blogs/davinci/2009/11/perimeter-scholars-international-masters-program-in-theoretical-physics/">previous post</a> advertising the <a href="http://perimeterinstitute.ca/">Perimeter Institute</a>&#8217;s <a href="http://www.perimeterscholars.org/">Master&#8217;s program</a> reminded me of this book, which continues my series &ldquo;<a href="http://stargrads.net/blogs/davinci/category/personal/a-life-in-books/">a life in books</a>&rdquo;.</p>
<p><a href="http://img246.imageshack.us/img246/4053/p7230300rotated.jpg" target="_blank"><img src="http://img246.imageshack.us/img246/4053/p7230300rotated.th.jpg" border="0" /></a></p>
<p><a href="http://www.amazon.ca/gp/product/0465002048?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=0465002048"><i>The Physics of Star Trek</i></a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=0465002048" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" /> by <a href="http://en.wikipedia.org/wiki/Lawrence_M._Krauss">Lawrence M. Krauss</a> is geared more towards Star Trek fans than towards physicists<span id="more-1501"></span>.  I remember thinking that it needed some equations, although I&#8217;m probably not the typical reader of this book.  It has just the right depth to satisfy fans of the series, but not enough detail for anyone who is actually really interested in the (pseudo-)science behind the series&#8217; plot devices.  The take-home message of the book is that traveling to another galaxy is very, <em>very</em> impossible &#8212; at least according to our currently known laws of physics.</p>
<p>&#8211; davinci 11864</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;t=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;title=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss&amp;notes=A%20popular%20book%20on%20the%20physics%20behind%20Star%20Trek%27s%20plot%20devices." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;title=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss&amp;bodytext=A%20popular%20book%20on%20the%20physics%20behind%20Star%20Trek%27s%20plot%20devices." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;title=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss&amp;annotation=A%20popular%20book%20on%20the%20physics%20behind%20Star%20Trek%27s%20plot%20devices." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;t=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss&opener=bm&amp;ei=UTF-8&amp;d=A%20popular%20book%20on%20the%20physics%20behind%20Star%20Trek%27s%20plot%20devices." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;title=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fthe-physics-of-star-trek-by-lawrence-m-krauss%2F&amp;title=The%20Physics%20of%20Star%20Trek%20by%20Lawrence%20M.%20Krauss" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=1501&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/09/theoretical-physics-by-joos-and-freeman/' rel='bookmark' title='Permanent Link: Theoretical Physics by Joos and Freeman'>Theoretical Physics by Joos and Freeman</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/11/perimeter-scholars-international-masters-program-in-theoretical-physics/' rel='bookmark' title='Permanent Link: Perimeter Scholars International &#8212; Master&#8217;s program in Theoretical Physics'>Perimeter Scholars International &#8212; Master&#8217;s program in Theoretical Physics</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/12/the-physics-of-star-trek-by-lawrence-m-krauss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glyph-shaping poster fail</title>
		<link>http://stargrads.net/blogs/davinci/2009/12/glyph-shaping-poster-fail/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/12/glyph-shaping-poster-fail/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:12:48 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[frivolous nonsense]]></category>
		<category><![CDATA[Arabic]]></category>
		<category><![CDATA[Campus for Christ]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[glyph-shaping]]></category>
		<category><![CDATA[international relations]]></category>
		<category><![CDATA[University of Waterloo]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2609</guid>
		<description><![CDATA[
A poster with blatantly wrong Arabic that is plastered all over University of Waterloo campus.
]]></description>
			<content:encoded><![CDATA[<p><!--noadsense--><a href="http://www.facebook.com/photo.php?pid=155494&amp;l=a69773c076&amp;id=100000085740395"><img src="http://photos-f.ak.fbcdn.net/hphotos-ak-snc3/hs042.snc3/12967_105674189445439_100000085740395_155494_5791146_n.jpg" /></a></p>
<p>Reposted from <a href="http://www.facebook.com/dlyongemallo">my Facebook</a>:</p>
<blockquote><p>This is a poster for a Christmas Party hosted by Campus for Christ which is found all over UW campus. The problem with it is that the Arabic writing at the top is wrong. As anyone with even a rudimentary knowledge of the Arabic script knows, the letters should be joined, and they change their shape according to position. Clearly, someone had typed the word &#8220;Christmas&#8221; into a translation program on a computer not equipped to handle Arabic glyph-shaping, and put it on the poster without actually bothering to check it with anyone who can actually read Arabic.</p>
<p>Lesson: If you&#8217;re going to plaster something all over campus in a foreign language, do yourself the favour of getting someone who actually knows the language to translate it for you so you don&#8217;t massively embarrass yourself. I&#8217;m sure there&#8217;s at least one Christian who knows Arabic on UW campus. Seriously.</p></blockquote>
<p>In today&#8217;s world, it&#8217;s very important for computer software to be able to support multiple languages.  You can&#8217;t assume that, just because your software is sold in a predominantly English-language market, your users won&#8217;t try to use it with other languages.</p>
<p>In a <a href="http://stargrads.net/blogs/davinci/2009/11/persian-soft-keyboard-and-applications-for-android/">previous post</a>, I noted the current lack of support for glyph-shaping and other aspects of complex text layout on the Android phone.  I hope that this changes in the near future (and, if I have any say about it, it will).</p>
<p>&#8211; davinci 11859</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Glyph-shaping%20poster%20fail&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;t=Glyph-shaping%20poster%20fail" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Glyph-shaping%20poster%20fail%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Glyph-shaping%20poster%20fail&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;title=Glyph-shaping%20poster%20fail&amp;notes=A%20poster%20with%20blatantly%20wrong%20Arabic%20that%20is%20plastered%20all%20over%20University%20of%20Waterloo%20campus." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;title=Glyph-shaping%20poster%20fail&amp;bodytext=A%20poster%20with%20blatantly%20wrong%20Arabic%20that%20is%20plastered%20all%20over%20University%20of%20Waterloo%20campus." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;title=Glyph-shaping%20poster%20fail&amp;annotation=A%20poster%20with%20blatantly%20wrong%20Arabic%20that%20is%20plastered%20all%20over%20University%20of%20Waterloo%20campus." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;t=Glyph-shaping%20poster%20fail&opener=bm&amp;ei=UTF-8&amp;d=A%20poster%20with%20blatantly%20wrong%20Arabic%20that%20is%20plastered%20all%20over%20University%20of%20Waterloo%20campus." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;title=Glyph-shaping%20poster%20fail" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F12%2Fglyph-shaping-poster-fail%2F&amp;title=Glyph-shaping%20poster%20fail" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2609&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/11/persian-soft-keyboard-and-applications-for-android/' rel='bookmark' title='Permanent Link: Persian Soft Keyboard and Applications for Android'>Persian Soft Keyboard and Applications for Android</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/12/glyph-shaping-poster-fail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Perimeter Scholars International &#8212; Master&#8217;s program in Theoretical Physics</title>
		<link>http://stargrads.net/blogs/davinci/2009/11/perimeter-scholars-international-masters-program-in-theoretical-physics/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/11/perimeter-scholars-international-masters-program-in-theoretical-physics/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 03:34:06 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[announcements]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[Master's degree]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[Perimeter Institute]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[theoretical physics]]></category>
		<category><![CDATA[undergraduate]]></category>
		<category><![CDATA[University of Waterloo]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2592</guid>
		<description><![CDATA[
I was asked to pass this information along to anyone who might be interested:
Canada&#8217;s Perimeter Institute for Theoretical Physics (PI), in partnership with the University of Waterloo, welcomes applications to the Masters level course, Perimeter Scholars International (PSI). Exceptional students with an undergraduate honours degree in Physics, Math, Engineering or Computer Science are encouraged to [...]
]]></description>
			<content:encoded><![CDATA[<p><!--noadsense-->I was asked to pass this information along to anyone who might be interested:</p>
<blockquote><p>Canada&#8217;s Perimeter Institute for Theoretical Physics (PI), in partnership with the University of Waterloo, welcomes applications to the Masters level course, <a href="http://www.perimeterscholars.org/">Perimeter Scholars International (PSI)</a>. Exceptional students with an undergraduate honours degree in Physics, Math, Engineering or Computer Science are encouraged to apply. Students require a minimum of 3 upper level undergraduate or graduate courses in physics. PSI recruits a diverse group of students and especially encourages applications from qualified women candidates.  <u>The due date for applications to PSI is February 1st, 2010</u>.   Complete details are available at <a href="http://www.perimeterscholars.org">www.perimeterscholars.org</a>.</p></blockquote>
<p>There&#8217;s also a downloadable poster with more information at <a href="http://www.perimeterinstitute.ca/campaign_trackerv2.php?track=6ca86499-6f7a-b418-f340-4b0ecf230273&amp;identifier=b3600a4c-e253-7e9b-1046-4b0f39adf163">this link</a>.</p>
<p>&#8211; davinci 11855</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;t=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;title=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics&amp;notes=I%20was%20asked%20to%20pass%20this%20information%20along%20to%20anyone%20who%20might%20be%20interested%3A%0D%0ACanada%27s%20Perimeter%20Institute%20for%20Theoretical%20Physics%20%28PI%29%2C%20in%20partnership%20with%20the%20University%20of%20Waterloo%2C%20welcomes%20applications%20to%20the%20Masters%20level%20course%2C%20%5Bhttp%3A%2F%2Fwww.p" title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;title=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics&amp;bodytext=I%20was%20asked%20to%20pass%20this%20information%20along%20to%20anyone%20who%20might%20be%20interested%3A%0D%0ACanada%27s%20Perimeter%20Institute%20for%20Theoretical%20Physics%20%28PI%29%2C%20in%20partnership%20with%20the%20University%20of%20Waterloo%2C%20welcomes%20applications%20to%20the%20Masters%20level%20course%2C%20%5Bhttp%3A%2F%2Fwww.p" title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;title=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics&amp;annotation=I%20was%20asked%20to%20pass%20this%20information%20along%20to%20anyone%20who%20might%20be%20interested%3A%0D%0ACanada%27s%20Perimeter%20Institute%20for%20Theoretical%20Physics%20%28PI%29%2C%20in%20partnership%20with%20the%20University%20of%20Waterloo%2C%20welcomes%20applications%20to%20the%20Masters%20level%20course%2C%20%5Bhttp%3A%2F%2Fwww.p" title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;t=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics&opener=bm&amp;ei=UTF-8&amp;d=I%20was%20asked%20to%20pass%20this%20information%20along%20to%20anyone%20who%20might%20be%20interested%3A%0D%0ACanada%27s%20Perimeter%20Institute%20for%20Theoretical%20Physics%20%28PI%29%2C%20in%20partnership%20with%20the%20University%20of%20Waterloo%2C%20welcomes%20applications%20to%20the%20Masters%20level%20course%2C%20%5Bhttp%3A%2F%2Fwww.p" title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;title=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fperimeter-scholars-international-masters-program-in-theoretical-physics%2F&amp;title=Perimeter%20Scholars%20International%20--%20Master%27s%20program%20in%20Theoretical%20Physics" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2592&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/09/theoretical-physics-by-joos-and-freeman/' rel='bookmark' title='Permanent Link: Theoretical Physics by Joos and Freeman'>Theoretical Physics by Joos and Freeman</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/12/the-physics-of-star-trek-by-lawrence-m-krauss/' rel='bookmark' title='Permanent Link: The Physics of Star Trek by Lawrence M. Krauss'>The Physics of Star Trek by Lawrence M. Krauss</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2008/11/gifted-program-in-mississauga/' rel='bookmark' title='Permanent Link: Gifted program in Mississauga'>Gifted program in Mississauga</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/11/perimeter-scholars-international-masters-program-in-theoretical-physics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming exercise: interweaved strings</title>
		<link>http://stargrads.net/blogs/davinci/2009/11/programming-exercise-interweaved-strings/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/11/programming-exercise-interweaved-strings/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 01:45:33 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[programming and technical issues]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[dynamic programming]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[programming exercises]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2574</guid>
		<description><![CDATA[
Another programming exercise.  The problem is to determine whether one string can be formed by interweaving two others.
]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t quite remember where I saw this problem, but I&#8217;m sure it&#8217;s appeared in a number of places.  Given two strings \(s\) and \(t\), determine whether a string \(u\) is formed by interweaving \(s\) and \(t\).  That is, determine whether \(u\) can be formed by taking the first few characters of (say) \(s\), followed by the first few characters of \(t\), then the next few characters of \(s\), and so on.  For example, the string &#8220;abccdcxey&#8221; can be formed by interweaving &#8220;abcde&#8221; with &#8220;ccxy&#8221;<span id="more-2574"></span>.<!--adsensestart--></p>
<p>I took way too long thinking about how to set up the problem than I should have.  In the end, I decided to quickly write up a solution that is easy to code, even if it may not be optimal.  The solution uses an \((m+1) \times (n+1)\) table, with indices starting from \(0\), where the \((i,j)\) entry is a boolean value indicating whether it&#8217;s possible to form the \((i+j)\)-character prefix of \(u\) from the first \(i\) characters of \(s\) and the first \(j\) characters of \(t\).<!--adsensestop--></p>
<p>Let \(m\) and \(n\) be the lengths of \(s\) and \(t\), respectively.  Assume that \(u\) is of length \(m+n\).  (This can be easily checked and handled at the beginning.) The function that determines whether \(u\) is formed by interweaving \(s\) and \(t\) is as follows:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">bool interweave<span style="color: #009900;">&#40;</span><span style="color: #993333;">char</span> <span style="color: #339933;">*</span>s<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> m<span style="color: #339933;">,</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>t<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> n<span style="color: #339933;">,</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>u<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    bool <span style="color: #339933;">**</span>table <span style="color: #339933;">=</span> new_table<span style="color: #009900;">&#40;</span>m<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> n<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
    table<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #993333;">int</span> row <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> row <span style="color: #339933;">&lt;</span> m<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span> row<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #993333;">int</span> col <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> col <span style="color: #339933;">&lt;</span> n<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span> col<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> table<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>col<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> row <span style="color: #339933;">!=</span> m <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    table<span style="color: #009900;">&#91;</span>row<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>col<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> u<span style="color: #009900;">&#91;</span>row<span style="color: #339933;">+</span>col<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> col <span style="color: #339933;">!=</span> n <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    table<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>col<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#91;</span>col<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> u<span style="color: #009900;">&#91;</span>row<span style="color: #339933;">+</span>col<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    bool result <span style="color: #339933;">=</span> table<span style="color: #009900;">&#91;</span>m<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>n<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    delete table<span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> result<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>When programming on the whiteboard, it&#8217;s important not to get bogged down in details.  In the above, I&#8217;ve assumed the existence of a function <code>new_table(rows,cols)</code> which returns a two-dimensional array of <code>bool</code>s, of the requested number of rows and columns, with all entries initialised to <code>false</code>.  This is simple enough to implement that I hope the interviewer won&#8217;t actually ask me to write it out during the interview, but in case I have to do so, here it is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">bool <span style="color: #339933;">**</span>new_table<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> rows<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> cols<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    bool <span style="color: #339933;">**</span>table <span style="color: #339933;">=</span> new bool<span style="color: #339933;">*</span><span style="color: #009900;">&#91;</span>rows<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> rows<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        table<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> new bool<span style="color: #009900;">&#91;</span>cols<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #993333;">int</span> j <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> cols<span style="color: #339933;">;</span> j<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            table<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> table<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The algorithm runs in time \(O(m \times n)\) and also takes that much space.  I wasn&#8217;t really satisfied with this solution because it doesn&#8217;t make use of the fact that the same prefix of \(u\) can be formed by interweaving prefixes of \(s\) and \(t\) in different ways.  For example, &#8220;abcc&#8221; can be formed by interweaving &#8220;abc&#8221; and &#8220;c&#8221; in two different ways.  Now, the above algorithm doesn&#8217;t perform redundant calculations, but only because we&#8217;re sweeping the table row-by-row in an orderly fashion.  </p>
<p>One can, of course, contrive values for which most of the table actually needs to be visited, but for most values of \(s\) and \(t\), if one or more paths from the upper left corner to the lower right corner of the table exists, the only entries of the table that need to be visited are likely to be very close to these paths.  It makes sense therefore to keep track of which entries in the table are actually necessary to visit.  </p>
<p>The following code is closer to the algorithm I have in mind:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">bool interweave<span style="color: #009900;">&#40;</span><span style="color: #993333;">char</span> <span style="color: #339933;">*</span>s<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> m<span style="color: #339933;">,</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>t<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> n<span style="color: #339933;">,</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span>u<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    queue q <span style="color: #339933;">=</span> new queue<span style="color: #009900;">&#40;</span>m<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span>n<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    q.<span style="color: #202020;">enqueue</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    bool result <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>q.<span style="color: #202020;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #993333;">int</span> row<span style="color: #339933;">,</span> col<span style="color: #339933;">;</span>
        q.<span style="color: #202020;">dequeue</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>row<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> row <span style="color: #339933;">==</span> m <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span> col <span style="color: #339933;">==</span> n <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            result <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> row <span style="color: #339933;">!=</span> m <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span> s<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> u<span style="color: #009900;">&#91;</span>row<span style="color: #339933;">+</span>col<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>q.<span style="color: #202020;">marked</span><span style="color: #009900;">&#40;</span>row<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span>col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            q.<span style="color: #202020;">enqueue</span><span style="color: #009900;">&#40;</span>row<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span>col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> col <span style="color: #339933;">!=</span> n <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#91;</span>col<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> u<span style="color: #009900;">&#91;</span>row<span style="color: #339933;">+</span>col<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>q.<span style="color: #202020;">marked</span><span style="color: #009900;">&#40;</span>row<span style="color: #339933;">,</span>col<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            q.<span style="color: #202020;">enqueue</span><span style="color: #009900;">&#40;</span>row<span style="color: #339933;">,</span>col<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    delete queue<span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> result<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>In the above, I&#8217;ve assumed the existence of a <code>queue</code> class that allows me to enqueue and dequeue pairs of integers consisting of a row and a column.  A row-column pair is enqueued only if it corresponds to a prefix of \(u\) that can be formed by interweaving a prefix of \(s\) and a prefix of \(t\).  Furthermore, the <code>queue</code> class also keeps track of whether a pair has <em>ever</em> been enqueued.  The <code>marked</code> function returns true if that&#8217;s the case, and false otherwise.  It can do this either using a two-dimensional array, as before, or it can use a fancier structure that trades off time for savings in space.  </p>
<p>If a two-dimensional array is used, the algorithm will still require \(O(m \times n)\) time just to initialise it.  However, the main loop in the <code>interweave</code> function will be \(O(m+n)\) for inputs for which there is little overlap or repetition in the input strings.</p>
<p>&#8211; davinci 11848</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Programming%20exercise%3A%20interweaved%20strings&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;t=Programming%20exercise%3A%20interweaved%20strings" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Programming%20exercise%3A%20interweaved%20strings%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Programming%20exercise%3A%20interweaved%20strings&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;title=Programming%20exercise%3A%20interweaved%20strings&amp;notes=Another%20programming%20exercise.%20%20The%20problem%20is%20to%20determine%20whether%20one%20string%20can%20be%20formed%20by%20interweaving%20two%20others." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;title=Programming%20exercise%3A%20interweaved%20strings&amp;bodytext=Another%20programming%20exercise.%20%20The%20problem%20is%20to%20determine%20whether%20one%20string%20can%20be%20formed%20by%20interweaving%20two%20others." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;title=Programming%20exercise%3A%20interweaved%20strings&amp;annotation=Another%20programming%20exercise.%20%20The%20problem%20is%20to%20determine%20whether%20one%20string%20can%20be%20formed%20by%20interweaving%20two%20others." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;t=Programming%20exercise%3A%20interweaved%20strings&opener=bm&amp;ei=UTF-8&amp;d=Another%20programming%20exercise.%20%20The%20problem%20is%20to%20determine%20whether%20one%20string%20can%20be%20formed%20by%20interweaving%20two%20others." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;title=Programming%20exercise%3A%20interweaved%20strings" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-interweaved-strings%2F&amp;title=Programming%20exercise%3A%20interweaved%20strings" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2574&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/10/programming-exercise-permutations-of-a-string/' rel='bookmark' title='Permanent Link: Programming exercise: permutations of a string'>Programming exercise: permutations of a string</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/10/programming-exercise-combinations-of-a-string/' rel='bookmark' title='Permanent Link: Programming exercise: combinations of a string'>Programming exercise: combinations of a string</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/11/programming-exercise-red-white-blue-sorting/' rel='bookmark' title='Permanent Link: Programming exercise: red-white-blue sorting'>Programming exercise: red-white-blue sorting</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/11/programming-exercise-interweaved-strings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Programming exercise: red-white-blue sorting</title>
		<link>http://stargrads.net/blogs/davinci/2009/11/programming-exercise-red-white-blue-sorting/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/11/programming-exercise-red-white-blue-sorting/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 20:52:38 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[programming and technical issues]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[programming exercises]]></category>
		<category><![CDATA[quicksort]]></category>
		<category><![CDATA[sorting]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2549</guid>
		<description><![CDATA[
I&#8217;ve been practising coding on the whiteboard for job interviews.  This is very different than coding in front of a computer which has a keyboard, a monitor, and a nice editing program that allows you to correct your mistakes and type repetitive text very quickly.  I&#8217;m trying to keep my programs simple and [...]
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been practising coding on the whiteboard for job interviews.  This is very different than coding in front of a computer which has a keyboard, a monitor, and a nice editing program that allows you to correct your mistakes and type repetitive text very quickly.  I&#8217;m trying to keep my programs simple and short, and writing in a C-like pseudocode.</p>
<p>This exercise comes from Skiena&#8217;s <a href="http://www.amazon.ca/gp/product/1848000693?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=1848000693"><i>The Algorithm Design Manual</i></a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=1848000693" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" /><sup><a class='footnote' id='note-2549-1' href='#footnote-2549-skiena08'>[1]</a></sup>\(\)<span id="more-2549"></span>.<!--adsensestart--></p>
<p>You are given an array \(A\) of \(n\) elements, each of which is one of <em>red</em>, <em>white</em>, or <em>blue</em>.  The only permitted operations on \(A\) are to examine an item at position \(i\) using <code>Examine(i)</code>, and to swap two items at positions \(i\) and \(j\) using <code>Swap(i,j)</code>.  The problem is to sort the elements as efficiently as possible, such that the elements are in the order <em>red</em>, followed by <em>white</em>, then finally <em>blue</em>.</p>
<p>The trick to coding on a whiteboard is to first draw some simple visual examples, and use them to talk your interviewer (or yourself) through how the algorithm is supposed to work, before writing down any actual code.  It&#8217;s very important that you have the algorithm you want to code before you start coding, because any editing other than very minor changes is basically impossible on a whiteboard.</p>
<p>The first thing to notice is that we can do better than the standard \(O(n\log n)\) sorting algorithms, since the number of different values for the elements is a small constant.  My first thought was to make one pass of the array to count the number of red, white, and blue elements, one more pass to put all the red elements in front, and a final pass to put the white elements before the blue ones.  While this algorithm is linear time, which is asymptotically the best you can do, with a little thought and a little bookkeeping, it&#8217;s possible to do everything in just one pass of the array.<!--adsensestop--></p>
<p>The idea is as follows.  Keep two &#8220;pointers&#8221;, say \(r\) and \(b\), which begin at the front and back respectively, and which keep track of the places where the next red and blue elements should go.  Now sweep the array from front to back.  </p>
<p>If the current position has a blue element, swap it to position \(b\).  Now, we decrement \(b\), but we don&#8217;t advance the position of the sweep yet, because we might have just swapped in another blue element.  This rule ensures that there are no blue elements behind us (i.e., towards the front of the array).  </p>
<p>Dealing with a red element is a <em>bit</em> trickier, since both the \(r\) pointer and the sweep&#8217;s position are advancing.  If we&#8217;re at the same position as the \(r\) pointer, there&#8217;s a contiguous block of red elements behind us, and we can simply increment \(r\) and move on to the next position.  If we&#8217;re ahead of the \(r\) pointer, we can swap the red element to that position, and increment \(r\).  Note that we can only ever swap in a white element, since we&#8217;ve guaranteed that there are no blue elements behind us, and \(r\) is always beyond the continguous block of known red elements at the front.</p>
<p>Finally, if the current position has a white element, we can just skip over it.  If it&#8217;s in the wrong position, it&#8217;ll be dealt with later when we encounter the red element it needs to be swapped with.</p>
<p>The loop terminates when our sweep hits the contiguous block of blue elements at the back of \(A\), i.e., when \(pos &gt; b\).  For simplicity, we assume that \(n \geq 1\) (which we can always check for before we begin).</p>
<p>This is the algorithm I came up with on the whiteboard:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> r<span style="color: #339933;">,</span> b<span style="color: #339933;">,</span> pos<span style="color: #339933;">;</span>
&nbsp;
r <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> b <span style="color: #339933;">=</span> n<span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>Examine<span style="color: #009900;">&#40;</span>r<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #ff0000;">'R'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> r<span style="color: #339933;">++;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>Examine<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #ff0000;">'B'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> b<span style="color: #339933;">--;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
pos <span style="color: #339933;">=</span> r<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span> pos <span style="color: #339933;">&lt;=</span> b <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #993333;">char</span> val <span style="color: #339933;">=</span> Examine<span style="color: #009900;">&#40;</span>pos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> val <span style="color: #339933;">==</span> <span style="color: #ff0000;">'B'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        Swap<span style="color: #009900;">&#40;</span>b<span style="color: #339933;">,</span> pos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        b<span style="color: #339933;">--;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> val <span style="color: #339933;">==</span> <span style="color: #ff0000;">'R'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> r <span style="color: #339933;">&lt;</span> pos <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            Swap<span style="color: #009900;">&#40;</span>r<span style="color: #339933;">,</span> pos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
            pos<span style="color: #339933;">++;</span>
        <span style="color: #009900;">&#125;</span>
        r<span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> val <span style="color: #339933;">==</span> <span style="color: #ff0000;">'W'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        pos<span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>I&#8217;ve assumed that <code>Examine(i)</code> returns one of <code>'R'</code>, <code>'W'</code>, or <code>'B'</code>.  The \(pos\) variable keeps track of the position as I sweep the array from front to back.  The two initial loops skip over any red elements at the front and any blue elements at the back of the array (these are not strictly necessary, but make things a bit faster in some cases).  Each element is examined exactly once, for a total run time of \(n\), making this the most efficient algorithm possible.  </p>
<p>&#8211; davinci 11847</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Programming%20exercise%3A%20red-white-blue%20sorting&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;t=Programming%20exercise%3A%20red-white-blue%20sorting" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Programming%20exercise%3A%20red-white-blue%20sorting%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Programming%20exercise%3A%20red-white-blue%20sorting&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;title=Programming%20exercise%3A%20red-white-blue%20sorting&amp;notes=I%27ve%20been%20practising%20coding%20on%20the%20whiteboard%20for%20job%20interviews.%20%20This%20is%20very%20different%20than%20coding%20in%20front%20of%20a%20computer%20which%20has%20a%20keyboard%2C%20a%20monitor%2C%20and%20a%20nice%20editing%20program%20that%20allows%20you%20to%20correct%20your%20mistakes%20and%20type%20repetitive%20text" title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;title=Programming%20exercise%3A%20red-white-blue%20sorting&amp;bodytext=I%27ve%20been%20practising%20coding%20on%20the%20whiteboard%20for%20job%20interviews.%20%20This%20is%20very%20different%20than%20coding%20in%20front%20of%20a%20computer%20which%20has%20a%20keyboard%2C%20a%20monitor%2C%20and%20a%20nice%20editing%20program%20that%20allows%20you%20to%20correct%20your%20mistakes%20and%20type%20repetitive%20text" title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;title=Programming%20exercise%3A%20red-white-blue%20sorting&amp;annotation=I%27ve%20been%20practising%20coding%20on%20the%20whiteboard%20for%20job%20interviews.%20%20This%20is%20very%20different%20than%20coding%20in%20front%20of%20a%20computer%20which%20has%20a%20keyboard%2C%20a%20monitor%2C%20and%20a%20nice%20editing%20program%20that%20allows%20you%20to%20correct%20your%20mistakes%20and%20type%20repetitive%20text" title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;t=Programming%20exercise%3A%20red-white-blue%20sorting&opener=bm&amp;ei=UTF-8&amp;d=I%27ve%20been%20practising%20coding%20on%20the%20whiteboard%20for%20job%20interviews.%20%20This%20is%20very%20different%20than%20coding%20in%20front%20of%20a%20computer%20which%20has%20a%20keyboard%2C%20a%20monitor%2C%20and%20a%20nice%20editing%20program%20that%20allows%20you%20to%20correct%20your%20mistakes%20and%20type%20repetitive%20text" title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;title=Programming%20exercise%3A%20red-white-blue%20sorting" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fprogramming-exercise-red-white-blue-sorting%2F&amp;title=Programming%20exercise%3A%20red-white-blue%20sorting" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2549&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/11/programming-exercise-interweaved-strings/' rel='bookmark' title='Permanent Link: Programming exercise: interweaved strings'>Programming exercise: interweaved strings</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/09/programming-exercise-maximum-value-in-integer-array-part-1/' rel='bookmark' title='Permanent Link: Programming exercise: maximum value in integer array, part 1'>Programming exercise: maximum value in integer array, part 1</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/09/programming-exercise-hello-world/' rel='bookmark' title='Permanent Link: Programming exercise: Hello, world!'>Programming exercise: Hello, world!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/11/programming-exercise-red-white-blue-sorting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Persian Soft Keyboard and Applications for Android</title>
		<link>http://stargrads.net/blogs/davinci/2009/11/persian-soft-keyboard-and-applications-for-android/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/11/persian-soft-keyboard-and-applications-for-android/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 06:34:28 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[languages and linguistics]]></category>
		<category><![CDATA[programming and technical issues]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[complex text layout]]></category>
		<category><![CDATA[Dream]]></category>
		<category><![CDATA[glyph-shaping]]></category>
		<category><![CDATA[HTC]]></category>
		<category><![CDATA[input method]]></category>
		<category><![CDATA[Persian]]></category>
		<category><![CDATA[soft keyboard]]></category>
		<category><![CDATA[virtual keyboard]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2534</guid>
		<description><![CDATA[
In this post, I discuss a new application I wrote for my Android smart phone, a Persian Soft Keyboard.
]]></description>
			<content:encoded><![CDATA[<p>I recently got a new smart phone &#8212; an Android-powered HTC Dream.  As I wrote in a <a href="http://stargrads.net/blogs/davinci/2009/09/mock-up-of-a-yudit-like-mobile-application/">previous post</a>, one of the first applications that I always look for is a multilingual dictionary, or at the very least a way to enter input in languages other than English<span id="more-2534"></span>.<!--adsensestart--></p>
<p>It took me almost no time to write up a Persian Soft Keyboard, which I have put on the <a href="http://www.android.com/market/">Android Market</a>.  (If you&#8217;re viewing this page on an Android device, you can download the application directly by clicking <a href="market://search?q=pname:net.stargrads.android.inputmethod.persiansoftkeyboard">this link</a>.)</p>
<p>Because Android is open source, it was remarkably easy to learn how to use the <a href="http://developer.android.com/sdk/"><abbr title="software development kit">SDK</abbr></a>.  Unfortunately, despite this, there are a number of design decisions which make it difficult to enable Android devices for the Persian language (or many other languages).  For one thing, it is impossible for the average user to install a new font, and the default fonts that ship with most Android phones don&#8217;t cover character sets outside of the Latin-based alphabets.  For another, built-in support for complex text layout is very incomplete, and that includes the bidirectional text display and glyph-shaping which are essential for properly rendering Persian text.  </p>
<p>I can understand the decision to leave these features out, since space is limited on most Android devices.  However, this means that users who use languages other than English end up having to go to a lot of trouble to get these languages to work, such as downloading versions of applications capable of handling their specific language.  It would have been much simpler if the base Android system had been packaged with a font that covered the Unicode characters for the most common languages in the world and applications that were aware of how to lay out their writing systems.</p>
<p>As things are, even with a Persian font installed, most applications still don&#8217;t display Persian text properly because of directionality and glyph-shaping problems.  I&#8217;ve included an option for the Persian Soft Keyboard to output Unicode presentation forms, i.e., glyphs which are already shaped and joined.  Even though this option does not comply with the Unicode standard, it allows readable Persian text to be entered into and sent through the default SMS application, for example.  (Whether the recipient will be able to read the message at the other end is another issue.)<!--adsensestop--></p>
<p>Currently, I&#8217;m bundling a simple note pad and a translator application with the Persian Soft Keyboard package.  At the moment, the available note pad applications can&#8217;t handle right-to-left text, and the available translators don&#8217;t do glyph-shaping correctly.  I hope that more Android software authors make their applications aware of languages other than English, because I don&#8217;t really want to support or maintain applications which are redundant.</p>
<p>&#8211; davinci 11843</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;t=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;title=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android&amp;notes=In%20this%20post%2C%20I%20discuss%20a%20new%20application%20I%20wrote%20for%20my%20Android%20smart%20phone%2C%20a%20Persian%20Soft%20Keyboard." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;title=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android&amp;bodytext=In%20this%20post%2C%20I%20discuss%20a%20new%20application%20I%20wrote%20for%20my%20Android%20smart%20phone%2C%20a%20Persian%20Soft%20Keyboard." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;title=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android&amp;annotation=In%20this%20post%2C%20I%20discuss%20a%20new%20application%20I%20wrote%20for%20my%20Android%20smart%20phone%2C%20a%20Persian%20Soft%20Keyboard." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;t=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android&opener=bm&amp;ei=UTF-8&amp;d=In%20this%20post%2C%20I%20discuss%20a%20new%20application%20I%20wrote%20for%20my%20Android%20smart%20phone%2C%20a%20Persian%20Soft%20Keyboard." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;title=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F11%2Fpersian-soft-keyboard-and-applications-for-android%2F&amp;title=Persian%20Soft%20Keyboard%20and%20Applications%20for%20Android" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2534&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/12/glyph-shaping-poster-fail/' rel='bookmark' title='Permanent Link: Glyph-shaping poster fail'>Glyph-shaping poster fail</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/09/mock-up-of-a-yudit-like-mobile-application/' rel='bookmark' title='Permanent Link: Mock-up of a Yudit-like mobile application'>Mock-up of a Yudit-like mobile application</a></li>
<li><a href='http://stargrads.net/blogs/davinci/2009/05/the-causes-of-my-depression-part-17-my-frivolous-web-site-and-how-i-learned-persian/' rel='bookmark' title='Permanent Link: The causes of my depression, part 17: my &#8220;frivolous&#8221; web site and how I learned Persian'>The causes of my depression, part 17: my &#8220;frivolous&#8221; web site and how I learned Persian</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/11/persian-soft-keyboard-and-applications-for-android/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Lists of programming exercises</title>
		<link>http://stargrads.net/blogs/davinci/2009/10/lists-of-programming-exercises/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/10/lists-of-programming-exercises/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 03:34:52 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[programming and technical issues]]></category>
		<category><![CDATA[programming exercises]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2507</guid>
		<description><![CDATA[
A list of web sites with programming exercises, and also a few relevant books.
]]></description>
			<content:encoded><![CDATA[<p><!--noadsense-->I&#8217;ve collected a number of web sites with lists of programming exercises, which I&#8217;m going through for practice.</p>
<p>In no particular order, these are<span id="more-2507"></span>:</p>
<ul>
<li><a href="http://projecteuler.net/">Project Euler</a> (a spin-off of <a href="http://mathschallenge.net/">MathsChallenge.net</a>)
</li>
<li><a href="http://www.spoj.pl/problems/classical/">Sphere Online Judge</a>
</li>
<li><a href="http://www.topcoder.com/tc">TopCoder</a>
</li>
<li><a href="http://codekata.pragprog.com/2007/01/code_kata_backg.html">Code Kata</a>
</li>
<li><a href="http://icpc.baylor.edu/past/default.htm">The ACM International Collegiate Programming Contest &#8212; Past Problems</a>
</li>
<li><a href="http://acm.uva.es/contest/">Valladolid Online Judge</a>
</li>
</ul>
<p>The following are language-specific:</p>
<ul>
<li><a href="http://www.cprogramming.com/challenge.html">C/C++ Programming Challenge Problems</a>
</li>
<li><a href="http://cplus.about.com/od/programmingchallenges/Programming_Challenges.htm">About.com C/C++/C# Programming Challenges</a>
</li>
<li><a href="http://www.pythonchallenge.com/">Python Challenge</a>
</li>
<li><a href="http://rubyquiz.com/">Ruby Quiz</a>
</li>
</ul>
<p>And here are some books which may be relevant:</p>
<ul>
<li><a href="http://www.amazon.ca/gp/product/047012167X?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=047012167X">Programming Interviews Exposed, by John Mongan, Noah Suojanen, and Eric Giguère</a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=047012167X" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" />
</li>
<li><a href="http://www.amazon.ca/gp/product/0201657880?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=0201657880">Programming Pearls, by Jon Bentley</a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=0201657880" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" />
</li>
<li><a href="http://www.amazon.ca/gp/product/0470121688?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=0470121688">Puzzles for Programmers and Pros, by Dennis Shasha </a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=0470121688" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" />
</li>
<li><a href="http://www.amazon.ca/gp/product/0387001638?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=0387001638">Programming Challenges, by Steven S. Skiena </a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=0387001638" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" />
</li>
<li><a href="http://www.amazon.ca/gp/product/1848000693?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=1848000693">The Algorithm Design Manual, by Steven S. Skiena</a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=1848000693" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" />
</li>
</ul>
<p>Since the exercises are judged, I probably won&#8217;t be posting solutions here.  My accounts on Project Euler, Sphere Online Judge, and TopCoder are all &#8220;dlyongemallo&#8221;.</p>
<p>&#8211; davinci 11814</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Lists%20of%20programming%20exercises&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;t=Lists%20of%20programming%20exercises" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Lists%20of%20programming%20exercises%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Lists%20of%20programming%20exercises&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;title=Lists%20of%20programming%20exercises&amp;notes=A%20list%20of%20web%20sites%20with%20programming%20exercises%2C%20and%20also%20a%20few%20relevant%20books." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;title=Lists%20of%20programming%20exercises&amp;bodytext=A%20list%20of%20web%20sites%20with%20programming%20exercises%2C%20and%20also%20a%20few%20relevant%20books." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;title=Lists%20of%20programming%20exercises&amp;annotation=A%20list%20of%20web%20sites%20with%20programming%20exercises%2C%20and%20also%20a%20few%20relevant%20books." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;t=Lists%20of%20programming%20exercises&opener=bm&amp;ei=UTF-8&amp;d=A%20list%20of%20web%20sites%20with%20programming%20exercises%2C%20and%20also%20a%20few%20relevant%20books." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;title=Lists%20of%20programming%20exercises" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Flists-of-programming-exercises%2F&amp;title=Lists%20of%20programming%20exercises" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2507&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://stargrads.net/blogs/davinci/2009/09/programming-exercises-and-comparison-of-programming-languages/' rel='bookmark' title='Permanent Link: Programming exercises and comparison of programming languages'>Programming exercises and comparison of programming languages</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/10/lists-of-programming-exercises/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s what the nuns wear when they go swimming</title>
		<link>http://stargrads.net/blogs/davinci/2009/10/its-what-the-nuns-wear-when-they-go-swimming/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/10/its-what-the-nuns-wear-when-they-go-swimming/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 06:11:22 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[frivolous nonsense]]></category>
		<category><![CDATA[languages and linguistics]]></category>
		<category><![CDATA[bhikkhunī]]></category>
		<category><![CDATA[bhikṣuṇī]]></category>
		<category><![CDATA[Buddhists]]></category>
		<category><![CDATA[Chinese]]></category>
		<category><![CDATA[nuns]]></category>
		<category><![CDATA[Pali]]></category>
		<category><![CDATA[Prakrit]]></category>
		<category><![CDATA[Sanskrit]]></category>
		<category><![CDATA[swimwear]]></category>
		<category><![CDATA[比丘尼]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=2414</guid>
		<description><![CDATA[
A funny typo (or Freudian slip) involving Buddhist nuns.
]]></description>
			<content:encoded><![CDATA[<p><!--noadsense-->I happened upon <a href="http://books.google.ca/books?id=8OT_Sbk0yekC&amp;pg=PA161&amp;dq=bhikkini">this passage</a> in a book called <a href="http://www.amazon.ca/gp/product/0804838534?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=0804838534"><i>The Chinese Language: Its History and Current Usage</i></a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=0804838534" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" /> by Daniel Kane, in a section on loanwords from Sanskrit:</p>
<blockquote><p>In some words, only one part of the original has survived: the <strong>ní</strong> in 尼姑 <strong>ní​gū​</strong> &#8220;Buddhist nun&#8221; is the last syllable of the Sanskrit <i>bhikk<b>i</b>ni</i> (sic)&#8230;</p></blockquote>
<p><span id="more-2414"></span></p>
<p>The Sanskrit word, of course, is भिक्षुणी <em>bhikṣuṇī</em>.  Its Chinese transliteration is 比丘尼 <em>bǐ​qiū​ní​</em>.  The author seems to have been thinking of <em>bhikkhunī</em>, which is the equivalent word in Pali and other Prakrits, and <a href="http://www.religionnewsblog.com/6886/thailand-blasts-victorias-secret-for-new-buddha-swimsuit">swimwear</a>.</p>
<p>&#8211; davinci 11811</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;t=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;title=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming&amp;notes=A%20funny%20typo%20%28or%20Freudian%20slip%29%20involving%20Buddhist%20nuns." title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;title=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming&amp;bodytext=A%20funny%20typo%20%28or%20Freudian%20slip%29%20involving%20Buddhist%20nuns." title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;title=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming&amp;annotation=A%20funny%20typo%20%28or%20Freudian%20slip%29%20involving%20Buddhist%20nuns." title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;t=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming&opener=bm&amp;ei=UTF-8&amp;d=A%20funny%20typo%20%28or%20Freudian%20slip%29%20involving%20Buddhist%20nuns." title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;title=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fits-what-the-nuns-wear-when-they-go-swimming%2F&amp;title=It%27s%20what%20the%20nuns%20wear%20when%20they%20go%20swimming" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=2414&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/10/its-what-the-nuns-wear-when-they-go-swimming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horizons: Exploring the Universe, by Michael A. Seeds</title>
		<link>http://stargrads.net/blogs/davinci/2009/10/horizons-exploring-the-universe-by-michael-a-seeds/</link>
		<comments>http://stargrads.net/blogs/davinci/2009/10/horizons-exploring-the-universe-by-michael-a-seeds/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 12:00:36 +0000</pubDate>
		<dc:creator>davinci</dc:creator>
				<category><![CDATA[a life in books]]></category>
		<category><![CDATA[astronomy]]></category>
		<category><![CDATA[Dr. John Percy]]></category>
		<category><![CDATA[Exploring the Universe]]></category>
		<category><![CDATA[Horizons]]></category>
		<category><![CDATA[Michael A. Seeds]]></category>

		<guid isPermaLink="false">http://stargrads.net/blogs/davinci/?p=1515</guid>
		<description><![CDATA[
An astronomy textbook.  
]]></description>
			<content:encoded><![CDATA[<p><!--adsensestart-->It&#8217;s been a while since I&#8217;ve made a post in the series &ldquo;<a href="http://stargrads.net/blogs/davinci/2009/09/a-life-in-books/">a life in books</a>&rdquo;.</p>
<p><a href="http://www.amazon.ca/gp/product/0495559733?ie=UTF8&amp;tag=davincisnoteb-20&amp;linkCode=as2&amp;camp=15121&amp;creative=330641&amp;creativeASIN=0495559733">This textbook</a><img src="http://www.assoc-amazon.ca/e/ir?t=davincisnoteb-20&amp;l=as2&amp;o=15&amp;a=0495559733" width="1" height="1" border="0" alt="" style="border:none !important;margin:0px !important" /> was a gift from <a href="http://www.erin.utoronto.ca/~astro/percy.htm">Dr. John Percy</a>, professor of astronomy at the University of Toronto.  I did some research on <a href="http://en.wikipedia.org/wiki/Be_stars">Be stars</a> with Dr. Percy <a href="http://stargrads.net/blogs/davinci/2009/04/the-causes-of-my-depression-part-4-the-mentorship-program/">while I was in high school</a>, and I had expressed to him my interest in studying astronomy and astrophysics in university.<!--adsensestop--><span id="more-1515"></span></p>
<p><a href="http://img41.imageshack.us/img41/4323/p7230321rotated.jpg" target="_blank"><img src="http://img41.imageshack.us/img41/4323/p7230321rotated.th.jpg" border="0" /></a></p>
<p>Because it is an introductory textbook, it&#8217;s very glossy and elementary.  I regret not having become more familiar with the materials in it, because <a href="http://stargrads.net/blogs/davinci/2009/05/my-depression-in-waterloo-part-5-feeling-unworthy/">it would have given me more things to discuss with my former colleagues</a> who work at <a href="http://www.perimeterinstitute.ca/">the Perimeter Institute</a>, while I was there.</p>
<p>This textbook is apparently still in use.  The latest edition appears to be the <a href="http://books.google.ca/books?id=cMfWYFSITOgC">11th edition</a>.  I have the 4th edition, so I&#8217;m seven editions out of date.</p>
<p>&#8211; davinci 11805</p>




	<a rel="nofollow"  href="http://stargrads.net/blogs/davinci/feed/" title="RSS"><img src="http://stargrads.net/common/images/handycons/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds&amp;body=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F" title="email"><img src="http://stargrads.net/common/images/handycons/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;t=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds" title="Facebook"><img src="http://stargrads.net/common/images/handycons/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds%20-%20http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F" title="Twitter"><img src="http://stargrads.net/common/images/handycons/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds&amp;link=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F" title="FriendFeed"><img src="http://stargrads.net/common/images/handycons/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;title=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds&amp;notes=An%20astronomy%20textbook.%20%20" title="del.icio.us"><img src="http://stargrads.net/common/images/handycons/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;title=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds&amp;bodytext=An%20astronomy%20textbook.%20%20" title="Digg"><img src="http://stargrads.net/common/images/handycons/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;title=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds&amp;annotation=An%20astronomy%20textbook.%20%20" title="Google Bookmarks"><img src="http://stargrads.net/common/images/handycons/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;t=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds&opener=bm&amp;ei=UTF-8&amp;d=An%20astronomy%20textbook.%20%20" title="Yahoo! Bookmarks"><img src="http://stargrads.net/common/images/handycons/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;title=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds" title="StumbleUpon"><img src="http://stargrads.net/common/images/handycons/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F" title="Technorati"><img src="http://stargrads.net/common/images/handycons/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fstargrads.net%2Fblogs%2Fdavinci%2F2009%2F10%2Fhorizons-exploring-the-universe-by-michael-a-seeds%2F&amp;title=Horizons%3A%20Exploring%20the%20Universe%2C%20by%20Michael%20A.%20Seeds" title="Reddit"><img src="http://stargrads.net/common/images/handycons/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>


<br/><br/><img src="http://stargrads.net/blogs/davinci/?ak_action=api_record_view&id=1515&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://stargrads.net/blogs/davinci/2009/10/horizons-exploring-the-universe-by-michael-a-seeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
