<?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>Graham King &#187; Misc</title>
	<atom:link href="http://www.darkcoding.net/category/misc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darkcoding.net</link>
	<description>Solvitas perambulum</description>
	<lastBuildDate>Thu, 02 Feb 2012 04:14:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Miami Vice: Off-duty</title>
		<link>http://www.darkcoding.net/misc/miami-vice-off-duty/</link>
		<comments>http://www.darkcoding.net/misc/miami-vice-off-duty/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 04:13:26 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[miami vice]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[story]]></category>

		<guid isPermaLink="false">http://darkcoding.ge1.ca/?p=1395</guid>
		<description><![CDATA[Someone once told me that interesting stories start like this: Establish what &#8220;normal&#8221; looks like in your world. If your story is set in present-day New York, you can do that quickly, during the opening credits. If your story is set in Middle Earth, it takes a lot longer. Break the routine. Frodo has to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.the-spontaneity-shop.com/workshops/course_dates.html" target="_blank" class="external">Someone</a> once told me that interesting stories start like this:</p>

<ol>
<li>Establish what &#8220;normal&#8221; looks like in your world. If your story is set in present-day New York, you can do that quickly, during the opening credits. If your story is set in <a href="http://en.wikipedia.org/wiki/The_Lord_of_the_Rings" target="_blank" class="external">Middle Earth</a>, it takes a lot longer.</li>
<li>Break the routine. Frodo has to leave the shire. This is when the story really starts, and why you&#8217;re watching it. Today is different.</li>
</ol>

<p>The remake of the classic 80s series, <a href="http://www.imdb.com/title/tt0430357/" target="_blank" class="external">Miami Vice (2006)</a>, fails at number 2. For the whole film, two undercover vice squad detectives go undercover to bust a vice gang. Sure there&#8217;s fast cars, guns, all that, but it could of been so much better.</p>

<p><span id="more-1395"></span>
About fifteen minutes into the movie, Sonny and Ricardo (the protagonists) are talking to an informer by the side of the motorway. The informer walks in front of a truck and dies right in front of the detectives. In any real police force they would have immediately been put on sick leave, with counselling. <em>That&#8217;s</em> a break in the routine, and that&#8217;s the movie I want to see.</p>

<p>You could make it very dark. One of them goes back to work in a few days, leaves the story. The other, the focus, stays on sick leave. He realises he&#8217;s spent his whole live at work, often pretending to be someone else. No family, no friends, no community, no interests, and a very uncertain sense of identity. He mows his lawn. He slowly falls apart.</p>

<p>But it needn&#8217;t be dark. Our hero mows the lawn, and gets to know the lives of people on his street. He gets caught up in an intrigue that uses his elite vice-squadding skills. Something much below his usual level of investigation, but something that matters to this community. Maybe the old ladies&#8217; house is going to be foreclosed by the bank. Whatever the <a href="http://en.wikipedia.org/wiki/MacGuffin" target="_blank" class="external">plot device</a> is, it allows our protagonist to change, to gain a new perspective on life.</p>

<p>A gardener going undercover to bust a crime ring is an interesting story. An undercover cop going undercover, isn&#8217;t. Stories are interesting when they change the people in them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/miami-vice-off-duty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kobo eReader Touch on Ubuntu Linux</title>
		<link>http://www.darkcoding.net/misc/kobo-ereader-touch-on-ubuntu-linux/</link>
		<comments>http://www.darkcoding.net/misc/kobo-ereader-touch-on-ubuntu-linux/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 21:22:36 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=1140</guid>
		<description><![CDATA[Ten days ago, I received a Kobo eReader Touch for father&#8217;s day. It&#8217;s a lovely device. Here&#8217;s my impressions. It&#8217;s a USB device. Plug it in to your Ubuntu machine (or probably any modern Linux distro). It shows up as a USB storage device. Drag and drop books in any supported format onto it. Unplug, [...]]]></description>
			<content:encoded><![CDATA[<p>Ten days ago, I received a <a href="http://kobobooks.com/touch" target="_blank" class="external">Kobo eReader Touch</a> for father&#8217;s day. It&#8217;s a lovely device.  Here&#8217;s my impressions.</p>

<h2>It&#8217;s a USB device.</h2>

<ol>
<li>Plug it in to your Ubuntu machine (or probably any modern Linux distro). It shows up as a USB storage device.</li>
<li>Drag and drop books in any <a href="http://kobobooks.com/touch_tech" target="_blank" class="external">supported format</a> onto it.</li>
<li>Unplug, switch on, read books.</li>
</ol>

<p>It&#8217;s that simple. If you had a solid-state MP3 player (before your phone played them), this will feel familiar.</p>

<p><span id="more-1140"></span>
It charges from the USB port, and battery life so far is upwards of 8 days.</p>

<p>The setup software is Win / Mac only, but you don&#8217;t need it. When you start the device, it insists that you run the setup software. You don&#8217;t have to. As far as I can tell, the setup does two things:</p>

<ul>
<li>Forces you to create a kobobooks.com account. Lame.</li>
<li>Updates the software on the device.</li>
</ul>

<p>For this reason you might want to find a Windows or Mac machine at some point.</p>

<h2>It&#8217;s a book</h2>

<p>The Kobo Touch does a great job of respecting the book abstraction. It is light and compact like a book &#8211; I&#8217;ve read comfortably for hours. You can&#8217;t read in the dark, you can read in full sun and from any angle. You can&#8217;t browse the web, use it as a torch, or in fact do almost anything except turn the pages. As I said, it&#8217;s a book.</p>

<p>When you power it &#8216;off&#8217; (sleep), it displays the cover of the book you&#8217;re reading, and the percentage read. The percentage is presumably to convey the information your bookmark sticking out of the book normally does.</p>

<h2>Prefer ePub</h2>

<p>The Kobo deals much better with ePub than with PDF. PDF&#8217;s feel like images &#8211; no resize or reflow and you can zoom but you have to manually scroll around the page. With ePub by contrast it resizes the text to be a nice large size, and reflows the text so that it fits naturally on the screen of the device.</p>

<p>To convert your PDFs to ePubs, use the excellent eBook manager <a href="http://calibre-ebook.com/" target="_blank" class="external">Calibre</a>. It can convert between most book formats, can find cover art and metadata for your books, and much more. Calibre is multi-platform, GPL and written in Python.</p>

<p>Happy reading, and remember to ask your local library if they rent ebooks. Mine does.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/kobo-ereader-touch-on-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Treating the common cold</title>
		<link>http://www.darkcoding.net/misc/treating-the-common-cold/</link>
		<comments>http://www.darkcoding.net/misc/treating-the-common-cold/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 06:59:08 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[cold]]></category>
		<category><![CDATA[echinacea]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[vitaminc]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=690</guid>
		<description><![CDATA[Will Vitamin C really prevent or cure your cold? What about Echinacea? The best way to find out is to follow these simple steps: Gather 2000 people who have the common cold Split them randomly into two groups of 1000 Give vitamin C to one group, and a sugar pill (the placebo) to the other [...]]]></description>
			<content:encoded><![CDATA[<p>Will Vitamin C really prevent or cure your cold?</p>

<p>What about Echinacea?</p>

<p><span id="more-690"></span></p>

<p>The best way to find out is to follow these simple steps:</p>

<ol>
<li>Gather 2000 people who have the common cold</li>
<li>Split them randomly into two groups of 1000</li>
<li>Give vitamin C to one group, and a sugar pill (the placebo) to the other</li>
<li>Make sure the people receiving the pills and those dispensing the pills don&#8217;t know which is which (to make your trial double-blind)</li>
<li>Wait a bit</li>
<li>See if the Vitamin C group gets over their colder faster than the other group</li>
</ol>

<p>You will of conducted a double-blind placebo controlled scientific trial.</p>

<p>Luckily for us, we don&#8217;t have to do it ourselves. Several of these trials have already been done. Enough trials, in fact, that one can do a <a href="http://en.wikipedia.org/wiki/Meta-analysis">Meta analysis</a>, a statistical review and summary of all the trials.</p>

<p><b>A comprehensive meta analysis, by an unbiased organization, is the gold standard of scientific inquiry; it is our best chance of knowing the truth.</b></p>

<p>The <a href="http://en.wikipedia.org/wiki/Cochrane_Collaboration">Cochrane Collaboration</a> is an international not for profit organisation set up 15 years ago to create transparent, systematic, unbiased reviews of the medical literature on everything from drugs, through surgery, to community interventions. And I have a cold. I read their review to find out whether Vitamin C or Echinacea would be effective in treating it.</p>

<h2>Vitamin C</h2>

<p>Here is the review of research on <a href="http://www.cochrane.org/reviews/en/ab000980.html">Vitamin C for preventing and treating the common cold</a>.</p>

<blockquote>
Thirty trials involving 11,350 participants suggest that regular ingestion of vitamin C has no effect on common cold incidence in the ordinary population.

It reduced the duration and severity of common cold symptoms slightly, although the magnitude of the effect was so small its clinical usefulness is doubtful.

Nevertheless, in six trials with participants exposed to short periods of extreme physical or cold stress or both (including marathon runners and skiers) vitamin C reduced the common cold risk by half.

The failure of vitamin C supplementation to reduce the incidence of colds in the normal population indicates that routine mega-dose prophylaxis is not rationally justified for community use. But evidence suggests that it could be justified in people exposed to brief periods of severe physical exercise or cold environments.
</blockquote>

<h2>Echinacea</h2>

<p>Here is their review of research on <a href="http://www.cochrane.org/reviews/en/ab000530.html">Echinacea for preventing and treating the common cold</a>.</p>

<blockquote>
Echinacea preparations tested in clinical trials differ greatly. There is some evidence that preparations based on the aerial parts of E. purpurea might be effective for the early treatment of colds in adults but the results are not fully consistent.

Beneficial effects of other Echinacea preparations, and Echinacea used for preventative purposes might exist but have not been shown in independently replicated, rigorous RCTs.
</blockquote>

<p>Get well soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/treating-the-common-cold/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Guy Kawasaki&#039;s 10-20-30 presentation rule</title>
		<link>http://www.darkcoding.net/misc/guy-kawasakis-10-20-30-presentations-rule/</link>
		<comments>http://www.darkcoding.net/misc/guy-kawasakis-10-20-30-presentations-rule/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 17:41:22 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[presentation youtube guykawasaki 10-20-30]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=587</guid>
		<description><![CDATA[Funny, practical, and well worth 1 minute 50 seconds of your life: via the BootUp Labs Blog.]]></description>
			<content:encoded><![CDATA[<p>Funny, practical, and well worth 1 minute 50 seconds of your life:</p>

<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/liQLdRk0Ziw&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/liQLdRk0Ziw&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>

<p>via the <a href="http://blog.bootuplabs.com/2009/09/29/3-investor-pitch-conditions-why-you-get-conflicting-advice/">BootUp Labs Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/guy-kawasakis-10-20-30-presentations-rule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#039;m on identi.ca and Twitter</title>
		<link>http://www.darkcoding.net/misc/im-on-identi-ca-and-twitter/</link>
		<comments>http://www.darkcoding.net/misc/im-on-identi-ca-and-twitter/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 16:08:35 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[microblogging twitter identica]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=578</guid>
		<description><![CDATA[I am sharing my thoughts, mainly about web technologies, on identi.ca and twitter. Graham King on identi.ca Graham King on Twitter The nature of the medium means those thoughts will be generally raw and truncated, but timely.]]></description>
			<content:encoded><![CDATA[<p>I am sharing my thoughts, mainly about web technologies, on identi.ca and twitter.</p>

<ul>
<li><a href="http://identi.ca/grahamking" target="_blank" class="external">Graham King on identi.ca</a></li>
<li><a href="http://twitter.com/grahamking" target="_blank" class="external">Graham King on Twitter</a></li>
</ul>

<p>The nature of the medium means those thoughts will be generally raw and <a href="http://identi.ca/notice/9739093" target="_blank" class="external">truncated</a>, but timely.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/im-on-identi-ca-and-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quote of the day &#8211; monkeys</title>
		<link>http://www.darkcoding.net/misc/quote-of-the-day-monkeys/</link>
		<comments>http://www.darkcoding.net/misc/quote-of-the-day-monkeys/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 19:09:11 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[quote monkey business]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=535</guid>
		<description><![CDATA[In response to monkeys stealing his coffee beans, an Indian farmer observes: If you start shooting monkeys, you&#8217;ll spend the rest of your life shooting monkeys. via Bruce Eckel]]></description>
			<content:encoded><![CDATA[<blockquote>In response to monkeys stealing his coffee beans, an Indian farmer observes: <em>If you start shooting monkeys, you&#8217;ll spend the rest of your life shooting monkeys.</em></blockquote>

<p>via <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=264047"> Bruce Eckel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/quote-of-the-day-monkeys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Legal 1 Usability 0</title>
		<link>http://www.darkcoding.net/misc/legal-1-usability-0/</link>
		<comments>http://www.darkcoding.net/misc/legal-1-usability-0/#comments</comments>
		<pubDate>Wed, 27 May 2009 18:55:46 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[food temperature microwave legal usability]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=494</guid>
		<description><![CDATA[The cooking instructions for my Tandoori Chicken Breast microwave lunch, are to cook&#8230; &#8230;until internal temperature reaches 74C (165F). How many office kitchens have a cook&#8217;s thermometer? Score nothing for usability. Should you for any reason attempt to sue the manufacturer, it will rapidly become apparent that you didn&#8217;t follow the cooking instructions. Score one [...]]]></description>
			<content:encoded><![CDATA[<p>The cooking instructions for my Tandoori Chicken Breast microwave lunch, are to cook&#8230;</p>

<blockquote>&#8230;until internal temperature reaches 74C (165F).</blockquote>

<p>How many office kitchens have a cook&#8217;s thermometer? Score nothing for usability.</p>

<p>Should you for any reason attempt to sue the manufacturer, it will rapidly become apparent that you didn&#8217;t follow the cooking instructions. Score one for legal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/legal-1-usability-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenTTD: Trains and signals for beginners &#8211; a tutorial</title>
		<link>http://www.darkcoding.net/misc/openttd-trains-and-signals-for-beginners-a-tutorial/</link>
		<comments>http://www.darkcoding.net/misc/openttd-trains-and-signals-for-beginners-a-tutorial/#comments</comments>
		<pubDate>Thu, 21 May 2009 07:22:43 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[openttd train signal game tutorial]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=464</guid>
		<description><![CDATA[I have been playing Open Transport Tycoon Deluxe, or OpenTTD on and off for a while, but I confess I only understood train signals very recently. The game gets a lot more fun once you can have complex track layouts, so here&#8217;s a tutorial on train track layout and signaling for complete beginners. Building tracks [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing Open Transport Tycoon Deluxe, or <a href="http://www.openttd.org">OpenTTD</a> on and off for a while, but I confess I only understood train signals very recently. The game gets a lot more fun once you can have complex track layouts, so here&#8217;s a tutorial on train track layout and signaling for complete beginners.</p>

<h2>Building tracks the wrong way</h2>

<p>If you&#8217;re anything like I was, all your train layouts probably look like this:</p>

<p><a href="http://www.darkcoding.net/files/2009/05/one-to-one.jpg"><img src="http://www.darkcoding.net/files/2009/05/one-to-one-150x150.jpg" alt="one-to-one" title="one-to-one" width="150" height="150" class="aligncenter size-thumbnail wp-image-468" /></a></p>

<p><span id="more-464"></span></p>

<p>You can only run one train on that track, but say you&#8217;re happy with that. When you need to connect another station, you might, unsuccessfully, try this:</p>

<p><a href="http://www.darkcoding.net/files/2009/05/two-stations-naive.jpg"><img src="http://www.darkcoding.net/files/2009/05/two-stations-naive-150x150.jpg" alt="two-stations-naive" title="two-stations-naive" width="150" height="150" class="aligncenter size-thumbnail wp-image-469" /></a></p>

<p>Notice the three two-way signals. <strong>A signal locks an entire section of track from that signal until the next signal or the end of the line.</strong> These signals define four locks, color coded on this screenshot. If the train from Lundinghattan Ridge is in the Mardingbury station, it will have a lock on the yellow section, but not on the green section. The signal nearest Mardingbury will be red, but the other two signals will be green. The train from Marbourne will be able to acquire a lock on the green section, and stop at the signal nearest Mardingbury. We have a train stand-off. Not good.</p>

<p>To make that layout work, you&#8217;d need to remove the signal nearest Mardingbury, thereby merging the green and yellow sections. You remove that, and you have two trains sharing a station. OK, so now you add a third station to your network. Now things really start to break down.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/blocked.jpg"><img src="http://www.darkcoding.net/files/2009/05/blocked-150x150.jpg" alt="blocked" title="blocked" width="150" height="150" class="aligncenter size-thumbnail wp-image-471" /></a></p>

<p>The blue section is shared between the Lundinghattan train and the Chenningpool train. The Lundinghattan train is top left, just leaving Mardingbury station. It has the lock on the yellow section. Notice the two signals nearest it are red (actually all the signals in this picture are red, but focus on just those two).  The train from Chenningpool acquired the lock on the blue section, but and this is the first important concept of this tutorial, once it got level with the depot it had a choice of two paths: Mardingbury, which is blocked by a red signal, and the depot, which isn&#8217;t. <strong>A train faced with a red two-way signal will always avoid that signal, even if that means going away from it&#8217;s destination</strong>. If instead of the depot we had a track running to the other side of the map, our Chenningpool would of happily headed down it, to avoid the red signal.</p>

<p>In practice this means our Chenningpool train will head into the depot, turn around, and head back to Chenningpool. It will never make it to Mardingbury. There is something very wrong with our approach, and the short answer is that we were using two-way tracks and two-way signals. We need to think one-way. Let&#8217;s start again.</p>

<h2>The basic loading loop</h2>

<p>Every shared station should have a one-way loading loop.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/loading-loop.jpg"><img src="http://www.darkcoding.net/files/2009/05/loading-loop-150x150.jpg" alt="loading-loop" title="loading-loop" width="150" height="150" class="aligncenter size-thumbnail wp-image-473" /></a></p>

<p>Notice the signals around the loop are all one-way. To place a one-way signal place a signal as normal, then click the signal again, once or twice depending on the orientation you want for your signal.</p>

<p>Now let&#8217;s connect our loop up to a town, and run two trains betweens those two towns.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/shared-track1.jpg"><img src="http://www.darkcoding.net/files/2009/05/shared-track1-150x150.jpg" alt="shared-track1" title="shared-track1" width="150" height="150" class="aligncenter size-thumbnail wp-image-474" /></a></p>

<p>We connected the shared track from Marbourne to our loading loop, with two short one-way sections. We can see the back of a one-way signal in the red circle, and the front of a one-way signal just to the right of the blue circle.</p>

<p>Let&#8217;s look at what&#8217;s going on in this picture. The train circled in red has the lock on the red section of track, and is held at the signal circled in red. It is waiting for a lock on the blue section of track. Notice that it could of kept going around the loop, instead of branching off and stopping at the red signal. <strong>Faced with a red one-way signal and a clear track going the wrong way, the train will stop at the signal, which is nearly always what we want</strong>. This is exactly the opposite to what would of happened with two-way signals.</p>

<p>The train circled in blue has the lock on the blue section of track, and is about to acquire the lock on the yellow section. As soon as it does, it will release the lock on the blue section, and the train circled in red will move forward. This is a layout that works.</p>

<h2>Prefer one way tracks</h2>

<p>Let&#8217;s connect up the other two towns, and not get blocked this time. The trick is to make all shared sections of track one-way.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/one-way.jpg"><img src="http://www.darkcoding.net/files/2009/05/one-way-150x150.jpg" alt="one-way" title="one-way" width="150" height="150" class="aligncenter size-thumbnail wp-image-475" /></a></p>

<p>The only two-way signals in this picture are circled in blue. All the others are one-way. The two-way signals are there to prevent a train on the two-way track from locking part of the one-way loop. If the left-hand two-way signal was not there, a train in Lundinghattan station would hold a lock on it&#8217;s two-way section of track, and the bottom part of the one-way section, up to the next signals. Remember, a lock is between two signals or the end of the track. Incidentally, stations don&#8217;t end a lock. If you had a station half-way along a track, the lock would run right through it until the next signal.</p>

<h2>Pre-signals, the pro-layout</h2>

<p>Mardingbury is getting quite busy now, we&#8217;d like to have two tracks in the station. Stop all the trains (or be quick!), bulldoze the station, and build a new, two track one. I moved mine back a square to allow space for the tracks to merge. and made the loading loop a little bigger. To control access to a multi-track station, you need <strong>pre-signals</strong>.</p>

<p>Pre-signals come in two types, entrance and exit. An entrance pre-signal will be red if all the exit pre-signals behind it are also red. The motivation for pre-signals is nicely illustrated here: <a href="http://wiki.openttd.org/Signals#Pre-signals">Pre-signals on the OpenTTD wiki</a>.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/pro1.jpg"><img src="http://www.darkcoding.net/files/2009/05/pro1-150x150.jpg" alt="pro1" title="pro1" width="150" height="150" class="aligncenter size-thumbnail wp-image-479" /></a></p>

<p>The entrance pre-signal is circled in blue. Notice that it has a horizontal white-bar, to show it is different. The exit pre-signals are circled in purple, and have vertical white bars. There is currently a train in the station, so one of the exit pre-signals is red. Because one of the tracks is free (green signal), the entrance pre-signal is green. The next arriving train will correctly go to the empty track. Even though they are pre-signals, we are still using one-way signals</p>

<p>What you can&#8217;t see on the picture, but which are very important, are the two normal one-way signals circled in black. They control station exit, by forcing a train wanting to leave the station to acquire a lock on the yellow section. This prevents two train leaving at the same time crashing into each other.</p>

<p>When a train is in the station, it still holds a lock on it&#8217;s section of track. The lock runs from the exit -pre-signal at the entrance to the station, to the regular one-way signal at the exit of the station.</p>

<h2>Scaling it up</h2>

<p>You now know all the key concepts, the rest is just more of the same. Here for example is what you would do if Lundinghattan got busy.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/two-loading-loops.jpg"><img src="http://www.darkcoding.net/files/2009/05/two-loading-loops-150x150.jpg" alt="two-loading-loops" title="two-loading-loops" width="150" height="150" class="aligncenter size-thumbnail wp-image-481" /></a></p>

<p>You give it a loading loop, and a multi-bay station. Pre-signals control station entrance, and regular one-ways control the exit. You can see the one-way&#8217;s at the exit much better on this station.</p>

<p>There&#8217;s one final change we need to make to allow lots of trains &#8211; we need to replace the two-way section highlighted in blue with two one-way sections.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/pro-final.jpg"><img src="http://www.darkcoding.net/files/2009/05/pro-final-150x150.jpg" alt="pro-final" title="pro-final" width="150" height="150" class="aligncenter size-thumbnail wp-image-483" /></a></p>

<p>We don&#8217;t have any more two-way signals. Each station has a loading loop, and one-way tracks connect the stations. In our first tries we had one track connecting the stations, and could only run one train between them. Now we have two tracks connection the stations, and in this picture alone there are eight trains, all serving Mardingbury. Now that&#8217;s more like it!</p>

<p>The stations are quite close together, so it might not be clear what is loading-loop and what is the tracks that connect them, so here&#8217;s an example with stations further apart.</p>

<p><a href="http://www.darkcoding.net/files/2009/05/pro-big.jpg"><img src="http://www.darkcoding.net/files/2009/05/pro-big-150x150.jpg" alt="pro-big" title="pro-big" width="150" height="150" class="aligncenter size-thumbnail wp-image-491" /></a></p>

<p>Other stations would have their own loading loops, and as long as the one way tracks connect, you end up with a network spanning the world. Trains can run from anywhere to anywhere, and new stations just need plugging in to the network.</p>

<p>I have one final tip: Playing with virtual toy trains can be quite addictive, so remember to get some sleep :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/openttd-trains-and-signals-for-beginners-a-tutorial/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Micro-Zooids: A story</title>
		<link>http://www.darkcoding.net/ideas/micro-zooids-a-story/</link>
		<comments>http://www.darkcoding.net/ideas/micro-zooids-a-story/#comments</comments>
		<pubDate>Sun, 10 May 2009 22:23:13 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Strategy]]></category>
		<category><![CDATA[story game youth]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=450</guid>
		<description><![CDATA[When I was 16, I wrote a computer game, called Micro Zooides. It was called that partly because on Windows .EXE files all start with the two characters MZ, and partly because it was about small creatures. Micro-Zooides was going to be about humanity&#8217;s progress, it was going to be Civilization, which didn&#8217;t exist yet. [...]]]></description>
			<content:encoded><![CDATA[<p>When I was 16, I wrote a computer game, called Micro Zooides. It was called that partly because on Windows .EXE files all start with the two characters <code>MZ</code>, and partly because it was about small creatures. Micro-Zooides was going to be about humanity&#8217;s progress, it was going to be <a href="http://www.civilization.com/" target="_blank" class="external">Civilization</a>, which didn&#8217;t exist yet.</p>

<p>The game had a splash screen of a Far Side comic, then a short video of me tromping through the woods like a Neanderthal, which my Dad filmed and which I digitized with a very early video capture card.</p>

<p>In <a href="http://en.wikipedia.org/wiki/Turbo_C%2B%2B#Historical_versions" target="_blank" class="external">Borland&#8217;s Turbo C++ 3.0</a> I wrote a basic graphics engine to display the tiles of the world, and an event loop so I could move the main character around the world. I drew sprites for a proto-human (the micro zooid), dirt, rocks and sticks. He could walk around the world, and pick up and put down rocks or sticks.</p>

<p>Then I took a break to plan. I have a proto-human, rocks, and sticks. How do I get to civilization?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/ideas/micro-zooids-a-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating from Picasa to GIMP</title>
		<link>http://www.darkcoding.net/misc/migrating-from-picasa-to-gimp/</link>
		<comments>http://www.darkcoding.net/misc/migrating-from-picasa-to-gimp/#comments</comments>
		<pubDate>Wed, 06 May 2009 05:07:13 +0000</pubDate>
		<dc:creator>graham</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[digital]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[picasa]]></category>

		<guid isPermaLink="false">http://www.darkcoding.net/?p=423</guid>
		<description><![CDATA[I&#8217;ve been using Picasa to edit my pictures for a long time, and it&#8217;s an excellent program. Recently however I&#8217;ve started shooting RAW, and I&#8217;d like control, so I&#8217;ve started using GIMP. It&#8217;s more powerful and more complicated than Picasa, so to start myself off I went through all the features of Picasa and made [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://picasa.google.com" target="_blank" class="external">Picasa</a> to edit my pictures for a long time, and it&#8217;s an excellent program. Recently however I&#8217;ve started shooting RAW, and I&#8217;d like control, so I&#8217;ve started using <a href="http://www.gimp.org/" target="_blank" class="external">GIMP</a>. It&#8217;s more powerful and more complicated than Picasa, so to start myself off I went through all the features of Picasa and made notes on how to duplicate that operation in GIMP. Here are those notes.</p>

<p>Most of what Picasa does can be replicated with the Colors / Levels or Colors / Curves tool. It&#8217;s well worth spending a little time experimenting with both of those (the documentation is very good too).</p>

<h2>Crop</h2>

<p>In the Toolbox, click the Rectangle select tool
In its options (beneath the tools), tick &#8216;Fixed: Aspect Ratio&#8217;
Enter 6:4 ratio (for 1.6 sensor, most DSLRs)
Tick Highlight.
Draw a rectangle on the image that you want to crop to.
Image menu / Crop to Selection</p>

<p><span id="more-423"></span></p>

<h2>Straighten</h2>

<p>Click one of the rulers above or to the left of the image, and drag a guideline onto your picture
In the Toolbox, select the rotate tool
Select &#8216;Clipping: Crop to result&#8217;. Maybe &#8216;Interpolation: Sinc (Lanczos3)&#8217;, although that doesn&#8217;t seem to matter
Rotate until your picture is straight, using your guideline
Click Rotate
Image / Fit Canvas to Layers or Image / Autocrop Image
Image / Guides / Remove all guides</p>

<h2>Redeye</h2>

<p>Filters / Enhance / Red-Eye Removal (I have never used this)</p>

<h2>I&#8217;m feeling lucky</h2>

<p>Colors / Levels / Auto</p>

<h2>Auto Contrast / Auto Color</h2>

<p>Colors / Auto / something</p>

<h2>Fill light</h2>

<p>Colors / Levels
Drag the middle triangle (grey) to the left</p>

<h2>Highlights</h2>

<p>Colors / Levels
Drag the right side (white) triangle</p>

<h2>Shadows</h2>

<p>Colors / Levels
Drag the left side (black) triangle</p>

<h2>Color Temperature</h2>

<p>Tools / GEGL Operation / color-temperature
Adjust Intended Temperature</p>

<h2>Neutral Color Picker</h2>

<p>Colors / Levels
There are three color pickers near the bottom right
Use the left one to select black, the middle one neutral gray, and the right one white</p>

<h2>Sharpen</h2>

<p>Filters / Enhance / Unsharp mask
Try these values: Radius: 1 &#8211; 5  Amount: 0.5 &#8211; 1
<strong>OR</strong>
Colors / Components / Decompose.
HSV, Decompose to layers
Switch off the hue and saturation layer
Apply the Unsharp mask, as detailed above
Colors / Components / Recompose</p>

<h2>Sepia</h2>

<p>Filters / Decor / Old Photo</p>

<h2>B &amp; W</h2>

<p>Image / Mode / Grayscale
<strong>OR</strong>
Colors / Desaturate</p>

<h2>Warmify</h2>

<p>Colors / Curves
Select Blue &#8211; pull the center-right of the curve down most of a grid box
Select Red &#8211; pull the center-right of the curve up most of a grid box
<strong>OR</strong>
Tools / GEGL Operation / color-temperature / Increase intended temperature by 10k or 20k</p>

<h2>Saturation</h2>

<p>Colors / Hue-Saturation / Pull the Saturation slider to the right</p>

<h2>Soft Focus</h2>

<p>Duplicate layer (right click / Duplicate or use the icon bottom of layers pane)
Filters / Blur / Gaussian Blur..  Set to 60
Reduce Opacity to ~60%
Right click on blur layer, Add Layer Mask, White (full opacity)
Click the foreground color, set S to 0 and V to 50 (or 60, 70)
Select a brush, the Paintbrush tool, paint over the parts you don&#8217;t want fuzzy
To replicate Picasa this would be a big circle somewhere in the middle of the picture</p>

<h2>Graduated tint</h2>

<p>Duplicate layer
Switch off Background by clicking the eye
Edit that layer with Levels and Curves to expose sky correctly
Right click on new layer / Add Layer Mask/  White (full opacity)
Select Blend tool
Draw a line on the image to make a gradient. Try again.
Click the Background eye back on
Right click on the edited layer, and Apply Layer Mask
Merge the layers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darkcoding.net/misc/migrating-from-picasa-to-gimp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

