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

<channel>
	<title>doug-swisher.net</title>
	<atom:link href="http://doug-swisher.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://doug-swisher.net</link>
	<description>Software, Wetware, Games, and Life</description>
	<lastBuildDate>Sun, 08 May 2011 19:56:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='doug-swisher.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>doug-swisher.net</title>
		<link>http://doug-swisher.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://doug-swisher.net/osd.xml" title="doug-swisher.net" />
	<atom:link rel='hub' href='http://doug-swisher.net/?pushpress=hub'/>
		<item>
		<title>Tower Defense games in flash and silverlight</title>
		<link>http://doug-swisher.net/2008/12/05/tower-defense-games-in-flash-and-silverlight/</link>
		<comments>http://doug-swisher.net/2008/12/05/tower-defense-games-in-flash-and-silverlight/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 23:13:47 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://doug-swisher.net/?p=152</guid>
		<description><![CDATA[Yikes, it has been eons since I&#8217;ve posted.  Taking two classes this semester is considerably more work than I anticipated. In some of my limited free time, I&#8217;ve been playing a couple of flash games.  There are many collections of links to these types of games, including onemorelevel, flashgames247, and gameprison.  For a list of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=152&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yikes, it has been eons since I&#8217;ve posted.  Taking two classes this semester is considerably more work than I anticipated.</p>
<p>In some of my limited free time, I&#8217;ve been playing a couple of flash games.  There are many collections of links to these types of games, including <a href="http://www.onemorelevel.com/" target="_blank">onemorelevel</a>, <a href="http://www.flashgames247.com/" target="_blank">flashgames247</a>, and <a href="http://www.gameprison.com/" target="_blank">gameprison</a>.  For a list of &#8220;Top&#8221; games by genre, I found the list on <a href="http://www.techcult.com/the-150-best-online-flash-games/" target="_blank">TechCult</a> to be pretty good.</p>
<p>The ones I&#8217;ve enjoyed the most are in the &#8220;Tower Defense&#8221; genre, where you need to build a series of defensive towers to defend against waves of attackers.  This genre grew out of the Warcraft 3 Tower Defense multiplayer game (which I believe evolved from a similar StarCraft game).  I used to watch my son play the Warcraft version and never understood the draw.  I guess that is because I hadn&#8217;t played it; now that I&#8217;ve started playing games in the genre, I definitely see the allure.</p>
<p>I&#8217;ve also been playing around a bit with <a href="http://silverlight.net/" target="_blank">Silverlight</a>.  I wrote a Silverlight version of <a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank">Conway&#8217;s Game of Life</a> that I hope to blog about soon.  As another learning experience, I&#8217;m toying with the idea of writing a tower defense game in Silverlight.  I may never get around to it, but doing the research is a lot of fun.</p>
<p>I&#8217;ve managed to find one version already written in Silverlight, called <a href="http://www.heroicvirtuecreations.com/TowerDefense/" target="_blank">Mountain Pass Tower Defense</a>.  There is also a <a href="http://blois.us/blog/2008/03/pathfinding.html" target="_blank">pathfinding experiment</a> that the author describes as an early step in writing a tower defense game.</p>
<p>In the Warcraft version, the critters could attack the towers and knock them down.  I haven&#8217;t seen that in any of the flash versions.  That&#8217;s something I think I&#8217;d try to include.  I also tend to like the ones that are maze-like, where the critters follow a path, as opposed to the ones that are open areas (for those, I usually end up building my own maze).  Most games only include a handful of maps; it would be nice to be able to generate random maps (perhaps based on a seed that the user can enter to retry the same map later).</p>
<p>Anyway, here are my four favorite tower defense flash games.  I&#8217;m not saying these are the best, just that they&#8217;re ones I&#8217;ve enjoyed.</p>
<p><span style="text-decoration:underline;">Bloons Tower Defense 3</span></p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://www.ninjakiwi.com/templates/gameajax.php?name=Bloons%20Tower%20Defense%203&amp;game=http://www.ninjakiwi.com/images/stories/Games/bloonstd3.swf"><img title="Bloons Tower Defense 3" src="http://www.techcult.com/wp-content/uploads/2008/09/bloonstowerdefense.jpg" alt="Bloons Tower Defense 3" width="400" height="200" /></a><p class="wp-caption-text">Bloons Tower Defense 3</p></div>
<p>This is one that I&#8217;ve played quite a bit.  It is simple to play, humorous, challenging, and a lot of fun.</p>
<p><span style="text-decoration:underline;">Vector Tower Defense</span></p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://www.candystand.com/play.do?id=18047"><img title="Vector Tower Defense" src="http://www.techcult.com/wp-content/uploads/2008/09/vectortd.jpg" alt="Vector Tower Defense" width="400" height="200" /></a><p class="wp-caption-text">Vector Tower Defense</p></div>
<p>The graphics on this one reminded of the games I used to play years ago.  I also like the fact that it uses a grid layout, making placement of towers easy.  On some of the other games, it is possible to place a tower in a spot that prevents placing another tower nearby because you didn&#8217;t leave enough room.</p>
<p><span style="text-decoration:underline;">Onslaught</span></p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://www.freewaregames.net/onslaught-game.asp"><img title="Onslaught" src="http://www.techcult.com/wp-content/uploads/2008/09/onslaughtgame.jpg" alt="Onslaught" width="400" height="200" /></a><p class="wp-caption-text">Onslaught</p></div>
<p>One of the first, I believe, and very popular.  I&#8217;ve seen mention of a new version (<a href="http://onslaught.playr.co.uk/" target="_blank">Onslaught 2</a>), but I&#8217;ve not played it.  Yet.</p>
<p><span style="text-decoration:underline;">Canyon Defense</span></p>
<div id="attachment_156" class="wp-caption alignnone" style="width: 410px"><a href="http://www.miniclip.com/games/canyon-defense/en/"><img class="size-full wp-image-156" title="Canyon Defense" src="http://dougswisher.files.wordpress.com/2008/12/canyon.png" alt="Canyon Defense" width="400" height="200" /></a><p class="wp-caption-text">Canyon Defense</p></div>
<p>There were two things I liked about this game.  First, you needed to complete little &#8220;mini quests&#8221; to upgrade to better towers.  That not only helped with the learning curve (by limiting options in the early game), but it also forced me to build tower-types I probably wouldn&#8217;t have otherwise built.</p>
<p>Second, it included buildings (2 squares by 2 squares) that gave special abilities, such as building walls or launching big missles.  The missles have a cool down, but could be launched whenever you needed a little extra boost.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=152&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/12/05/tower-defense-games-in-flash-and-silverlight/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>

		<media:content url="http://www.techcult.com/wp-content/uploads/2008/09/bloonstowerdefense.jpg" medium="image">
			<media:title type="html">Bloons Tower Defense 3</media:title>
		</media:content>

		<media:content url="http://www.techcult.com/wp-content/uploads/2008/09/vectortd.jpg" medium="image">
			<media:title type="html">Vector Tower Defense</media:title>
		</media:content>

		<media:content url="http://www.techcult.com/wp-content/uploads/2008/09/onslaughtgame.jpg" medium="image">
			<media:title type="html">Onslaught</media:title>
		</media:content>

		<media:content url="http://dougswisher.files.wordpress.com/2008/12/canyon.png" medium="image">
			<media:title type="html">Canyon Defense</media:title>
		</media:content>
	</item>
		<item>
		<title>Stephen Lynch</title>
		<link>http://doug-swisher.net/2008/10/29/steven-lynch/</link>
		<comments>http://doug-swisher.net/2008/10/29/steven-lynch/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 21:10:06 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[comedy]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=147</guid>
		<description><![CDATA[Ok, I&#8217;m probably the last person to hear about him, but I was listening to pandora the other day, and decided to create a &#8220;Flight of the Conchords&#8221; channel, and pandora played a couple of songs by Stephen Lynch.  I liked those songs, so I picked up one of his CDs from amazon, and it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=147&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, I&#8217;m probably the last person to hear about him, but I was listening to <a href="http://www.pandora.com/">pandora</a> the other day, and decided to create a &#8220;<a href="http://en.wikipedia.org/wiki/Flight_of_the_Conchords">Flight of the Conchords</a>&#8221; channel, and pandora played a couple of songs by <a href="http://www.stephenlynch.com/">Stephen Lynch</a>.  I liked those songs, so I picked up one of his CDs from amazon, and it arrived yesterday.  I&#8217;m really enjoying it.</p>
<p>To give you an idea, here is a youtube video of the song D&amp;D off the CD (<a href="http://www.amazon.com/Superhero-Stephen-Lynch/dp/B00007EL9P/ref=sr_1_2?ie=UTF8&amp;qid=1225314416&amp;sr=8-2">Superhero</a>):</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='http://www.youtube.com/embed/QgOB7VWjlSQ?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>That video is PG&#8230;most of the other stuff on the CD is rated R&#8230;not that I mind, but fair warning.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=147&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/10/29/steven-lynch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
		<item>
		<title>Breaking CAPTCHA</title>
		<link>http://doug-swisher.net/2008/10/19/breaking-captcha/</link>
		<comments>http://doug-swisher.net/2008/10/19/breaking-captcha/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 05:20:41 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[captcha]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=143</guid>
		<description><![CDATA[I always figured there were ways spammers could get around CAPTCHA (Completely Automated Turing Test To Tell Computers and Humans Apart), but I&#8217;d never seen it discussed.  For those that might not be familiar with the name, a CAPTCHA is one of those weird text challenges where you have to type in some cryptic text [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=143&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I always figured there were ways spammers could get around CAPTCHA (Completely Automated Turing Test To Tell Computers and Humans Apart), but I&#8217;d never seen it discussed.  For those that might not be familiar with the name, a CAPTCHA is one of those weird text challenges where you have to type in some cryptic text to register on a site:</p>
<div id="attachment_144" class="wp-caption aligncenter" style="width: 165px"><a href="http://dougswisher.files.wordpress.com/2008/10/captcha.png"><img class="size-full wp-image-144" title="captcha" src="http://dougswisher.files.wordpress.com/2008/10/captcha.png" alt="CAPTCHA Sample" width="155" height="48" /></a><p class="wp-caption-text">CAPTCHA Sample</p></div>
<p>I stumbled across <a href="http://www.cgisecurity.com/2007/10/18">an article</a> describing a trojan that presents voyeurs with a woman doing a strip tease &#8211; each successful CAPTCHA entry removes another article of clothing.  One such trojan (HotLan) has been used to create more than 500,000 accounts on popular e-mail sites.</p>
<p>It struck me as a bit ironic that clicking on the &#8220;Discuss this article&#8221; link on that website prompted me with a registration form that included a CAPTCHA challenge.</p>
<p>The <a href="http://www.captcha.net/">CAPTCHA web site</a> acknowledges the issue, but deems it &#8220;not a concern&#8221;:</p>
<blockquote><p><em>While it might be the case that some  spammers use porn sites to attack CAPTCHAs, the amount of damage this can inflict is tiny (so tiny that we haven&#8217;t even noticed a dent!).</em></p></blockquote>
<p>In spite of all this, I don&#8217;t see much of an alternative, and I&#8217;m sure I&#8217;ll continue to use CAPTCHAs on sites.  At least it makes it a lot harder for spammers&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=143&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/10/19/breaking-captcha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>

		<media:content url="http://dougswisher.files.wordpress.com/2008/10/captcha.png" medium="image">
			<media:title type="html">captcha</media:title>
		</media:content>
	</item>
		<item>
		<title>Cardiac Physiology and Action Potential Movies</title>
		<link>http://doug-swisher.net/2008/10/14/cardiac-physiology-and-action-potential-movies/</link>
		<comments>http://doug-swisher.net/2008/10/14/cardiac-physiology-and-action-potential-movies/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 04:19:06 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Biology]]></category>
		<category><![CDATA[physiology]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=140</guid>
		<description><![CDATA[In Physiology class today, we talked about cardiac physiology and the action potentials for heart contraction.  it was a lot of information to soak up, so I went looking for some additional sources.  I found a handful of movies by Walid Aziz (aka hyperhighs) on youtube that are simple, but he has a knack for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=140&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In Physiology class today, we talked about cardiac physiology and the action potentials for heart contraction.  it was a lot of information to soak up, so I went looking for some additional sources.  I found a handful of movies by <a href="http://www.youtube.com/user/hyperhighs">Walid Aziz</a> (aka hyperhighs) on <a href="http://www.youtube.com/">youtube</a> that are simple, but he has a knack for explaining things.  I&#8217;ve collected the links here that are relevant to my class, but he has posted many more videos on physiology and anatomy.</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=h_eYvrfN_Ng">Heart Physiology (Ventricular filling: part 1/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=K-siwl6ADeo">Heart Physiology (Cardiac pressure-time curve: part 2/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=UsTorPkPDXE">Heart Physiology (Cardiac output: part 3/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=Y7cjyb5oLIM">Heart Physiology (Starling law: part 4/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=cGaX1IyuJDw">Heart Physiology (Length-tension plot: part 5/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=_6TUH2FJ05o">Heart Physiology (Dynamic heart plot: part 6/6)</a></li>
</ul>
<ul>
<li><a href="http://www.youtube.com/watch?v=Lhl897Mz-h8">Cardiac Action Potential (Pulse propagation: part 1/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=GYfPJbTG9Eg">Cardiac Action Potential (Pacemaker AP: part 2/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=P5V0Y8ReBes">Cardiac Action Potential (Autonomic effect: part 3/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=rWHgOlZtYT8">Cardiac Action Potential (Cardiomyocyte AP: part 4/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=ilOFXbTTpeg">Cardiac Action Potential (Electro-mechanics: part 5/6)</a></li>
<li><a href="http://www.youtube.com/watch?v=o0oxcRTNQRE">Cardiac Action Potential (Sarcomere: part 6/6)</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=140&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/10/14/cardiac-physiology-and-action-potential-movies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
		<item>
		<title>First BioSharp App &#8211; RestrictionFinder</title>
		<link>http://doug-swisher.net/2008/10/07/first-biosharp-app-restrictionfinder/</link>
		<comments>http://doug-swisher.net/2008/10/07/first-biosharp-app-restrictionfinder/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 12:57:38 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Bioinformatics]]></category>
		<category><![CDATA[RestrictionFinder BioSharp]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=136</guid>
		<description><![CDATA[I&#8217;ve started work on my first application that uses BioSharp.  It is called RestrictionFinder, and its purpose is to help find a pair of restriction enzymes that give distinct cleavage patterns when an insert is present in a plasmid in the forward direction, reverse direction, or absent.  It also has the ability to limit the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=136&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started work on my first application that uses <a href="http://biosharp.sourceforge.net/">BioSharp</a>.  It is called RestrictionFinder, and its purpose is to help find a pair of restriction enzymes that give distinct cleavage patterns when an insert is present in a plasmid in the forward direction, reverse direction, or absent.  It also has the ability to limit the search to pairs of enzymes with compatible buffers.</p>
<p>Here is a screen shot of the sequence entry form:</p>
<div id="attachment_137" class="wp-caption aligncenter" style="width: 310px"><a href="http://dougswisher.files.wordpress.com/2008/10/sequenceentry.png"><img class="size-medium wp-image-137" title="sequenceentry" src="http://dougswisher.files.wordpress.com/2008/10/sequenceentry.png?w=300&#038;h=195" alt="Sequence Entry Form" width="300" height="195" /></a><p class="wp-caption-text">Sequence Entry Form</p></div>
<p>If the sequence contains uppercase and lowercase, the lowercase is assumed to be the insert, and the start/end positions are set automatically.</p>
<p>As part of the solution, I needed a small database (just a file, really) of enzymes and their buffers.  I could not find a readily available file for this, so I wrote a small console app that extracts the data from the REBASE web site.</p>
<p>This is still a work in progress, but the source code is checked into the BioSharp <a href="http://biosharp.svn.sourceforge.net/viewvc/biosharp/Applications/RestrictionFinder/trunk/">SVN repository</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=136&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/10/07/first-biosharp-app-restrictionfinder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>

		<media:content url="http://dougswisher.files.wordpress.com/2008/10/sequenceentry.png?w=300" medium="image">
			<media:title type="html">sequenceentry</media:title>
		</media:content>
	</item>
		<item>
		<title>BioSharp web site is live</title>
		<link>http://doug-swisher.net/2008/09/26/biosharp-web-site-is-live/</link>
		<comments>http://doug-swisher.net/2008/09/26/biosharp-web-site-is-live/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 21:47:41 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Bioinformatics]]></category>
		<category><![CDATA[biosharp]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=133</guid>
		<description><![CDATA[I&#8217;ve uploaded the first incarnation of the BioSharp web site.  It is still a bit thin, but at least the API docs are available. The next step in the project will be to work on an application that was the whole motivation for BioSharp.  As that progresses, I&#8217;m sure I&#8217;ll be continuing to port bits.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=133&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve uploaded the first incarnation of the <a href="http://biosharp.sourceforge.net/">BioSharp web site</a>.  It is still a bit thin, but at least the API docs are available.</p>
<p>The next step in the project will be to work on an application that was the whole motivation for BioSharp.  As that progresses, I&#8217;m sure I&#8217;ll be continuing to port bits.  According to my <a href="http://biosharp.sourceforge.net/port/PortStatus.html">port status page</a>, I&#8217;m just under 5% done&#8230;only 1413 classes left to port.  Even at this point, though, the library has some useful functionality, as demonstrated by a few of my earlier posts.</p>
<p>If you are interested in seeing a specific module ported over, don&#8217;t hesitate to add a comment here to post in the <a href="http://sourceforge.net/forum/?group_id=238567">forums</a>.  I&#8217;ll also look at getting a mailing list set up sometime soon.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=133&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/09/26/biosharp-web-site-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
		<item>
		<title>Finding and flipping a DNA sequence with BioSharp</title>
		<link>http://doug-swisher.net/2008/09/23/finding-and-flipping-a-dna-sequence-with-biosharp/</link>
		<comments>http://doug-swisher.net/2008/09/23/finding-and-flipping-a-dna-sequence-with-biosharp/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 16:06:30 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Bioinformatics]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[biosharp]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=128</guid>
		<description><![CDATA[The BioSharp port is still moving forward.  I have enough functionality now to be able to create a DNA sequence, find a subsequence with that sequence, and create a new sequence with the subsequence flipped around. For example, it can take &#8220;aacgaa&#8221;, search for &#8220;cg&#8221;, flip it around, and create the new sequence &#8220;aagcaa&#8221;.  It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=128&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://biosharp.sourceforge.net/">BioSharp</a> port is still moving forward.  I have enough functionality now to be able to create a DNA sequence, find a subsequence with that sequence, and create a new sequence with the subsequence flipped around.</p>
<p>For example, it can take &#8220;aacgaa&#8221;, search for &#8220;cg&#8221;, flip it around, and create the new sequence &#8220;aagcaa&#8221;.  It would be trivial to do this just by string manipulation; hopefully the investment in the library will be worth it.</p>
<p>Here is a bit of sample code to do the search and flip.</p>
<p><pre class="brush: csharp;">
private static void FindAndFlip()
{
    // Create our two bits of DNA
    ISymbolList bigDNA = DNATools.CreateDNA(&quot;acgatagatagctacgcatagctagctaagctacgactacgctacgctacg&quot;);
    ISymbolList subSequence = DNATools.CreateDNA(&quot;agctagctaagct&quot;);

    // Find the smaller piece within the larger piece
    KnuthMorrisPrattSearch search = new KnuthMorrisPrattSearch(subSequence);

    int[] results = search.FindMatches(bigDNA);

    if (results.Length == 0)
    {
        Console.WriteLine(&quot;subSequence not found!&quot;);
        return;
    }

    // Reverse the small piece
    ReverseSymbolList reverseSubSequence = new ReverseSymbolList(subSequence);

    // Make a copy of the big sequence that we can play with...
    ISymbolList reverseBigDNA = new SimpleSymbolList(bigDNA);

    // Overwrite the forward sequence with the reverse...
    Edit edit = new Edit(results[0], subSequence.Length, reverseSubSequence);

    reverseBigDNA.Edit(edit);

    // Print out the results...
    Console.WriteLine(&quot;subSequence:        &quot; + subSequence.SeqString);
    Console.WriteLine(&quot;reverseSubSequence: &quot; + reverseSubSequence.SeqString);
    Console.WriteLine(&quot;bigDNA:             &quot; + bigDNA.SeqString);
    Console.WriteLine(&quot;reverseBigDNA:      &quot; + reverseBigDNA.SeqString);
}
</pre></p>
<p>Here is the output from this snippet, with the flipped sequence highlighted in red:</p>
<blockquote>
<pre>subSequence:        agctagctaagct
reverseSubSequence: tcgaatcgatcga
bigDNA:             acgatagatagctacgcat<span style="color:#ff0000;">agctagctaagct</span>acgactacgctacgctacg
reverseBigDNA:      acgatagatagctacgcat<span style="color:#ff0000;">tcgaatcgatcga</span>acgactacgctacgctacg</pre>
</blockquote>
<p>Note that this is simply the reverse of the subsegment, and not the reverse compliment.  The reverse compliment would be just as easy to do, though&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=128&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/09/23/finding-and-flipping-a-dna-sequence-with-biosharp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
		<item>
		<title>You know your port is in trouble when&#8230;</title>
		<link>http://doug-swisher.net/2008/09/16/you-know-your-port-is-in-trouble-when/</link>
		<comments>http://doug-swisher.net/2008/09/16/you-know-your-port-is-in-trouble-when/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 04:15:19 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[biosharp]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=123</guid>
		<description><![CDATA[In porting BioJava, I came across the following comment: Don&#8217;t use this class directly. This class contains deep voodoo code. Run away while you still can. Looking a bit deeper at the class, it generates code on the fly.  That wouldn&#8217;t, in itself, be too bad, except it doesn&#8217;t generate Java and compile it, it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=123&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In porting BioJava, I came across the following comment:</p>
<blockquote><p>Don&#8217;t use this class directly. This class contains deep voodoo code. Run away while you still can.</p></blockquote>
<p>Looking a bit deeper at the class, it generates code on the fly.  That wouldn&#8217;t, in itself, be too bad, except it doesn&#8217;t generate Java and compile it, it generates bytecode!</p>
<p>Here is a small snippet:</p>
<p><pre class="brush: java;">
        GeneratedCodeMethod init = pclass.createMethod(
                &quot;&lt;init&gt;&quot;,
                voidC,
                new CodeClass[]{
                  faceClassC,
                  projectionContextC
                },
                CodeUtils.ACC_PUBLIC);

        InstructionVector initIV = new InstructionVector();
        initIV.add(ByteCode.make_aload(init.getThis()));
        initIV.add(ByteCode.make_aload(init.getVariable(0)));
        initIV.add(ByteCode.make_aload(init.getVariable(1)));
        initIV.add(ByteCode.make_invokespecial(m_ourBase_init));
        initIV.add(ByteCode.make_return());
        pclass.setCodeGenerator(init, initIV);
</pre></p>
<p>Uh, yeah.  I can read and write Java, but I&#8217;m no expert, and I&#8217;ve certainly never looked at Java bytecode.  To make matters worse, the code uses the &#8220;continue label&#8221; construct, like the following (the &#8220;more code&#8221; placeholder is about 150 additional lines):</p>
<p><pre class="brush: java;">
        METHOD_MAKER:
        for (Iterator methIt = faceClassC.getMethods().iterator(); methIt.hasNext();) {
          CodeMethod faceMethod = (CodeMethod) methIt.next();
          Set baseMethods = baseClassC.getMethodsByName(faceMethod.getName());

          if (baseClassC.getMethodsByName(faceMethod.getName()).size() &gt; 0) {
            for(Iterator i = baseMethods.iterator(); i.hasNext(); ) {
              CodeMethod meth = (CodeMethod) i.next();
              if( (meth.getModifiers() &amp; CodeUtils.ACC_ABSTRACT) == 0) {
                //System.err.println(&quot;Skipping defined method: &quot; + faceMethod.getName());
                continue METHOD_MAKER;
              }
            }
          }

          // ...more code...
        }
</pre><br />
I&#8217;m not saying it&#8217;s bad code; I&#8217;m just saying it&#8217;s not going to be much fun to port, especially given the lack of unit tests on these bits and the fact that I&#8217;ve never generated C# code on the fly, either.</p>
<p>Ah, well, at least they warned me with that comment up top.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dougswisher.wordpress.com/123/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dougswisher.wordpress.com/123/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=123&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/09/16/you-know-your-port-is-in-trouble-when/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
		<item>
		<title>So much to port&#8230;so little time.</title>
		<link>http://doug-swisher.net/2008/09/14/so-much-to-portso-little-time/</link>
		<comments>http://doug-swisher.net/2008/09/14/so-much-to-portso-little-time/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 04:13:45 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[biosharp]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=120</guid>
		<description><![CDATA[I haven&#8217;t posted in a while, as I&#8217;ve been working on porting BioJava over to C#.  It is a big library (to say the least), and I&#8217;ve almost (hopefully) got enough code working that I can find restriction enzyme sites on a strand of DNA.  So far, I&#8217;ve ported about 150 classes, although a fair [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=120&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in a while, as I&#8217;ve been working on porting BioJava over to C#.  It is a big library (to say the least), and I&#8217;ve almost (hopefully) got enough code working that I can find restriction enzyme sites on a strand of DNA.  So far, I&#8217;ve ported about 150 classes, although a fair number of them still have a handful of NotYetImplemented exceptions lying around.</p>
<p>Within the next week or two, I hope to have some code to post here, along with a link to the initial web page for the project.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dougswisher.wordpress.com/120/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dougswisher.wordpress.com/120/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=120&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/09/14/so-much-to-portso-little-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
		<item>
		<title>When are two HashSets equal?</title>
		<link>http://doug-swisher.net/2008/09/05/when-are-two-hashsets-equal/</link>
		<comments>http://doug-swisher.net/2008/09/05/when-are-two-hashsets-equal/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 01:20:37 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[biojava]]></category>
		<category><![CDATA[biosharp]]></category>

		<guid isPermaLink="false">http://dougswisher.wordpress.com/?p=109</guid>
		<description><![CDATA[It has been a couple of days since I&#8217;ve posted, as I&#8217;ve been trying to track down an elusive bug deep in the bowels of the C# port of BioJava.  I don&#8217;t have it fixed yet, but I&#8217;ve determined the root cause. There are number of places in BioJava where they use a Set as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=109&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It has been a couple of days since I&#8217;ve posted, as I&#8217;ve been trying to track down an elusive bug deep in the bowels of the C# port of <a href="http://biojava.org/wiki/Main_Page">BioJava</a>.  I don&#8217;t have it fixed yet, but I&#8217;ve determined the root cause.</p>
<p>There are number of places in BioJava where they use a Set as a key in a dictionary, to handle things such as ambiguity symbols.  For example, in DNA, the symbol &#8216;N&#8217; represents any base A, G, C, or T.  If a reverse lookup is done, asking for the ambiguity symbol for AGCT, it should always return the same symbol &#8211; N.</p>
<p>In the port, I goofed and used a List&lt;&gt; in a couple of places to port a Set.  When I went to fix that and replace it with a .Net HashSet&lt;&gt;, it didn&#8217;t resolve the problem, much to my surprise.  I wrote a quick test to try and figure out what was going on:</p>
<p><pre class="brush: csharp;">
[Test]
public void HashSetAsKey()
{
    HashSet&lt;int&gt; h1 = new HashSet&lt;int&gt;();
    h1.Add(1);
    h1.Add(2);

    HashSet&lt;int&gt; h2 = new HashSet&lt;int&gt;();
    h2.Add(2);
    h2.Add(1);

    Dictionary&lt;HashSet&lt;int&gt;, string&gt; dict = new Dictionary&lt;HashSet&lt;int&gt;, string&gt;();

    dict.Add(h1, &quot;hello&quot;);

    Assert.AreEqual(&quot;hello&quot;, dict[h2]);
}
</pre></p>
<p>This test fails, with a KeyNotFound exception.  The sets are equivalent, so why didn&#8217;t this work?  Time for another test.</p>
<p><pre class="brush: csharp;">
[Test]
public void HashSetEquality()
{
    HashSet&lt;int&gt; h1 = new HashSet&lt;int&gt;();
    h1.Add(1);
    h1.Add(2);

    HashSet&lt;int&gt; h2 = new HashSet&lt;int&gt;();
    h2.Add(1);
    h2.Add(2);

    Assert.AreEqual(h1, h2);    // Why does this fail???
}
</pre></p>
<p>Even adding the items in the same order fails!  In fact, you can remove the four Add calls and compare two empty HashSets &#8211; the test will <em>still</em> fail.</p>
<p>After some digging, it turns out that the equality test I was expecting is implemented as a separate method, called SetEquals.  The following test will pass:</p>
<p><pre class="brush: csharp;">
[Test]
public void HashSetSpecialEquality()
{
    HashSet&lt;int&gt; h1 = new HashSet&lt;int&gt;();
    h1.Add(1);
    h1.Add(2);

    HashSet&lt;int&gt; h2 = new HashSet&lt;int&gt;();
    h2.Add(1);
    h2.Add(2);

    Assert.IsTrue(h1.SetEquals(h2));
}
</pre></p>
<p>So, when are two HashSets equal?  It looks like the answer is: never.</p>
<p>Argh.</p>
<p>That makes the HashSet class useless as the key to a dictionary, unless I&#8217;m missing some other way to make it work.</p>
<p>I&#8217;m off to write my own Set class.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dougswisher.wordpress.com/109/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dougswisher.wordpress.com/109/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dougswisher.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dougswisher.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dougswisher.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dougswisher.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dougswisher.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dougswisher.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dougswisher.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dougswisher.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=doug-swisher.net&amp;blog=4436882&amp;post=109&amp;subd=dougswisher&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://doug-swisher.net/2008/09/05/when-are-two-hashsets-equal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54317bd762616a279dbeadea07b87221?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Doug</media:title>
		</media:content>
	</item>
	</channel>
</rss>
