CodePlex is dead; long live my repositories

I own 2 fairly large projects on CodePlex but having just heard the news that CodePlex is shutting down, I’ve moved them all over to GitHub.

I was planning on keeping all my Windows-based projects on CodePlex and everything else in my GitHub repositories. But I will now hoard everything into one place. The project with the biggest following is…

Exception Reporter

Exception Reporter is a .NET component (a dialog basically) that you use to show to the end-user when an unexpected exception throws up.

The component gathers information on the exception you give it (eg stack trace/message) and also fetches system information from Windows (memory usage/cpu etc) – all resulting in a formatted email to the developer for diagnosis.

There were about 95 followers on this project at CodePlex so it’s a little sad to see it start from scratch. It’s also published as a NuGet package.

I had some help from Simon Cropp on this one – and I accidentally replaced his commits with my email address when I tried to clean up the conversion from CodePlex to GitHub repository – sorry about that.

I haven’t worked on this project much lately and there’s also a WPF version in development in there – but it needs a lot more work before it’s ready.

Since I started using a Mac at home this isn’t easy to find time for (WPF doesn’t work on Mono). Join in if you’re a software engineer!

The other project is…

Cradiator

Cradiator is a WPF app – and designed to fill a monitor that’s on display somewhere in a dev room. It basically monitors a build server (eg CruiseControl or TeamCity) and shows all the projects being built and their current status.

We’ve added a bunch of ways to configure it for great team fun – including showing an image of the build breaker.

It uses Speech Synthesis support on Windows to make announcements eg it can announce a build breakage by saying “Bob, you broke the Production build, please leave the building immediately!”

This was really fun to work on and involved a challenge from a friend about avoiding the use of private methods. So there a lots of small classes and I think it has a fairly decent, accessible design.

It all started from a much simpler project called Big Visible Cruise. I took that code and ran with it and added a lot of features over time with ideas that our dev team had.

I had some help from Ruben Willems on this one too. These open source projects are rarely the work of one person.

One thing I wanted to announce to those who previously followed my Cradiator repo on GitHub… I deleted the original Cradiator GitHub repo, and moved it to CodePlex (as it fell into my Windows-on-CodePlex plan). So now I’ve had to move it back. But by deleting it, I’ve lost the 15 or so original followers. Who by now will be confused.

rubyann – for people too lazy to write Ruby

At last, I’ve written my own jQuery plugin.

My plugin tries to help lazy people (a noble cause) to write Ruby. It’s called rubyann which is short for ruby annotation.

But you have to understand something about Ruby… hardly anyone knows about it – it’s quite obscure.

Ruby is part of XHTML 1.1 – and now part of HTML 5. Ruby characters are small reading aids that are placed on top of characters. They can be useful for any language, but my interest comes from Japanese furigana – here’s what Ruby looks like:

The 1st example uses Ruby to explain a translation and the 2nd uses furigana
ruby example
And yes, that really is a translation – the word “kill” is not needed to say “kill 2 birds with 1 stone” – it’s obvious!

 

To get this seemingly simple annotation you must type XML into your HTML:


<ruby>

<rp>(</rp>
<rt>1</rt>
<rp>)</rp>
</ruby>

And that’s just for the 1st character! Multiply that XML by the number of ruby characters you want… and you’d better have an automated HTML ruby generator or rubyann

rubyann inserts the required ruby XML where it finds markup (I invented), so this:

With rubyann eg: $('.textWithFurigana').rubyann(); becomes this: I’ve written the jQuery plugin in coffeescript and it’s on GitHub – rubyann

Here’s what it looks like in my editor, RubyMine, with the coffeescript plugin

All Your Plural Are Useless

There is an ongoing debate about plurals in the database community – like in this StackOverflow question:  Table Naming Dilemma – Singular vs Plural And Ruby on Rails users struggle with and sometimes override the obligatory pluralization convention.

But I’m here to tell you that everything good said about plurals is wrong. This is an aside, but it may feed into the debate.Plurals Are UselessPlurals never, in any realistic sentence, provide any additional information.

If you were to eliminate plurals from all of your sentences, no information would be lost – although the sentence may sound daft. But it would only sound daft through lack of familiarity – not because of any meaning lost.

Take this example:

I own 3 cat. I only have 5 dollar.

Exactly what information does the s add when we fix it?

I own 3 cats. I only have 5 dollars.

Nothing. You already know there’s more than one cat, because the number is specified. The plural is redundant.

I own many cats. I saw lots of elephants.

As long as there is a word describing the plurality already, such as many, lots – you don’t need an s to knock you over the head with it. We already know there’s more-than-one (or not) before we read the s.

Those women were talking about you.

Those girl were talking about you.

The second sounds awkward, but if it were spoken by a non-native speaker, it would be easy to understand. Why is that?

Notice I didn’t use the word woman here (for the singular of women). This would make it so awkward as to be almost incomprehensible. But that is because plurals are not only useless, but also hideously inconsistent. If it were just a matter of adding s, they would just be harmlessly useless.

The only sentence I can think of that comes close to having a plural add information is this:

I went to the park today and saw squirrels.

Squirraloo

But that sentence is not realistic.

Realistically, it would quantify how many squirrels were seen. Some; heaps; a few; 3 big ones. And as soon as that happens, the s in squirrels immediately becomes…

Did you ever wonder why other languages, such as Japanese, don’t use plurals?

Plurals
Are
Useless

In the squirrel example, it is also obvious through context, that plurality is implied or trivial enough to be irrelevant. Take the s away, and you’ve not lost any meaning.

To see some of the many exceptions for plurals: Fun With Plurals

Some plurals are the same as the singular (eg fish, moose). And some plurals have no singular (eg scissors, cattle). These plurals cannot possibly provide any information – or by confusing the plural, they even detract from any attempt to create meaning. Plurals are a language oddity.

If you know of a useful sentence where the plural adds information that wouldn’t otherwise be known. Let’s have it.

What about the developer singular vs plural debate?

ActiveRecord use plurality to make your code read like an English sentence. Maybe the number of exceptions is low enough to get away with this. But since many plural exceptions are animals (geese, cattle, fish, moose, deer, sheep) – my plans for a web app game featuring a moose that can fish, and 3 sheep that trade with local deer – is looking like a lot of work.

Some plurals are also up for debate and this Ruby on Rails bug report on the plural of penis has been closed wontfix. It’s labelled as an enhancement, probably just to make it a penis enhancement, with a comment: “You guys should probably investigate a plugin to handle this

All this suggests to me that in the programming world of precision, an unreliable language-oddity like English plurals should not be relied on to convey any meaning – if possible.

Running CoffeeScript In-Browser

One of the ways to run CoffeeScript (other than processing on the server or using the command line to pre-compile) is to run CoffeeScripts, directly, in-browser.

This simply means that you can write coffeescript inside the HTML document. It has the disadvantage of being near impossible to debug as the running code will be encased in a very large javascript eval statement.

Running CoffeeScript in-browser is therefore not encouraged by the Author of CoffeeScript (jashkenas) – to the extent that he preferred not to include my submission (or pull-request as it is known on GitHub) to improve the documentation for it. This may be reasonable, however I would like to put the documentation here.

To run your coffeescript inline:

  1. Tag your coffeescript with the type “text/coffeescript”
  2. Include coffee-script.js after all coffeescript on the page (this is the compiler that will evaluate and compile all coffeescript in order)
  • The text contents of remote scripts (those referenced via src=””) cannot be accessed from the browser unless they are hosted on the same domain, and are capable of being accessed via an XMLHTTPRequest (which is how the compiler loads it)

And the main improvement to the documentation I wanted to make, an example:

<html>
<head>
<title>In-Browser testtitle>
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&#8221;> script>
<script type=”text/coffeescript”>
$
-> $(#header).css background-color, green
script>
<script type=”text/javascript” src=”http://github.com/jashkenas/coffee-script/raw/master/extras/coffee-script.js&#8221;> script>
head>
<body>
<h1 id=”header” style=”color:white”>CoffeeScript is alive!h1>
body>
html>

And the corresponding output: