#JianInLdnOnt

Come on Jian! Come on Jian! Poor Jianny G Sounds sad upon the radio ‘Cause he isn’t in Londontario Let your Frü flag fly Come along, who’d blame ya? Q‘s own, homegrown Now I must say more than ever (come on Jian!) A-E-O-L-I-A-N oh yeah This is it, just what you’re after Come on Jian, oh I swear when you’re on It’s a moment unlike anything With you at that mic, oh my thoughts, if you like Verge on dirty, ah come on Jian Come on Jian! Some people out there Think we’re boring, staid and unengaged So resigned to what our fate is But not us (no never), no not us (no never) We are far too young and clever Remember A-E-O-L-I-A-N oh yeah We’ll sing this song forever Come on Jian, oh you know something’s wrong Hit the road, man, we’ll do anything Don’t be depressed, oh Jian tell us yes Ah come on now, ah come on Jian, please Come on Jian, RedCat will shoot Come on Jian, coffee to boot Windermere’s beds, rtraction’s webs Oh, Jian Music and art, come play a part A forest of trees, and no BBT Now I must say more than ever Bring Q for a change I said A-E-O-L-I-A-N oh yeah Come on Jian, turn the radio on In our city, it means everything It’s our full court press, oh Jian tell us yes Oh come on Q, and come on Jian Come on Jian, oh I swear something’s wrong If your program isn’t visiting This song’s not the best, but we hope you’re impressed Forest City, now come on Jian Please
To the tune of Come On Eileen. (But you knew that already.) With deep, sincere apologies to Dexys Midnight Runners, especially Kevin Rowland, “Big” Jim Paterson, and Billy Adams.

25 Random Things About Me

In response to Pete’s list

  1. I don’t blog as much as I used to. I’d like to say that’s because I have two other writing projects on the go—which I do—but they’re seeing about the same amount of output.
  2. I’m a mild-mannered computer geek by day, and a mild-mannered arts geek by night.
  3. I share a birthday with Al Yankovic, which pleases me greatly.
  4. Despite many years at university and in the software industry I’m not a coffee drinker. Can’t stand the stuff.
  5. I type two spaces after a period. It’s the right thing to do.
  6. I have an odd habit of mentally “typing” words and phrases, counting the number of letters, and subdividing them into groups.
  7. I love to drive.
  8. I was a competitive trivia game player in high school (and even late elementary school). The year our team won the provincial finals there weren’t nationals to go to.
  9. I learned to ride a bicycle on one of Ontario’s 400-series highways. Seriously. (Proof.)
  10. My favourite author? Harlan Ellison, hands down. Favourite (well-known) playwright? Daniel MacIvor.
  11. I played piano for about twelve years and trumpet for a similar period, but it’s been at least that long again since I’ve made a serious attempt to play either instrument.
  12. Black licorice. Not red. Yucch the red.
  13. I don’t own, and have never owned, a cell phone. This is as much due to the usurious telecom charges in Canada as my own natural tendencies.
  14. I can spot even the most innocuous typo at a glance from ten paces.
  15. I’m working on a secret project that incorporates at least four other items on this list. (Mu-ha-ha-ha-haaa….)
  16. I have a Rubik’s Snake wrapped around the left front speaker of my stereo to prevent it from crackling; it’s been there for more than fifteen years.
  17. I have a Mac… which I almost exclusively use through VNC from my GNOME/Fedora desktop.
  18. I once broke a finger when I punched a clown at an amusement park in Prince Edward Island.
  19. I still think analog watches are a pretty neat idea.
  20. I’m told that when I saw Star Wars for the first time, I was creeped out by Threepio and Artoo but not Darth Vader.
  21. I’ve only been on the campus of my alma mater once since I graduated.
  22. I own two inverted world maps.
  23. I find it much easier to promote others than myself.
  24. I’m fascinated by process, often more than by the result.
  25. A large majority of the people who inspire me are women, and I’m fortunate to count many of them as friends.

And a bonus 26th random thing: it’s taken me two full weeks to finish this list.

Twitter packet loss

Massive packet loss between Bell and Twitter has been happening consistently for over a week now, between about 8pm and 1am Eastern. Current stats from mtr:

                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
[...]
 8. 63.147.58.110                     0.0%   136   85.5 110.0  73.3 204.3  30.9
 9. 199.16.159.41                    91.0%   135  537.7 440.4  83.8 2041. 540.1

/cc @twitter @status

Still having exactly the same issue at exactly the same times. status.twitter.com has nothing. It’s either Qwest (the 63.x hop) or Twitter itself (the 199.x hop).

A pattern for WebStart in Maven

Java WebStart and JNLP can be finicky beasts, especially when paired with Maven-generated websites and artifact repositories. Over the last few months I’ve developed POM and JNLP template patterns that I think are useful when used with the webstart-maven-plugin:jnlp goal; the main advantage is that applications can be WebStarted directly from the repository, which means that the version available is always the latest -SNAPSHOT or release.

In the POM I define two variables, site.baseUrl and artifactUrl. site.baseUrl defines the server and root path where all Maven-generated websites are published; it has a prefix because usually I’d only set it once in the corporate POM. artifactUrl is the full URL of the project-specific website.

By default both site.baseUrl and artifactUrl point to the location where -SNAPSHOT sites are published, usually by a CI system. They’re overridden in two profiles: release switches site.baseUrl to the release website (which is applied to artifactUrl, so there’s no need to set it again), and devel sets artifactUrl to the local target directory (and omits site.baseUrl, which ends up unused).

<project>
...
  <properties>
    <site.baseUrl>http://repository/snapshot-site/</site.baseUrl>
    <artifactUrl>${site.baseUrl}/${project.artifactId}</artifactUrl>
  </properties>
...
  <profiles>
    <profile>
      <id>release</id>
      <properties>
        <site.baseUrl>http://repository/release-site/</site.baseUrl>
      </properties>
      <distributionManagement>
        <site>
          <id>release-site</id>
          <url>dav:${artifactUrl}</url>
        </site>
      </distributionManagement>
    </profile>
    <profile>
      <id>devel</id>
      <properties>
        <artifactUrl>file://${project.build.directory}</artifactUrl>
      </properties>
    </profile>
  </profiles>
...
</project>

In the JNLP template, the codebase is set to artifactUrl, which means that the resulting JNLP will retrieve any artifact dependencies from the snapshot, release or local output directories.

<jnlp
  spec="$jnlpspec"
  codebase="${artifactUrl}/jnlp/"
  version="$project.Version"
>
...
</jnlp>

Note that the artifact dependencies still need to be copied into the jnlp directory, which webstart-maven-plugin:jnlp does by default. It would be nice to be able to get them from their canonical locations on the repository, but that’s not easily accomplished.

Kool-Aid, drinking the

At work, I’ve finally had a chance to apply some of the practices I’ve been reading about (and advocating) for months. Foremost among them are the related concepts of test-driven development, (proper) unit testing, dependency injection and the principle of least knowledge (aka the Law of Demeter).

And what do you know: they actually work!

I’ve also wound up doing quite a bit of refactoring—mostly, as someone (maybe Michael Feathers?) put it, of “new legacy” code, stuff that’s been written in the last few months (not by me) which is full of global state and complex un-mockable setup. Most of that has been scattershot/mercenary work to make life easier for myself, rather than a concerted effort to rebuild the foundations without tearing down the walls, but I think I’ve made some incremental improvements that will help in the long run.

Now I just have to get the rest of the source control/build monkeys off my back. A few months ago I’d almost divested myself of one, through no small or short-lived effort, but just when I thought I was out….