<?xml version='1.0' encoding='utf-8' ?>
<rss version="2.0">
  <channel>
    <title>The Twilight Report</title>
    <link>http://www.wdlabs.com/twilight</link>
    <description>The Twilight Report - WhiteDactyl.com</description>
    <lastBuildDate>Fri, 25 May 2012 02:53:42 GMT</lastBuildDate>
    <generator>NX</generator>
    <image>
      <url>http://www.wdlabs.com/twilight/icon/twilight.jpg</url>
      <title>The Twilight Report</title>
      <link>http://www.wdlabs.com/twilight</link>
      <width>100</width>
      <height>100</height>
    </image>
      <item>
        <guid isPermaLink="true">http://www.wdlabs.com/twilight/entry/20080925.1203</guid>
        <pubDate>Thu, 25 Sep 2008 16:03:00 GMT</pubDate>
        <title>lp0 on fire</title>
        <link>http://www.wdlabs.com/twilight/entry/20080925.1203</link>
        <description>&lt;p&gt;I wonder why they bother teaching concurrency in computer science.
There is this &lt;a href=&quot;http://en.wikipedia.org/wiki/Dining_philosophers_problem&quot;&gt;funny problem&lt;/a&gt; 
they teach you,
involving &lt;i&gt;n&lt;/i&gt; philosophers and &lt;i&gt;n&lt;/i&gt; forks and a big pot of spaghetti
which, if you solve it wrongly, could cause &lt;i&gt;n&lt;/i&gt; philosophers to
die of starvation.  It's a well understood problem, and there are tones
of tools to address it properly, most of which have been around for 
decades on every platform imaginable.&lt;/p&gt;

&lt;p&gt;When I was working on parallel abstraction and timing at The Company,
I went to a lot of effort to make sure that it worked concurrently.
This put me in conflict with people who were too lazy to make sure
their code worked properly in parallel.  I even tried to make tools
to make it easier for them to make code parallel safe, but no, that
was too much effort, even though it mostly amounted to using a different
class with the exact same interface.&lt;/p&gt;

&lt;p&gt;In my current job at &lt;small&gt;s-mart&lt;/small&gt; we use a locking mechanism which 
has an inherent race condition.  Which means if something goes wrong
it might corrupt data.  Admittedly, the odds of that are quite low,
but I don't understand why we don't use proper locking (ie. flock),
which isn't conceptually any more complicated than the
&quot;simple&quot;&lt;sup&gt;[&lt;a href=&quot;#20080925.12031&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt; locking scheme that we use.  In my 
last job at Company 2, we had a similar locking scheme, but
it was hand coded, they didn't even bother to re-use the &quot;simple&quot;
locking scheme provided by perl for systems that don't have 
flock&lt;sup&gt;[&lt;a href=&quot;#20080925.12032&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;I found this list of the 
&lt;a href=&quot;http://technologizer.com/2008/09/18/errormessage/&quot;&gt;The Thirteen Greatest Error Messages of All Time&lt;/a&gt;.
I can't help but wonder if a bit more time thinking about 
concurrency could have kept some of these from happening often
enough to make the list.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;hr width=&quot;20%&quot; align=&quot;left&quot;/&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;a name=&quot;20080925.12031&quot;&gt;&lt;/a&gt;read as: broken&lt;/li&gt;
	&lt;li&gt;&lt;a name=&quot;20080925.12032&quot;&gt;&lt;/a&gt;and even Windows perl has adequate flock emulation now,
so why is anyone using this again?&lt;/li&gt;
&lt;/ol&gt;
</description>
        <comments>http://www.wdlabs.com/twilight/entry/20080925.1203</comments>
      </item>
  </channel>
</rss>


