<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[AlBlue&rsquo;s Blog]]></title>
  <link href="http://alblue.bandlem.com/atom.xml" rel="self"/>
  <link href="http://alblue.bandlem.com/"/>
  <updated>2012-04-20T11:39:08+01:00</updated>
  <id>http://alblue.bandlem.com/</id>
  <author>
    <name><![CDATA[Alex Blewitt]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[My first published article]]></title>
    <link href="http://alblue.bandlem.com/2012/04/first-published-article.html"/>
    <updated>2012-04-19T09:00:00+01:00</updated>
    <id>http://alblue.bandlem.com/2012/04/first-published-article</id>
    <content type="html"><![CDATA[<p>With the recent passing of Jack Tramiel, founder of Commodore Business Machines,
I was encouraged to do some digital archeology on my first published article
as part of <a href="http://www.infoq.com/news/2012/04/Jack-Tramiel">InfoQ&#8217;s obituary of Jack Tramiel</a>.</p>

<p>Although my first computer was a Sinclair ZX81, and had access to a Vic-20
and a Commodore PET at school, my first <em>real</em> computer was a Commodore 64.
Well, that&#8217;s not quite true; the computer was a
<a href="http://en.wikipedia.org/wiki/Commodore_128">Commodore 128D</a>,
a souped-up version which had a built-in disk drive but remained compatible
with all the Commodore 64 games. (In fact, I can&#8217;t recall a single app,
other than perhaps the demo disks, that I ever used in Commodore 128 mode;
I probably booted the GEOS operating system with its Zilog-Z80 about as many
times, mostly for novelty purposes.)</p>

<p>Several of my friends had Commodore 64s as well (Hi Snotty and Wilkindot!)
which meant that they quickly became the lingua franca for computing and
game exchange. Probably one of the key reasons for its success was the fact
that games came on
<a href="http://en.wikipedia.org/wiki/Compact_Cassette">cassette tapes</a>,
which meant there was a very cheap source of blank material to record your own
game state and programs on, and thanks to the
<a href="http://en.wikipedia.org/wiki/Compact_Cassette#Home_dubbing">dubbing players</a>
meant pirated games were frequently traded in the playground.</p>

<p>(Interesting side-note; my first purchased game was
&#8221;<a href="http://en.wikipedia.org/wiki/Action_Biker">Action Biker</a>&#8221; &#8211; there&#8217;s even a <a href="http://www.youtube.com/watch?v=W5ZSF6A2HZ0">video on YouTube</a>, which I purchased from a computer shop in
<a href="http://en.wikipedia.org/wiki/Milton_Keynes_Shopping_Centre">Milton Keynes shopping centre</a>
around 1985; twenty years later I moved here and have been here ever since.)</p>

<p>At the time, there were many write-your-own computer games books (sometimes
based on the
<a href="http://en.wikipedia.org/wiki/Choose_Your_Own_Adventure">choose your own adventure</a> series)
and computer-specific magazines were frequently published with &#8216;type your own
code&#8217; listings. One of the first to have computer programmes shipped in binary
form was
<a href="http://en.wikipedia.org/wiki/Commodore_Disk_User">Commodore Disk User</a>
which shipped a <em>floppy</em> floppy disk (5.4 inch) on the front cover, usually
with a piece of tape over the read notch to prevent accidental overwriting.</p>

<p>Anyway, back to the point of this post; back in 1991, I wrote an article
for Commodore Disk User on the subject of interrupt request handling. Back
in those days, BASIC was single threaded, so you could only do one thing at
a time; yet games frequently played sounds, interacted with the keyboard
(or joystick) and performed these fluently. One way of doing this was to
hook up with the interrupt processor on the 6510, which was triggered when
a keypress was made. (These days, they&#8217;re akin to the INT80 request on a PC
or syscalls on a Unix box.) This was how the processor picked up the
interaction that a user was doing and ran the system calls to handle the
requests; by putting your own code and remapping the interrupt, you could
drive your own actions.</p>

<p>At the time, I was a spotty (and yes, overweight; still am) teenager but
with the recent upswing in interest regarding Jack&#8217;s obiturary, I did a search
and discovered to my delight that Archive.org has scanned copies of these
magazines. There&#8217;s a full list at
<a href="http://archive.org/details/commodore-diskuser">Commodore Disk User archives at Archive.org</a>,
and my article is published in <a href="http://archive.org/details/commodore-diskuser-28">Issue 28 of Commodore Disk User</a>.
Heck, now you can even get a
<a href="http://appshopper.com/games/c64">C=64 emulator</a>
for your mobile phone:</p>

<p><img src="http://alblue.bandlem.com/2012/04/C64Emulator.png" title="Commodore 64 Emulator on iTunes" ></p>

<p>For posterity, I&#8217;ve made my article available as a PDF, entitled
<a rel="nofollow" href="http://alblue.bandlem.com/2012/04/CDU-28-InterruptRequests.pdf">Explaining Interrupt Requests</a>, though here are some low-res images:</p>

<p><img src="http://alblue.bandlem.com/2012/04/CDU-28-Page-1.jpg" title="Magazine Cover" >
<img src="http://alblue.bandlem.com/2012/04/CDU-28-Page-3.jpg" title="Contents Page" >
<img src="http://alblue.bandlem.com/2012/04/CDU-28-Page-21.jpg" title="Article Page 21" >
<img src="http://alblue.bandlem.com/2012/04/CDU-28-Page-22.jpg" title="Article Page 22" >
<img src="http://alblue.bandlem.com/2012/04/CDU-28-Page-23.jpg" title="Article Page 23" >
<img src="http://alblue.bandlem.com/2012/04/CDU-28-Page-24.jpg" title="Article Page 24" ></p>

<p>I&#8217;ve always had a colloquial style when writing, and it seems my foray into
it started as I ended up going on. I particularly like my sign-off &#8220;I hope you
have been able to understand what I have been blithering on about&#8221;. Though
I also hope that the double exclaimation mark at the end of the article was a
typo. That&#8217;s my story, and I&#8217;m sticking to it!!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Why OSGi qualifiers aren't working]]></title>
    <link href="http://alblue.bandlem.com/2012/04/osgi-qualifiers.html"/>
    <updated>2012-04-11T09:00:00+01:00</updated>
    <id>http://alblue.bandlem.com/2012/04/osgi-qualifiers</id>
    <content type="html"><![CDATA[<p>In my
<a href="http://alblue.bandlem.com/2012/03/human-tooling.html">previous post</a>,
I argued that the decision not to support SNAPSHOT ranges in OSGi was
a missed opportunity for the platform, perhaps one that will limit its adoption
in the future. Despite several vocal critics (largely arguing from a point of
not having used Maven and its SNAPSHOT versioning scheme), I decided to see how
much of a problem it really was.</p>

<p>The arguments of &#8216;Maybe this would cause problems&#8217; don&#8217;t really seem to be
borne out by the Maven repository, which has over 400G of versioned artefacts
that have gone through the -SNAPSHOT process during development and rarely, if
ever, has any problems in versioned code. (That&#8217;s not to say mistake can never
happen; but it&#8217;s easy enough to publish a new asset with a new patch version if
required, as has been done occasionally before such as the javax.jms releases.)</p>

<p>The problem with the existence of the OSGi build qualifier is that it means
Eclipse developers don&#8217;t actually take care to version code properly. Instead,
the build process just spits out recompiled bundles, often without a
corresponding bump in version number where required or needed.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Using Humans to solve a Tooling problem]]></title>
    <link href="http://alblue.bandlem.com/2012/03/human-tooling.html"/>
    <updated>2012-04-04T07:00:00+01:00</updated>
    <id>http://alblue.bandlem.com/2012/03/human-tooling</id>
    <content type="html"><![CDATA[<p>I&#8217;ve just written up a piece at InfoQ on how
<a href="http://www.infoq.com/news/2012/04/osgi-snapshot">OSGi have abandoned -SNAPSHOT versions</a>,
and I thought I&#8217;d take a minute to explain what I meant by the &#8216;human tooling&#8217;
problem.</p>

<p>The issue is whether or not SNAPSHOTs shold be built in a &#8216;lower&#8217; numerical
namespace using <code>1.2.3-456</code> which sorts less than <code>1.2.3</code>. By encouraging
a difference between &#8216;unreleased&#8217; and &#8216;released&#8217; versions, it becomes clear
whether there are changes which are important, and allows developers to report
bugs against a specific version (instead of just &#8216;the latest version&#8217;).</p>

<p>According to both the <a href="http://semver.org/">Semantic Versioning</a>
and the
<a href="http://wiki.eclipse.org/Version_Numbering">Eclipse Version Numbering</a>
rules, the patch number (third segment) should be changed whenever there is
a difference between build artefacts. As I&#8217;ve listed on the InfoQ article,
that plainly doesn&#8217;t happen in some cases:</p>

<ul>
<li>org.eclipse.cdt.codan.checkers.ui_1.0.0.201109151620.jar</li>
<li>org.eclipse.cdt.codan.checkers.ui_1.0.0.201202111925.jar</li>
<li>org.eclipse.core.filebuffers_3.5.200.v20110505-0800.jar</li>
<li>org.eclipse.core.filebuffers_3.5.200.v20110928-1504.jar</li>
<li>org.eclipse.core.variables_3.2.500.v20110511.jar</li>
<li>org.eclipse.core.variables_3.2.500.v20110928-1503.jar</li>
<li>org.eclipse.emf.ecore_2.7.0.v20110912-0920.jar</li>
<li>org.eclipse.emf.ecore_2.7.0.v20120127-1122.jar</li>
<li>org.eclipse.equinox.frameworkadmin.equinox_1.0.300.v20110506.jar</li>
<li>org.eclipse.equinox.frameworkadmin.equinox_1.0.300.v20110815-1438.jar</li>
<li>org.eclipse.equinox.p2.updatesite_1.0.300.v20110510.jar</li>
<li>org.eclipse.equinox.p2.updatesite_1.0.300.v20110815-1419.jar</li>
<li>org.eclipse.jdt.compiler.tool_1.0.100.v_B76_R37x.jar</li>
<li>org.eclipse.jdt.compiler.tool_1.0.100.v_B79_R37x.jar</li>
<li>org.eclipse.jface_3.7.0.I20110522-1430.jar</li>
<li>org.eclipse.jface_3.7.0.v20110928-1505.jar</li>
<li>org.eclipse.ltk.core.refactoring_3.5.201.r371_v20110824-0800.jar</li>
<li>org.eclipse.ltk.core.refactoring_3.5.201.r372_v20111101-0700.jar</li>
<li>org.eclipse.pde.runtime_3.4.201.v20110819-0851.jar</li>
<li>org.eclipse.pde.runtime_3.4.201.v20110928-1516.jar</li>
<li>org.eclipse.ui_3.7.0.I20110602-0100.jar</li>
<li>org.eclipse.ui_3.7.0.v20110928-1505.jar</li>
</ul>


<p>The point of showing the cross-section of the above is not to highlight
specific projects, but to show this is a widespread problem that goes
across all projects. The problem is, there is no &#8216;penalty&#8217; for leaving a
<code>1.2.3.qualifier</code> as the Manifest entry and just spinning out builds with
new build qualifiers in place.</p>

<p>The key advantage of having a different version numbering format between
release versions and pre-release versions is to ensure that at release, the
version number is updated appropriately. This means that the development
process generally follows:</p>

<ul>
<li>Create 1.0.0-SNAPSHOT for development</li>
<li>Do work</li>
<li>Release 1.0.0</li>
<li>Update version to 1.0.1-SNAPSHOT</li>
<li>Do work</li>
<li>Release 1.0.1 or 1.1.0 (or 2.0.0) as appropriate</li>
<li>goto 10</li>
</ul>


<p>The decision as to what to call the next number can either be tracked
by updates to the -SNAPSHOT itself (e.g. moving to 1.1.0-SNAPSHOT) or
can be deferred to later in the process. There&#8217;s even tooling to help
you do that (the
<a href="http://maven.apache.org/plugins/maven-release-plugin/">mvn release plugin</a>) &#8211; though this just removes the -SNAPSHOTS for you rather than
doing any semantic analysis.</p>

<p>This pattern is so common that it&#8217;s even codified as a bullet point in
the Semantic Versioning specification:</p>

<blockquote><p>A pre-release version MAY be denoted by appending a dash and a series of dot
separated identifiers immediately following the patch version. Identifiers
MUST be comprised of only ASCII alphanumerics and dash [0-9A-Za-z-].
Pre-release versions satisfy but have a lower precedence than the associated
normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7,
1.0.0-x.7.z.92.</p></blockquote>

<p>The &#8216;pre-release versions satisfy but have a lower precedence than&#8217; sums
up the rule in a nutshell: in other words, anywhere a 1.2.3 is valid then
all 1.2.3-<em> are valid as well; anywhere a 1.2.3 is not valid then
all 1.2.3-</em> are not valid. So, in a range like <code>[1.2.3,4.5.6)</code> then any
pre-release state of 1.2.3-<em> is included, but any pre-release state of
4.5.6-</em> is not included.</p>

<p>This was even implemented successfully in Equinox, with an implementation
in <a href="http://download.eclipse.org/eclipse/downloads/drops4/S-4.2M6-201203151300/eclipse-news-M6.html#Equinox">3.8M6</a>.</p>

<p>Unfortunately, the concerns listed by the CPEG were out of touch with how
developers work outside of the OSGi space, and instead of reaching out
with a mechanism which would have been compatible for released artifacts
(whilst providing a SNAPSHOT style build system that would not be loadable
on older OSGi runtimes) it has been removed from the specification. Given that
OSGi R5 is a major release of the runtime, this would have been the ideal
time for introducing a new version syntax, and one that would have been
quickly adopted elsewhere.</p>

<p>So instead of having &#8216;memorable&#8217; artifact names like <code>org.eclipse.ui_3.7.0.jar</code>
we&#8217;ll be stuck with unmemorable names like
<code>org.eclipse.ui_3.7.0.v20110928-1505.jar</code> for the forseeable future in
the OSGi world. This causes more cognitive work for humans (trying to
remember the name) whilst introducing more opportunity for mistakes (by
releasing the same major/minor/patch with different builds).</p>

<p>This is what I refer to as humans solving the tooling problem, rather than
the other way around.</p>
]]></content>
  </entry>
  
</feed>

