Joseph Cooney's Weblog


Mac Mini Upgrade, the Australian Way

I recently decommissioned an old laptop, and salvaged 4GB of laptop ram out of it. Having no other good use to put this to, I wondered if my iTunes isolation mechanism (a very early Mac mini) might be able to be upgraded to Mountain Lion if it had enough ram – it was currently running snow leopard, had a dual-core CPU, all that seemed to be missing was and additional 2GB of RAM, exactly the same kind of RAM I’d just taken out of the decommissioned laptop.

Unfortunately early model mac minis weren’t built to be serviced anywhere outside of factories in china where they were also assembled. Step 1 involved prying open the case with a paint-scraper or similar device. Not having a paint scraper, and not wanting to wait until the effects of whisky wore off, and the realization that I was risking wrecking a good machine for no real gain dawned on me I pressed on with the most similar tool I had to hand – a barbie mate. The brushed aluminium case and the stainless steel sure looked good together.


It worked, after a fashion, and after several other harrowing steps the upgrade was complete. I turned it back on and the machine still worked, but unfortunately the upgrade to mountain lion was prevented by the lack of 64-bit BIOS (I believe – it was never able to boot into 64-bit mode, and I’m going to chalk that up as the cause). Oh well, at least iTunes has a bit more RAM to play with now.

Automerch from your twitter feed

For a while I’ve toyed around with the idea of programatically generating t-shirt ‘designs’ (and I use the word in the loosest possible sense) from one’s twitter feed. The mechanics I had in mind were something like this:

  1. You have a fetish for self-promotion, decide you want a coffee cup or t-shirt with some stuff from your twitter feed on it, and you aren’t too fussy about aesthetics.
  2. You tweet to @tweet2tshirt asking it to pretty please make you a t-shirt design.
  3. @tweet2tshirt tweets you back with a link to this item on cafe press, when it is done.

Which is pretty much how it works.

What do the ‘designs’ look like? I’m glad you asked. The short answer is ‘not very good’, and come in two varieties, incorporating your profile picture, some of your ‘greatest tweets’ and some images from your twitter feed. These get programatically combined into a gloriously large 2600 x something large PNG and uploaded to Cafe Press. Depending on what you’ve put on twitter the designs are going to look more or less crappy.

So a PNG like this becomes available as a cup, t-shirt, iPad cover etc.





Automating the publishing to cafe press has been by far the most problematic of all the steps. Yes, after working on this for a little while I really hate the site of my own face, and pictures of my friend’s faces.

Transaction. Argument. Class. Message. Service. Agent. Method.

If you’re a technologist reading the previous list of words – Transaction, Argument , Class, Message, Service, Agent and Method – each of those words probably had a special meaning to you. Certainly when I read them I can’t help but mentally pre-pending  words like ‘distributed’, ‘atomic’, or ‘database’ to a word like Transaction. But as shocking as it may sound to technologists these are normal English-language words that have existed long before Babbage decided there were far too many errors in logarithmic tables, and have a broader meaning than the precise and narrow confines we choose to use them in. This is one of the  things that makes communication between technical and non-technical people even harder than it should be, and woe betide any programmer working on a system who has one (or…shudder several) domain objects whose names collide with these words that software development has hijacked. “Oh, you’re working on an event planning system for school classes? Here’s your cyanide pill.”

It gets worse once you realise that many of our narrow definitions of words are kind of at odds with their real-world “pre-technology” definitions. Transactions have existed ever since the first chicken was exchanged for the first sack of wheat (or something like that), and yet technologists have chosen to define it (fairly narrowly) as a unit of work (usually atomic, consistent, isolated and durable) against a software system such as a relational database. Only infrequently during database transactions is the ‘exchange or transfer of goods, services, or funds’ recorded. And while technologists don’t think of transactions as being exclusively atomic, consistent, isolated and durable it is more-often-than-not the assumption that goes along with the word ‘transaction’, so much so that a special type of transaction, deemed a ‘long running transaction’ has been created, which much more closely aligns with the normal commercial and financial sense of a transaction. Similarly parent-child relationships (in the context of software development and modelling) are at odds with the commonly understood human reality. In software development a parent-child relationship is often described as:

each parent can have many children, but each child has only one parent

While programmers and data modellers may reproduce asexually, most humans would consider a child to typically have two biological parents, making discussions of ‘parent-child relationships’ with non-technologists fraught with misunderstanding.

Fortunately the first step to solving a problem is often realizing that you have one, and so by recognising that the words that we (as technologists) use have broader meaning outside of technology, and that the misunderstandings arising from these differences in meaning can be critical, we can begin to put in place strategies that can close the gap. I think each project should draw up a list of domain words and technology words if they don’t already have some kind of glossary. If there are any domain words clash with commonly used technology words then just top yourself now. Or agree to pre-pend a word that disambiguates – no more mentioning of ‘transaction’ – something is either a ‘financial transaction’ or a ‘database transaction’. Similarly the subject matter experts should probably look at a list of commonly used technology words (like the one I’ve created below) and see if these are synonyms for business terms, and whether this could also be a source for confusion.

All the good words were taken

While it is not unusual for specialisations to adopt jargon (the term ‘stress’ to a mechanical engineer means something quite different to the rest of us), software development is in the unenviable position of dealing with a lot of abstract concepts that require precise terms to describe them. In the same way that history and mythology are chopped up in a blender to serve as the raw materials for many Hollywood films so to do human languages get chopped up into pieces by programming language designers looking to create easily-readable natural syntax. Here is a rough list of words I came up with that I thought had a better-than-average chance of causing confusion between technologists and non-technologists. Feel free to use it as the basis for your own list to help drive out ambiguity on your project:

  • Transaction
  • Service
  • Event
  • Message
  • Aspect
  • Agent
  • Method
  • Argument
  • Key
  • Exception
  • Process
  • Port
  • Socket
  • Map
  • System

Metro style for ILSpy


First, there was ILDASM, and it was good. Then there was Anakrino, and it was better. Then, there was Reflector and it seemed as if the world of .NET class browsing and decompilation had reached its zenith. From time to time I found something new to surprise and delight me. Reflector was fast, useful and showed a depth of features and progressive refinement that meant I never had to think twice about what tool to use for a .NET class browser (like the one in visual studio? You’ve got to be kidding!) Then red-gate bought reflector from Lutz (the original author) and I was a little un-easy. Red-Gate were (and are?) well regarded in the SQL Server tools space, and their head honcho Neil Davidson was often doing good things in the microISV community. Bugs started to creep in (like one time it perpetually wanted to update, and then crashed on update), and it tried to up-sell me to the ‘Pro’ version, with features I didn’t really think I needed. Then on February 2nd 2011 Red-Gate announced that reflector would no-longer be free. The developer reaction was as swift as it was vehement. To paraphrase a friend of mine (who was talking about timesheets at the time I think) it wasn’t so much the money that he objected to, but the lying. Some people say you can’t put a price on trust, but red-gate did – $35. Red-Gate had said quite clearly when they took over the reigns of reflector that they intended to continue to make it available for free, and had reneged on that commitment. There were some dissenting voices that pointed out that I spend more than $35 on coffee some days (which is completely untrue, the most I’ve ever spent on coffee in one day has got to be only about $30…totally fucking different).

I, like many other developers started canvassing around for a replacement to reflector. In the ensuing weeks a number of free and commercial applications were announced looking to step into the power vacuum left by reflector, many of them based on the excellent work done by the MONO project with their Cecil decompiler.

In no particular order we have:

and many others

Shortly afterwards red-gate reversed some of their decisions regarding reflector, but the damage had been done, the cat was out of the bag, wheels had been set in motion, and a million other clichés that you’d normally avoid like the plague meant that the whole house of cards was ready to fall like dominoes, or something like that.

ILSpy Goes Metro

In case you hadn’t guessed from the title I chose ILSpy, figuring that I was less likely to find myself in the same predicament I currently found myself in if I chose something that I could hack on myself. ILSpy works much like reflector does, and I was soon browsing inheritance hierarchies with glee, except for a few small UI warts that kind of annoyed me with ILSpy. No matter, I thought, I have the source code, I know C# and have some familiarity with WPF. I’m sure I can manage.

This is what the main-line official build of ILSpy looks like


One thing led to another, and this is now what my custom build of ILSpy looks like.


The great thing about ILSpy is, it is really easy to hack on. The other developers (which I’ve never spoken to or communicated with, so I’m basing this purely on the source code) seem more interested in building real features than adding UI accoutrements and pushing pixels (which is really my strong suit). Special thanks must go out to Paul Jenkins and his MahApps.Metro control templates (I see now that I should upgrade to 0.3). Thanks also to Derek Orr and Mike Wise for some UI suggestions, some of which I haven’t had time to implement yet. The Metro Design Language may not be to everyone’s tastes, and to those people I say “sod off”.

Chemistry is Hard, Let's get Coffee

I know a thing or two about Microsoft, and have a complete and total physiological addiction to passing acquaintance with coffee. I was doppio disappointed when I spotted this item in the Microsoft store.


I’m prepared to look past the fact that the picture has been strangely taken with a weird reflection that makes the cup look striped when it is not, but I’m not prepared to forgive the fact that they got the molecular structure of caffeine wrong on the cup. Or is this part of an elaborate biochemical joke? The title of the item in the company store is “Caffeine Coffee Cup 11oz Chocolate” (emphasis added). Apart from the missing nitrogen (which could just be a syntax thing – my organic chemistry is a little rusty) this looks like Theobromine, the delightful xanthine alkaloid found in…chocolate. Either way they should change the advertising copy, which clearly says “the molecular formula for caffeine on the other”.

On the danger of doing things when you don’t understand why–No ‘Best Practices’.

I’m a firm believer in the idea that there are no best practices in software development. There are practices that are known to be good under certain circumstances. Sometimes those circumstances are near-universal (or at least you think they are), but context is king and when the context changes maybe that practice you were touting as ‘best’ doesn’t look so crash hot anymore. Rather than just spouting ‘best practice’ it is much more important to understand the pros and cons of a particular approach, and WHY it might be considered a good practice. When you do something without understanding the rationale for doing it you’re liable to look silly when circumstances change, or if you work in the medical field you’re likely to put someone’s life at risk. I was reminded recently of the importance of knowing WHY something is being done by a story I heard about a family friend.


This family friend is as tough as old boots. He’s a veteran of the Second World War. Now in his mid eighties his body is wearing down and he suffers from a number of health problems, the worst of which is (or was) intense crushing pain in his lower legs caused by peripheral arterial disease. He described the pain as like having your lower legs put in a vise. Although he underwent a number of treatments including Aspirin (commonly given to patients in low dosages to prevent heart attacks, strokes and formation of blood clots such as Deep Vein Thrombosis or DVT) the pain was so intense doctors decided to take the drastic measure of amputation. The operation was a success, but a short time later he suffered an unrelated injury – intestinal bleeding which forced him back to hospital. While in hospital the staff put him back on….Aspirin, because that is what he’d been previously prescribed for the pain in his lower legs. Never mind that he didn’t have any pain in his lower legs anymore, or any lower legs at all. And never mind that Aspirin is exactly the thing you don’t want to be taking if you’re suffering from internal bleeding because of its antiplatelet effect (in layman’s terms they prevent your blood clotting). He suffered more serious internal bleeding and nearly died.

For my family friend the context had changed – the Aspirin which had previously been a ‘best practice’ for treating peripheral arterial disease was now actively harmful. The hospital staff didn’t understand why Aspirin had been prescribed in the first place, and didn’t think through the consequences of resuming taking Aspirin again given the changed context. Next time you hear of a ‘best practice’ ask yourself what assumptions about the context are implied. Are these assumptions valid? What things would need to change for this practice to become dangerous or harmful instead of beneficial?

[Image of a pill courtesy of doug88888]

Increased Presentation Impact with BigNote

Leon Bambrick and I recently came up with an idea for a tool to use during presentations  – essentially a big floating textbox that takes up as much room as possible on the screen. We also gave it a name – BigNote. The idea with BigNote is that instead of switching between on-screen subject matter (like visual studio, a web site or whatever) into PowerPoint and back you just ‘live annotate’ what is going on screen. This is similar in spirit to other tools like ZoomIt, which allows you to draw shapes over the top of things on the screen, but with the focus on text rather than images. A tool like this obviously isn’t going to suit every presenter, or every style of presentation, but since it was a really simple idea I went ahead and built it. I built it in WPF, and the first version was about 5 lines of non-generated code. After a few refinements like a global keyboard hook (so you can bring focus back to BigNote) and an animating viewbox to animate the re-sizing of the text. Here is a video of BigNote in action.

BigNote In Action

You can install it from codeplex (or download the code and hack on it if you want – as you’d expect from such a simple app the codebase is very small). I expect there’ll be a jQuery plug-in to do this in the future, and look forward to seeing how things like system-wide keyboard hooks can be implemented in javascript.