<?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>kera.name Articles</title>
	<atom:link href="http://kera.name/articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://kera.name/articles</link>
	<description>tomalak's occasional commentary on Internet, PHP, TV and Life</description>
	<lastBuildDate>Wed, 16 May 2012 15:26:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How To Stop Thunderbird From Freezing When You Click On Links</title>
		<link>http://kera.name/articles/2012/05/how-to-stop-thunderbird-from-freezing-when-you-click-on-links/</link>
		<comments>http://kera.name/articles/2012/05/how-to-stop-thunderbird-from-freezing-when-you-click-on-links/#comments</comments>
		<pubDate>Wed, 16 May 2012 15:26:24 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=974</guid>
		<description><![CDATA[Is the Thunderbird-Firefox relationship getting you down? Does clicking links occasionally result in Thunderbird totally locking up for over a minute, before Firefox bursts into life with the requested page? Apparently this started around Thunderbird v3, and here's how to fix it all the way up to v12.]]></description>
			<content:encoded><![CDATA[<p>Is the Thunderbird-Firefox relationship getting you down? Does clicking links occasionally result in Thunderbird totally locking up for over a minute, before Firefox bursts into life with the requested page?</p>
<p>Apparently this started around Thunderbird v3, and here&#039;s how to fix it all the way up to v12:</p>
<ul>
<li>Tools > Options</li>
<li>&#034;Advanced&#034; tab</li>
<li>&#034;Config Editor&#8230;&#034;</li>
<li>&#034;I&#039;ll be careful, I promise!&#034;</li>
<li>Set preference <strong>network.protocol-handler.warn-external.http</strong> to <strong>true</strong>.</li>
<li>Click on some link in an existing email</li>
<li>You now get the choice of which browser to use. <em>Do not select Firefox</em>. Instead, choose &#034;Other&#034; and locate <code>firefox.exe</code> on your hard drive.</li>
<li>&#034;OK&#034; everything.</li>
</ul>
<p>Apparently Thunderbird works best when you pretend to it that its sibling Firefox is a third-party application that needs a simple shell invocation.</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/05/how-to-stop-thunderbird-from-freezing-when-you-click-on-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yes Alex, The Standard Doesn&#039;t Mention The Stack, And That&#039;s Fine</title>
		<link>http://kera.name/articles/2012/05/yes-alex-the-standard-doesnt-mention-the-stack-and-thats-fine/</link>
		<comments>http://kera.name/articles/2012/05/yes-alex-the-standard-doesnt-mention-the-stack-and-thats-fine/#comments</comments>
		<pubDate>Wed, 16 May 2012 10:03:20 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=970</guid>
		<description><![CDATA[Alex Darby writes about "the Stack", referring to both the ISO standard and Bjarne's C++ book and complains that they both evade the concept of a stack or a heap as used for laying-out objects in memory.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.altdevblogaday.com/2011/12/14/c-c-low-level-curriculum-part-3-the-stack/">Alex Darby writes about &#034;the Stack&#034;</a>, referring to both the ISO standard and Bjarne&#039;s C++ book and complains that they both evade the concept of a stack or a heap as used for laying-out objects in memory:</p>
<blockquote>
<p>But the fact that the standard text on C++ all but ignores something as core to the internal operation of C++ as the Stack is telling indeed. In my experience, this is symptomatic of the disconnect between programming language and underlying implementation that exists in the academic mindset.</p>
</blockquote>
<p>In fact, it&#039;s very deliberate, and has nothing to do with academia. You shouldn&#039;t need to know about implementation details like a memory stack or heap because (a) you&#039;re writing in a programming language that abstracts those details away from you, and (b) they are implementation-specific. In Bjarne&#039;s case he&#039;s writing only about C++, not how some specific platform implements it. It&#039;s a book about the <em>language</em>, not the <em>computer</em> that compiles it into another language.</p>
<p>Understanding this abstraction is key to writing good, portable code. That&#039;s why he&#039;s done it and it&#039;s a <em>good</em> thing.</p>
<p>When books jump into talking about a &#034;stack&#034; or &#034;heap&#034;, they are mistraining people into thinking that these are part of C++ when they are in fact programming with a combination of technologies including C++, machine code, a stick of memory, an OS&#8230; and Darby seems to have fallen into that trap, as his article gives the impression that he believes a stack is a core part of C++ itself. Indeed, Bjarne is correct to talk instead about the notion of <em>storage duration</em>, which is the only thing the C++ language defines on the matter.</p>
<p>Of course, that&#039;s not to say that such details should be forever ignored or that we should pretend that, say, an x86 machine doesn&#039;t typically use a stack. Certainly in the game development world, a programmer must be aware of lower-level implementation details. I&#039;m not advocating some academic approach that completely removes real-world components from the equation.</p>
<p>It&#039;d just be helpful if Darby didn&#039;t pretend that these lower-level details were actually part of C++ at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/05/yes-alex-the-standard-doesnt-mention-the-stack-and-thats-fine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Navigating Secondary Expansion in GNU Make</title>
		<link>http://kera.name/articles/2012/05/navigating-secondary-expansion-in-gnu-make/</link>
		<comments>http://kera.name/articles/2012/05/navigating-secondary-expansion-in-gnu-make/#comments</comments>
		<pubDate>Wed, 09 May 2012 14:00:00 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Make]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=956</guid>
		<description><![CDATA[Struggling to get variable substitution to affect targets and dependencies in GNU Make? Here's why, and how to fix it (if you don't mind a good hack).]]></description>
			<content:encoded><![CDATA[<p>Struggling to get variable substitution to affect targets and dependencies in GNU Make? Here&#039;s why, and how to fix it (if you don&#039;t mind a good hack).</p>
<hr />
<p>GNU Make is powerful and, although it&#039;s been superceded in some circles by wrappers like <em>automake</em> or all-out replacements like <em>CMake</em> and <em>scons</em>, for simple distributions it&#039;s still got teeth.</p>
<p>It&#039;s not without its pitfalls, though. In the below Makefile, not only do I have to create my own string equality function <code>eq</code>, but the outcome is not what I&#039;d have expected:</p>
<pre><code># Comparison function
eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))

# Variables
suf = $(if $(call eq, $(NATIVE), 1),-native,)
build_dir = build$(suf)

# Targets
.PHONY: a b

# (should yield "build")
a: $(build_dir)

# (should yield "build-native")
b: NATIVE=1
b: $(build_dir)

$(build_dir):
     @echo $@ ($(build_dir))
</code></pre>
<h3>Outcome:</h3>
<pre><code># Flag behaving properly:
~$ make a NATIVE=1
build-NATIVE build-NATIVE
~$ make b NATIVE=1
build-NATIVE build-NATIVE

# Flag not behaving properly:
~$ make a
build (build)
~$ make b
build (build-NATIVE)
</code></pre>
<p>In target <code>b</code> with no flag initially given, the sub-target <code>build</code> is being invoked rather than the <code>build-NATIVE</code> target that I&#039;m really after, as indicated by the output of <code>$@</code>. Notice how <code>$(build_dir)</code> is correct within the rule itself.</p>
<p>In real life, my <code>Makefile</code> will accept a flag describing the target platform for the build; the default case is an ARMv5 cross-compilation, but a native build can be performed for local debugging. In addition, unit tests <em>must</em> be built natively as they are executed locally as part of the build process. So the idea is to override the target flag for the unit test target; then, even when mixing targets as in <code>make check all</code>, for the <code>check</code> target only a flag <code>NATIVE</code> is automatically set to <code>"1"</code> even though it was missing from the commandline invocation.</p>
<p>Alas, as shown above, although this works for instructions inside the encapsulated rule, the same is not true for the target itself (or its dependencies, of which we haven&#039;t written any here). This is because the Makefiles run in two phases: targets and pre-requisites are expanded in the &#034;read-in&#034; phase; my variable isn&#039;t reset until the &#034;target-update&#034; phase, in which only variables inside rules are expanded.</p>
<p>To work around this, we can make use of &#034;<a href="http://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html">secondary expansion</a>&#034;. Applying it to the example above, using the details provided in the GNU Make documentation:</p>
<pre><code># Comparison function
eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))

# Variables
suf = $(if $(call eq, $(NATIVE), 1),-native,)
build_dir = build$(suf)

# Targets
.PHONY: a b
.SECONDEXPANSION:

# (should yield "build")
a: $$(build_dir)

# (should yield "build-native")
b: NATIVE=1
b: $$(build_dir)

$(build_dir):
     @echo $@ ($(build_dir))
</code></pre>
<h3>Outcome:</h3>
<pre><code># Flag behaving properly:
~$ make a NATIVE=1
build-NATIVE build-NATIVE
~$ make b NATIVE=1
build-NATIVE build-NATIVE

# Flag not behaving properly:
~$ make a
build (build)
~$ make b
make: *** No rule to make target `build-foo', needed by `b'. Stop.
</code></pre>
<p>We&#039;re closer: target <code>b</code> is now at least attempting to invoke the correct sub-target <code>build-foo</code>. Unfortunately, secondary expansion only works for the prerequisite lists and not for target names, so in the case above the target <code>build-foo</code> doesn&#039;t actually exist.</p>
<p>The sensible thing to do at this point is to get that explicit value out of all targets and use patching matching instead or, better yet, employ AutoMake. But if the targets don&#039;t have obvious patterns and a build system switch doesn&#039;t whet your appetite today, and if you fancy a good hack, there is a complete workaround:</p>
<pre><code># create comparison function
eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))

suf = $(if $(call eq, $(MYVAR), 1),-foo,)
build_dir = build$(suf)

.PHONY: a b
.SECONDEXPANSION:

# Should yield `build`
a: $$(build_dir)

# Should yield `build-foo`
b: $$(if ($$call eq,$$(MYVAR),1),$$(build_dir),)
        $(if $(call eq,$(MYVAR),1),,@make b MYVAR=1)

$(build_dir):
        @echo $@ ($(build_dir)) $(INHERITED)
</code></pre>
<h3>Outcome:</h3>
<pre><code>[~]$ make a INHERITED=6
build (build) 6
[~]$ make a MYVAR=1 INHERITED=6
build-foo (build-foo) 6
[~]$ make b INHERITED=6
make[1]: Entering directory `~`
build-foo (build-foo) 6
make[1]: Entering directory `~`
</code></pre>
<p>By invoking <code>make</code> from scratch for the target tree under <code>b</code>, we can have our targets any way we want. Any other &#034;local&#034; variables are even automatically inherited by the sub-<code>make</code> (as demonstrated above by the <code>INHERITED</code> variable).</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/05/navigating-secondary-expansion-in-gnu-make/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It Is Possible To Downgrade Firefox After All</title>
		<link>http://kera.name/articles/2012/05/it-is-possible-to-downgrade-firefox-after-all/</link>
		<comments>http://kera.name/articles/2012/05/it-is-possible-to-downgrade-firefox-after-all/#comments</comments>
		<pubDate>Tue, 08 May 2012 21:51:19 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=931</guid>
		<description><![CDATA[Stuck with a nasty memory leak somewhere in a large AJAX-driven application that only shows up in Firefox, and no native tools with which to diagnose it, I decided to give DynaTrace AJAX Edition a go. Unfortunately, Mozilla's ridiculous high-speed release process means I was stuck on an unsupported bleeding-edge browser version... or so I thought.]]></description>
			<content:encoded><![CDATA[<p><img src="http://kera.name/articles/wp-content/uploads/2012/05/firefox-logo-browser-150x150.jpg" alt="" title="firefox-logo-browser" width="150" height="150" style="float: left" />Stuck with a nasty memory leak somewhere in a large AJAX-driven application that only shows up in Firefox, and no native tools with which to diagnose it, I decided to give <a href="http://ajax.dynatrace.com/ajax/en/">DynaTrace AJAX Edition</a> a go.</p>
<p>DynaTrace recently added support for Firefox 11 but, unfortunately, Mozilla&#039;s ridiculous high-speed release process means the major version number was bumped just over a month later to 12. The automatic upgrades that force themselves on me when I launch Firefox<sup>(1)</sup> mean I was on Firefox 12 almost immediately, and all this put together means that I couldn&#039;t use DynaTrace.</p>
<p>Fortunately, we can downgrade Firefox by <a href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases">locating the desired release from Mozilla&#039;s FTP site</a><sup>(2)</sup> and installing it. As long as you don&#039;t go too far back in the release list, profiles should be reasonably safe from the downgrade; in this case, going from Firefox 12 to Firefox 11 was painless&#8230; and I got to enjoy the awesomeness of DynaTrace AJAX Edition.</p>
<p>Firefox will immediately begin downloading the latest version the next time you launch it, and will upgrade the time after that. So, at this point, it&#039;s worth going into Tools->Options and disabling automatic upgrades like I should have done originally.</p>
<p>It&#039;s time that Mozilla stopped this nonsense; incrementing the major version number so often is causing a tangible nightmare with add-on compatibility, and I cannot understand why the Firefox development team leads do not appear to care.</p>
<hr />
<p><em>Note 1:</em> Hey, Mozilla! When I launch my browser, it&#039;s because I want to visit a website, not because I want to upgrade the browser.<br />
<em>Note 2:</em> &#034;uk&#034; stands for Ukraine, not the UK. You&#039;re looking for &#034;en-gb&#034;, which I should already know. I mean, who was I kidding?</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/05/it-is-possible-to-downgrade-firefox-after-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#039;s Different About Static Members Defined In-line?</title>
		<link>http://kera.name/articles/2012/05/whats-different-about-static-members-defined-in-line/</link>
		<comments>http://kera.name/articles/2012/05/whats-different-about-static-members-defined-in-line/#comments</comments>
		<pubDate>Sun, 06 May 2012 15:40:34 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=915</guid>
		<description><![CDATA[While writing my previous post, a question came to mind regarding the use of static members for bounding arrays that are members of the same type.]]></description>
			<content:encoded><![CDATA[<p>While writing <a href="/articles/2012/05/when-is-a-scoped-lock-not-a-scoped-lock/">my previous post</a>, a question came to mind.</p>
<p>The following is not valid:</p>
<pre><code>struct T
{
   static const size_t BUF_SIZE;
   char buf[BUF_SIZE];
};

size_t T::BUF_SIZE = 256;

// error: array bound is not an integer constant
</code></pre>
<p>Clearly, for any instance of <code>T</code>, the array bound could be found in a different translation unit and <code>T</code>&#039;s size would be incalculable.</p>
<p>However, since the following compiles and links, I came to wonder whether it&#039;s really well-defined:</p>
<pre><code>struct T
{
   static const size_t BUF_SIZE = 100*1024;
   char buf[BUF_SIZE];
};
</code></pre>
<p>My standard-fu fails me so far&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/05/whats-different-about-static-members-defined-in-line/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tomalak&#039;s Tuesday Tip #13: When Is A Scoped Lock Not A Scoped Lock?</title>
		<link>http://kera.name/articles/2012/05/when-is-a-scoped-lock-not-a-scoped-lock/</link>
		<comments>http://kera.name/articles/2012/05/when-is-a-scoped-lock-not-a-scoped-lock/#comments</comments>
		<pubDate>Wed, 02 May 2012 16:01:18 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tuesday Tip]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=914</guid>
		<description><![CDATA[A piece of supposedly well-written multi-threaded code was giving me a headache the other day. I briefly explore a common(?) pitfall in the use of RAII-driven locking mechanisms.]]></description>
			<content:encoded><![CDATA[<p>A piece of supposedly well-written multi-threaded code was giving me a headache the other day:</p>
<pre><code>struct GpsdWrapper
{
    GpsdWrapper(int gpsFd);
    ~GpsdWrapper();

    void poll_AS();
    void parse_AS();

private:

    static const size_t READ_BUFFER_SIZE = 100*1024;

    char   read_buffer[READ_BUFFER_SIZE];
    size_t buffer_pos;

    int gpsFd;

    boost::mutex  buffer_lock;
    boost::thread poll_thread;
    boost::thread parse_thread;
};

GpsdWrapper::GpsdWrapper(int gpsFd)
    : gpsFd(gpsFd)
    , poll_thread (boost::bind(&amp;GpsdWrapper::poll_AS, this))
    , parse_thread(boost::bind(&amp;GpsdWrapper::parse_AS, this))
{}

GpsdWrapper::~GpsdWrapper()
{
    poll_thread.interrupt();
    parse_thread.interrupt();

    poll_thread.join();
    parse_thread.join();
}

void GpsdWrapper::poll_AS()
{
    // {block signals}

    fd_set rfds;

    while (true) {
        boost::this_thread::interruption_point();

        timeval tv = get_timeout(); // {defined elsewhere}
        FD_ZERO(&amp;rfds);
        FD_SET(gpsFd, &amp;rfds);

        int result = select(gpsFd+1, &amp;rfds, NULL, NULL, &amp;tv);
        if (result &gt; 0) {
            boost::mutex::scoped_lock(buffer_lock);

            if (read_buffer_pos == READ_BUFFER_SIZE) {
                syslog(LOG_WARNING,
                   "GPS read buffer reached maximum size; flushing it");
                read_buffer_pos = 0;
            }

            int r = read(gpsFd, read_buffer + read_buffer_pos,
                 READ_BUFFER_SIZE - read_buffer_pos);
            if (r &gt; 0) {
                read_buffer_pos += r;
            }
            else if (r == -1) {
                syslog(LOG_NOTICE, "Read failed");
                // {disconnect}
                continue;
            }
            else if (r == 0) {
                syslog(LOG_NOTICE, "Remote client closed connection");
                // {disconnect}
                continue;
            }
        }
    }
}

void GpsdWrapper::parse_AS()
{
    // {block signals}

    while (true) {
        boost::this_thread::interruption_point();

        bool buffer_is_full;
        std::string buffer_copy;

        {
            boost::mutex::scoped_lock(buffer_lock);

            buffer_is_full = (read_buffer_pos == READ_BUFFER_SIZE);
            buffer_copy.assign(read_buffer, read_buffer_pos);
            read_buffer_pos = 0;
        }

        // {pass buffer_copy to a parser implementation}

        if (!buffer_is_full)
            usleep(300000);
    }
}
</code></pre>
<p>The idea here is that an instance of <code>GpsdWrapper</code> sits around in the calling scope, spawning two threads of its own to tick over eating/buffering data from a serial device and dispatching it to some parser, respectively. The parser has its own thread as we certainly don&#039;t want serial reads being delayed by any bottlenecks in the parsing process, and we can flush the shared buffer if such a bottleneck begins to cause a backlog of unparsed data, without causing problems on the source end.</p>
<p>Thread safety is allegedly guaranteed by constructing the scope-bound <code>boost::mutex::scoped_lock</code> objects, and all the buffer maths check out. But I was still seeing data dropping in the serial read at seemingly random intervals, implying a problem with the cursor <code>read_buffer_pos</code>.</p>
<p>It took a few hours of paid yet wasted office time to spot that my <code>scoped_lock</code>s were in fact not scope-bound at all, because I forgot to give them names:</p>
<pre><code>boost::mutex::scoped_lock(buffer_lock);
// ^ temporary object of type `scoped_lock`, lives only for the line

boost::mutex::scoped_lock l(buffer_lock);
// ^ named object with automatic storage and scope-bound lifetime
</code></pre>
<p>This silly little typo that I&#039;d made identically in each case, went completely undetected and essentially meant that there would be <em>no</em> thread-safety in the entire mechanism.</p>
<p>Problem randomly found after a revitalising coffee break, I then set about trying to conjure up a way for the build process to catch mistakes like this in the future. But what would they be? GCC doesn&#039;t (and cannot be configured to) emit any warnings about this code because, in the general case, there&#039;s <em>nothing wrong</em> with a temporary object that is not assigned to anything and that thus dies straight away.</p>
<p>Indeed, even in the threading world you may use a lock as a waiting &#034;gate&#034; that can be safely released as soon as the gate has been passed. As it turns out, using block scope purely for the purpose of using block scope is more rare than common. Since we can&#039;t expect a toolchain to read our minds, it doesn&#039;t seem likely that we&#039;ll ever get an automated mechanism for identifying this possible error.</p>
<p>I guess the moral of the story is to remember <em>this</em> story when using <code>scoped_lock</code>s.</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/05/when-is-a-scoped-lock-not-a-scoped-lock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blood &amp; Chrome Demoted, Sci-Fi Still Doomed</title>
		<link>http://kera.name/articles/2012/04/blood-chrome-demoted-sci-fi-still-doomed/</link>
		<comments>http://kera.name/articles/2012/04/blood-chrome-demoted-sci-fi-still-doomed/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 11:25:54 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[TV]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=906</guid>
		<description><![CDATA[<object id="sbPlayer" width="400" height="300" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://comingsoon.springboardplatform.com/mediaplayer/springboard/video/cs006/71/460297/"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="transparent"></param><embed src="http://comingsoon.springboardplatform.com/mediaplayer/springboard/video/cs006/71/460297/" width="400" height="300" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent"></embed></object>

Somehow I&#039;d missed <a href="http://www.gizmodo.com.au/2012/03/stunning-battlestar-galactica-blood-and-chrome-trailer-leaks-tv-show-canned/comment-page-1/#comment-268369">this unofficial teaser trailer for the BSG prequel &#034;Blood &#38; Chrome&#034;</a>. It looks fantastic in most places (with slightly dodgy CGI sets in only a handful), although there&#039;s no way to gauge the quality of the plot, acting or writing at this stage.

<a href="http://kera.name/articles/2012/04/blood-chrome-demoted-sci-fi-still-doomed/" class="more-link">Read more on Blood &#038; Chrome Demoted, Sci-Fi Still Doomed&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p><object id="sbPlayer" width="400" height="300" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://comingsoon.springboardplatform.com/mediaplayer/springboard/video/cs006/71/460297/"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="transparent"></param><embed src="http://comingsoon.springboardplatform.com/mediaplayer/springboard/video/cs006/71/460297/" width="400" height="300" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent"></embed></object></p>
<p>Somehow I&#039;d missed <a href="http://www.gizmodo.com.au/2012/03/stunning-battlestar-galactica-blood-and-chrome-trailer-leaks-tv-show-canned/comment-page-1/#comment-268369">this unofficial teaser trailer for the BSG prequel &#034;Blood &amp; Chrome&#034;</a>. It looks fantastic in most places (with slightly dodgy CGI sets in only a handful), although there&#039;s no way to gauge the quality of the plot, acting or writing at this stage.</p>
<p>The bad news, though, is that SyFy &mdash; who had upgraded the project from a 10-part webseries &mdash; has given up on it as a regular series and downgraded it back to its original format. I never saw the point in these 10-minute-per-episode &#034;webisode&#034; series, so this is incredibly disappointing.</p>
<p>However, it&#039;s hardly a surprise.</p>
<p>Sci-fi television has taken a complete battering on US TV over the last half-decade or so, with a myriad of high-quality shows &mdash; some bordering on <em>staggeringly epic</em> &mdash; left to rot in the annals of history because of &#034;the way things are&#034;.</p>
<p>The way things are? How are things?</p>
<p>Things are that even if Joe &#034;Sci-fi Fan&#034; Bloggs watched his favourite shows religiously on his telly instead of downloading them online &mdash; often cited as a key factor in the lack of sci-fi TV success &mdash; it wouldn&#039;t make the blindest bit of difference&#8230; unless he&#039;s one of the 0.02% of US viewers with a Nielsen box.</p>
<p>The entire ratings system is a complete sham, yet it drives advertising and consequently series success. Which is&#8230; frustrating. Firefly &amp; SGU in particular were <em>staggeringly amazing</em>, but this is not represented in these meaningless &#034;viewing figures&#034;, so they get cut off. The network then develops the notion that Sci-Fi, which is expensive to produce, isn&#039;t going to make them any money in return (which, due to ratings driving advertising, is true) .. and suddenly <em>nothing</em> gets a decent run. Enterprise, Caprica, SG-1/SGA movies, now B&amp;C not given the ground to grow and succeed because if the epic shows can&#039;t make it, then what chance do these good/potential shows have?</p>
<p>What we need is to take the Nielsen boxes away from the morons who watch &#034;American Idol&#034; and give them to people who watch actual TV. It&#039;s the only way. Otherwise the rest of us are simply doomed, with no chance of coming back from this TV abyss that intelligent or artistic people have fallen into. It breaks my heart but there it is.</p>
<p>When I win £140million in the EuroMillions I&#039;ll fund SGU and B&amp;C myself. Must be able to get a couple of episodes out of that, right&#8230;?</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/04/blood-chrome-demoted-sci-fi-still-doomed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I Broke Up With Stack Overflow</title>
		<link>http://kera.name/articles/2012/03/why-i-broke-up-with-stack-overflow/</link>
		<comments>http://kera.name/articles/2012/03/why-i-broke-up-with-stack-overflow/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 15:24:37 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Stack Overflow]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=890</guid>
		<description><![CDATA[I've pretty much made a home of <em>Stack Overflow</em> &#8212; the modern age's answer to Experts Exchange &#8212; over the last year and a bit. From arriving in January 2011, I swiftly began answering C++, PHP and jQuery questions and asked a few of my own.]]></description>
			<content:encoded><![CDATA[<p><img src="http://kera.name/articles/wp-content/uploads/2012/03/stackoverflow-logo.png" alt="" title="stackoverflow-logo" width="250" height="70" class="alignnone size-full wp-image-892" /></p>
<p>I&#039;ve pretty much made a home of <em>Stack Overflow</em> &mdash; the modern age&#039;s answer to Experts Exchange &mdash; over the last year and a bit. From arriving in January 2011, I swiftly began answering C++, PHP and jQuery questions and asked a few of my own. By yesterday, I&#039;d accrued 53,733 reputation points, 6 gold badges, 62 silver badges and 132 bronze badges over 2,045 answers and around 30 of my own [all but one high-rated] questions. I consistently fell within the top 0.1% of users over a quarter by reputation points. I&#039;d made hundreds of gnomish edits across the <code>c++</code>, <code>php</code> and <code>jquery</code> tags and posted more than a few fleeting bug reports and discussion threads on <em>Meta Stack Overflow</em>.</p>
<h3>Exodus</h3>
<p>Now, I&#039;m not the first: sbi <a href="http://stacksbi.wordpress.com/2011/03/20/sbi-is-leaving/">scaled back his contributions last year</a> due to concern over the site&#039;s direction; Neil Butterworth and Roger Pate both ceased their activity too; other high-profile users whose names I&#039;ve forgotten by now got tired of spending their energy on <em>SO</em> and threw in their hats. Even co-founder and super-admin Jeff Attwood <a href="http://www.codinghorror.com/blog/2012/02/farewell-stack-exchange.html">left the site&#039;s parent company at the start of this month</a> (though that likely <a href="http://wilsonericn.wordpress.com/tag/stackoverflow/">had more to do with time and work constraints</a> than much else).</p>
<p>So why did I do the same thing yesterday?</p>
<p><em>Stack Overflow</em> is, on the surface of it, a great idea. On an saturated internet populated by hundreds of thousands of programmers and coders at all levels, it&#039;s difficult to find a forum of any kind whose signal-to-noise ratio isn&#039;t over the human safety threshold.</p>
<p>What do I mean by noise? I mean the low-quality, repetitive starter &#034;questions&#034; that post a block of poor code strung together from ten minutes reading an unauthoritative tutorial, asking &#034;why doesn&#039;t this work?&#034; No particular debugging effort has taken place, and the user in question would rather just &#034;ask the internet&#034; for &#034;help&#034; than set aside a few months to read a good, peer-reviewed book and properly learn the subject in question.</p>
<p>Here&#039;s where the problem lies; several, actually.</p>
<h3>Problem 1: Laziness</h3>
<p>I was recently witness to a teenager with a brand new tablet PC that needed to be configured get very frustrated when the work needed to configure it properly ended up taking more than a few minutes. Half an hour of software updates over a slow DSL line solved all the problems, but those thirty minutes had evidently been incredibly painful. The teenager had all but given up on the entire project after five minutes and, if it weren&#039;t for the fact that I was already on the job and had the tablet in my own hands, I&#039;m sure it would have been shelved entirely for the day.</p>
<p>The information age seems to have bred laziness and entitlement into the latest generation. Why set aside time to properly learn something, when you&#039;ve been brought up in a world where you can look up &#034;facts&#034; on Wikipedia in seconds? Of course, programming is about far more than just &#034;facts&#034;: in fact, it&#039;s an art. And an art needs to be studied and learned.</p>
<h3>Problem 2: Selfishness</h3>
<p>Certainly everybody is entitled to their opinion, but mine is that there is a time and a place for everything, and if there is to be no place for <em>quality</em>, high-level discourse between mid-level and experienced programmers only for fear of offending the entry-level coders or sending them back to the web&#039;s advert-laden discussion forums, then that&#039;s a shame. This standpoint is still seen as &#034;elitist&#034; by many, but it&#039;s not.</p>
<p><em>Stack Overflow</em> &mdash; for me, at least &mdash; started out as one of these places. After all, we say it&#039;s &#034;not a forum&#034; and that&#039;s not just because of its layout and posting mechanics. Inevitably, a successful programming Q&amp;A gets famous enough to draw in <em>anybody</em> with a programming problem, because it&#039;s pretty much guaranteed that you&#039;ll get your programming problem solved in mere minutes if you post it on Stack Overflow.</p>
<p>But that&#039;s not what the site is. At least it&#039;s not what it used to be, it&#039;s not what I want it to be, and it&#039;s not what I think it should be. It&#039;s explicitly <em>not</em> <code>www.debug-my-code-for-me.com</code>: there&#039;s a question close vote reason called &#034;too localised&#034; for questions that wouldn&#039;t contribute to the site&#039;s archive of programming Q&amp;A, and/or help anybody else at a later date. Dumping a link to a <code>pastebin.com</code> snippet and asking &#034;why doesn&#039;t this work? solve <em>my</em> problem for <em>me</em>&#034; clearly falls under that category.</p>
<p>Too many contributors now, though, are transfixed on the idea that &#034;this site is here to <em>help</em> people&#034; and that, as long as that goal is satisfied, that is enough. They jump on the &#034;elitists&#034; who disagree.</p>
<h3>Problem 3: Expediency</h3>
<p>But &#034;help&#034; is a very broad word. It&#039;s one thing to help somebody to learn and become a better programmer, and to learn something about a programming language; it&#039;s quite another to throw the code at them that fixes their problem, allowing them to skip &mdash; and <em>never gain experience in</em> &mdash; the critical steps of research and debugging. The IT industry needs more developers who know how to fend for themselves, who know how to use a debugger and who know how to apply their own critical thinking skills to solve a problem. These &#034;helpers&#034; are only doing the industry a disservice by encouraging this new lazy generation not to think any further than &#034;I&#039;ll just tell Stack Overflow&#034; when their 200-line program yields a segmentation fault.</p>
<h3>My reaction</h3>
<p>Ultimately, this is all just my opinion. I believe it staunchly and wholeheartedly, but it&#039;s just my opinion. It&#039;s one that seems to be shared by fewer and fewer of the contributors left on the site. It should be obvious that those spending the most  time on the site would feel the most strongly about how their time is being used, and what the worth of the result really is. On a <em>Stack Overflow</em> that&#039;s flowing quickly away from the site that I believe it should be, I&#039;ve been becoming more and more disillusioned about the hours that I spend adding to its value every day.</p>
<p>But, as a slightly obsessive Senior Software Developer, it&#039;s difficult to just leave a site. Since the start of <em>last year</em> it&#039;s been a core part of my daily routine; even after removing a button for it from my browser toolbar I&#039;m still finding myself trying to click on it every ten minutes or so.</p>
<p>And, yes, the draw of gaining reputation &mdash; literally and figuratively &mdash; and in showing off technical accumen, as well as building up a portfolio of thousands of well-written technical explanations that might one day be shown to someone as some kind of proof of knowledge, cannot be ignored.</p>
<p>Consequently, I&#039;d held on for a few extra months. But, having recently enjoyed a drawn-out debate with several people on the subject &mdash; including some over-zealous moderators &mdash; I&#039;ve decided that it&#039;s just not worth it any more. It&#039;s a thankless job answering all those programming questions, and it&#039;s more thankless still having to try to explain myself every time I lightly berate a poster for not performing the most basic of critical thinking before posting (and such comments are usually upvoted several times before the nay-sayers step in).</p>
<p>So, I&#039;m stepping out. I&#039;d thought about deleting my account entirely but, as a natural hoarder, I couldn&#039;t bring myself to lose all that hard work. And who knows? Perhaps in a few months I&#039;ll give in and return to submit to more abuse for a few months, just for that occasional fleeting glimmer of glee at knowing that I&#039;ve posted a top-quality explanation of some arcane technical limitation in one of the programming languages with which I am quite familiar. But, for the time being at least, I simply can&#039;t allow it all to get to me any more.</p>
<p>And if I have to re-configure my firewall to implement my choice not to do it any more (I do), then that&#039;s just how it is.</p>
<h3>Bootnote</h3>
<p>And, yes, I&#039;m sure it&#039;s deliberately ironic that I made my blog typography imitate SO&#039;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/03/why-i-broke-up-with-stack-overflow/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Here&#039;s Another One</title>
		<link>http://kera.name/articles/2012/01/heres-another-one/</link>
		<comments>http://kera.name/articles/2012/01/heres-another-one/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 14:17:56 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Stack Overflow]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=887</guid>
		<description><![CDATA[<a href="http://kera.name/articles/wp-content/uploads/2012/01/anothershitone.png"><img src="http://kera.name/articles/wp-content/uploads/2012/01/anothershitone-300x298.png" alt="" title="anothershitone" width="300" height="298" class="alignnone size-medium wp-image-888" /></a>

And <a href="http://stackoverflow.com/questions/8851863/change-c-to-php">another bollocks post</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://kera.name/articles/wp-content/uploads/2012/01/anothershitone.png"><img src="http://kera.name/articles/wp-content/uploads/2012/01/anothershitone-300x298.png" alt="" title="anothershitone" width="300" height="298" class="alignnone size-medium wp-image-888" /></a></p>
<p>And <a href="http://stackoverflow.com/questions/8851863/change-c-to-php">another bollocks post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/01/heres-another-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Worst Stack Overflow &quot;Question&quot; Ever</title>
		<link>http://kera.name/articles/2012/01/the-worst-stack-overflow-question-ever/</link>
		<comments>http://kera.name/articles/2012/01/the-worst-stack-overflow-question-ever/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 12:20:25 +0000</pubDate>
		<dc:creator>Tomalak Geret'kal</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Stack Overflow]]></category>

		<guid isPermaLink="false">http://kera.name/articles/?p=879</guid>
		<description><![CDATA[<a href="http://kera.name/articles/wp-content/uploads/2012/01/worstquestionever.png"><img src="http://kera.name/articles/wp-content/uploads/2012/01/worstquestionever-300x250.png" alt="the worst Stack Overflow question ever" /></a>

I don&#039;t think I&#039;ll be answering <a href="http://stackoverflow.com/questions/8850434/hello-i-have-a-big-thing-to-deal-with-on-my-website">this one</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://kera.name/articles/wp-content/uploads/2012/01/worstquestionever.png"><img src="http://kera.name/articles/wp-content/uploads/2012/01/worstquestionever-300x250.png" alt="the worst Stack Overflow question ever" /></a></p>
<p>I don&#039;t think I&#039;ll be answering <a href="http://stackoverflow.com/questions/8850434/hello-i-have-a-big-thing-to-deal-with-on-my-website">this one</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kera.name/articles/2012/01/the-worst-stack-overflow-question-ever/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

