software category

I primarily run Mac OS X and RHEL-based Linux distributions. I also have experience with the BSDs, and think if a problem can’t be solved with Perl then it’s insurmountable.


Ruben studies UML, again!

Over the course of my education career (by which I mean receiving education, not partaking in education as a career), I've studied UML in four different courses. Or is it subjects. In Australia they're one thing, in the United States they're another thing, and Singapore tends to drift between the two. So much so, that I've already forgotten which to use. Of course, the adequate one is subject to opinion, as a matter of course.

Golf courses

I've studied UML in high school, at two universities, and once in industry as part of a course. There's that word again. With an exam on much of UML tomorrow, I've been burying my face in them once again, plowing through all these different examples, coming up with alternatives, refining and redefining and refining.

As someone who loves drawing diagrams, flow charts, mind maps and other such visual stuff, UML is a natural fit for me. Or at least, you would think so. To me, it has several problems.

And here are those problems

  • My first lecturer in Adelaide said "the great thing about standards is everybody has them". My friend Andrew Cox from the same city has issued similar sentiment, as has my father in an entirely different industry. Needless to say, "standardised UML" no more exists in practical, real world terms than Office Open XML. My high school, workplace and universities all have their own ideas as to what constitutes UML, it's syntax and it's applications, and they're all rigourously enforced.

  • Even the software I used is different, from basic tools like Dia and Visio on one end, to IBM Rational software on the other. Unlike, say, a high level programming language where code is portable provided you have an interpreter or compiler, the "code" these tools have you write in are largely incompatible, unless you consider manually transcribing them between tools or using an intermediate format to be acceptable!

  • UML's strict syntax make diagrams less fun! As soon as you introduce rules into something, you limit creatively. While a standardised approach (or at least, the pseudo-standard we have now) ensures those who read and use them can pick them up fairly easily, it also means those attempting to express the functionality, purpose and design of a system are limited by the ideas of someone else. I adore mind maps and flowcharts and use them for practically all my study, so I suppose this is more of a gripe with being turned into a tie wearing, white collar cubicle dweller than anything else ;).

  • UML attempts to get around this limiting factor by having a suite of diagrams, each tackling different aspects and stages of the modelling process. While this provides reinforcement along the different stages of the design process, it also introduces redundancy, with much of the information being repeated over, and over, and over again in different ways.

  • While UML promises to reduce confusion, often times it adds another layer of complexity. For large projects this may be necessary, but for smaller ones I feel as though it's often more trouble than its worth. I also feel somewhat uneasy about developing a solution to a problem based on a model, rather than the feedback directly.

  • Finally, and this is perhaps the most concrete criticism I can think of, UML was designed around OOP principals, not programming languages or DBMSs. Often times this means concepts in UML don't translate perfectly into languages or schemas. This introduces the requirement for interpretation, and it's as soon as you do that that you introduce inconsistency, uncertainty and potential confusion. Like interpretive dance, which I can't even do.

  • Insert ranting about "design by committee" here!

But but but...!

I can already picture the responses I'd get to these concerns by those who use UML for a living. Even standards that are only loosely enforced across industry and academia are better than no standards at all. Strict syntax ensures consistency. While each of the diagrams in the suite may have redundant information compared to the others, different stakeholders and developers would look at only a subset of them tailored to their needs, so that would be less of a concern for them. Work isn't supposed to be fun, and you can still be creative by colouring inside the lines. Abstraction makes implementation easier.

I understand these points, even if I can't entirely appreciate them at this stage. To be honest, I've been more at the development stage of the cycle than the requirements gathering stage. Still, I worry that buried in the hype and promises, there's a lot of hot air and solutions in search for problems in UML. A quick net search shows I'm not the only one who thinks this, not by a long shot!

UML is better than perhaps other modelling solutions we have at this stage, and I can churn them out and understand them fairly well... or at least as well as someone in my position could! However, there's still far more work to be done in bridging the gap between requirements and development. Whoever figures out how to do it better will be a very, very rich person.

I'd suggest taking a long, hard look at the KISS principle. That sounded terribly, terrible wrong for some reason.


The ABC and Bitcoin

An eyebrow-raising story just published on ZDNet Australia made me realise I'd never commented on Bitcoin here before!

The story

Written by Luke Hopewell less than an hour ago:

The ABC has caught one of its own trying to mine Bitcoins using its infrastructure.

The Australian Broadcasting Corporation (ABC) looked set to become a haven for Bitcoin virtual currency mining last year, after a so-called "miner" placed a piece of code in the production environment, which could have potentially netted to thousands of dollars. The ABC's security systems, however, had other plans.

I thought Bitcoin was an interesting concept when it first came out, but I had reservations. I wasn't alone; while it clearly appealed to certain Libertarian minded people eager to escape the clutches of taxation and runaway government defecits that could devalue "real" money, there were those who claimed it would fail for the same reason every other online currency has. Such a discussion is beyond the scope of this post!

I like to say I'm a reformed Libertarian!

No, for me the concern was about energy. To introduce scarcity into a system of abundance, Bitcoins are manufactured through a computationally intensive and complex program. Referred to as "mining", people would be awarded at random for their efforts. Well no, people with more powerful and more expensive setups are statistically more likely to be awarded stuff, and those who can't afford them wouldn't. Libertarianism in a nutshell ;).

The problem for me is, while the Bitcoins mined with this program are virtual, their impact is real. Thousands of CPU hours burning real energy most likely produced from dirty fossil fuels created this stuff. If you're going to run a program on your computer 24/7, the least you could do would be to have it do something useful, like finding cures for diseases. If that doesn't rock your boat, spare the planet your extra energy use and put your machine on standby when not using it!

Which brings us back full circle to this article in ZDNet. This worker at the ABC, a government owned company and therefore owned by Australians like me, were using our computers and money to power them to generate Bitcoins for themselves. To me, that goes beyond what we'd normally describe as misuse of property.

I'll be interested to read the outcome of this investigation as more details emerge.


A new term by @StuartCRyan

Tweeted from earlier today:

I'm coining a new term (you heard it here first). #PIE AKA #ProactiveInformationExchange to share knowledge to prevent #ShitHittingFans

I'm already used to PIE standing for something else, but I nonetheless wholeheartedly support this term and what it stands for. I'd attribute ~60% of the problems I've had in IT to poor communication, or lack of it.

You read it here... second.


Goodbye to Simple Clocks?

Installing extensions into a new SeaMonkey install this morning, I got quite a shock!

Simple Clocks :: Add-ons for SeaMonkey
This add-on has been removed by its author.

As someone with friends in multiple timezones, Simple Clocks was the simplest way to see at a glance whether or not I'd be waking anyone up with my tweets, newsgroup messages and the like. It's a shame the developer couldn't keep it going.

I guess it's back to FoxClocks; another excellent plugin but with extra features I don't really need.


HP Enterprise Mobility Platform thingy

I read this last week but forgot to mention it! Wayne Rash writing for Fierce Mobile IT:

HP is launching an enterprise mobility platform that will let wireless carriers provide app stores tailored for enterprise users. [..]

The Enterprise Mobility Platform includes the Enterprise Mobile App Store that lets enterprises create, certify, distribute and manage mobile versions of company apps. The apps would be hosted at the carrier site and the HP app store would provide a portal for employee use.

Sounds like a great idea for simplifying distribution and updating clients, as many of their competitors have realised. Frankly I'm surprised it took them this long!


Make Qt applications match Gnome 3

Qt applications look acceptable in Gnome 3, but with the Qt4 Configure utility you can change the colours and fonts to match their GTK+ brethren!

Installing Qt4 Configure

This is a potential gotcha; depending on your distribution you may have to specify qt4, or not. For example, in Fedora:

# yum install qt-config

And FreeBSD:

# cd /usr/ports/misc/qt4-config
# make install clean

Once you've installed it, a beautifully large Qt4 Configure icon should appear in the "Other" category of your Gnome 3 Shell. Given many of my GTK+ applications still have crappy icons, having the Qt4 Configure app fit in so well was a pleasant surprise!

Colours

The default GTK+ theme for Qt looks passable, but Gnome 3 uses a whiter shade of pale. This is most noticeable between the title and menu bar in Qt applications.

You can correct this by clicking "Button Background" and "Window Background" under "Build Palette", and slotting in the following values:

  • Red: 239
  • Green: 235
  • Blue: 231

To get the right shade of blue for selected menu items, click "Tune Palette..." under "Build Palette", then choose "Highlight" under "Central color roles". Slot in the following values:

  • Red: 74
  • Green: 144
  • Blue: 217

I derived these colours from using the GColor2 utility, so they may be approximations. I can't tell the difference!

Fonts

For better or worse, Gnome 3 uses Cantarell for its default font. To get Qt applications to match, set the font to "Cantarell" on the "Family" dropdown box under the "Fonts" tab.

Update

Curiously, I had to go through this rigmarole on my Fedora 16 x86_64 tower, but on my MacBook Pro running Fedora 16 i686, Qt had the right colours set for Gnome 3 by default.

I've since discovered it has to do with installation order. If you install Qt4 Configure before any Qt applications such as VirtualBox, Amarok or Opera, the Gnome 3 colours will be included by default. Interesting!


No drive encryption in flavours of Windows 8?

Why comment on the name when there's already a prefabricated meme? ;)

Editional Redundancy

Having bought myself a large cup of caffeinated beverage at my local café without even specifying what I wanted (I've always wanted to be a "regular" somewhere!) I dug into Microsoft's news about the upcoming release of Windows 8.

According to the Window Steam blog, which I can only assume discusses how best to clean panes of glass, Microsoft will be releasing Windows 8 in three versions; a regular, a premium and one specifically for ARM tablets dubbed Windows RT.

Two quick asides about the hardware. First, isn't it a fascinating historical twist that an Apple spinoff eventually became so successful Microsoft had to break their Wintel model and release a version of Windows for it? Windows on different architectures isn't new; Windows/386 was specifically targeted at that CPU and Windows NT Workstation was offered on the DEC Alpha and PowerPC, but it shows even the once invincible Microsoft wants to hedge their bets in this emerging market.

Secondly, you've got to think Intel are keeping an eye on this trend!

Back to the Editions

Microsoft have been very successful in convincing people that having editions of their operating system is a great idea, though fortunately they're only releasing Windows 8 in three versions. It's still too many, but it's a start. See what I did there?

Why is it still too many? One word: encryption. With the need to artificially differentiate products in order to charge people differing sums of money, certain features have to be removed from the final product in order to entice people to upgrade; again a practise plenty of people are willing to defend for some reason.

While Microsoft seem to have been fairly consistent with only including enterprise and more advanced features in their higher end Windows versions, some features that really should be part of the base product have also been removed at times. Not being able to change desktop wallpapers in Windows 7 Starter, for example. You can't make this stuff up.

Unfortunately, the feature they've decided to leave out of the standard version of Windows 8 is far more critical than whether or not you can put a cute anime girl as your desktop background.

Madobe Nanami, Windows 7-tan

Encrypting File System

Okay, I used this entire post as an excuse to show Madobe Nanami again. Honestly, of all the reasons I've had given to me to move back onto Windows, this adorable Windows 7 mascot is the most convincing one so far. True story.

Anyway, when I saw the lack of an "X" under their "Encrypting File System" for the standard version of Windows 8, I was lucky I didn't regurgitate the mouthful of otherwise fantastic coffee I was sipping on. I wanted to reach through the screen, pull out a Microsoft engineer and ask them why not!

Certainly it's not a technical limitation, as far as I can tell. Mac OS X has it, most Linux distributions have it, even Google's ChromeOS (remember that?) has it. The pro version of Windows 8 has it.

Putting people's privacy and data at risk for the sake of product differentiation seems reckless to me. I hope — nay, implore — Microsoft to reconsider.

Tin foil hat!

That is... unless they're leaving it out for other reasons. Perhaps the prospect of default whole drive encryption on virtually every new computer around the world was scary enough a prospect for law enforcement that they leaned on Microsoft to not include it on the most popular version. Heck, the rhetoric in the US has long been about how difficult encryption is making certain investigative jobs.

Of course I have no proof of this, but the speculation is irresistible!


Labelling an ext2, ext3 or ext4 file system

Icon from the Tango Desktop Project

The easiest method (from experimentation this evening!) is to use the e2label command. For example, to set the label of the first partition on the /dev/sdc drive:

# e2label /dev/sdc1 yournewlabel

At this rate, I'm thinking I should just start another site for just Linux tips. Nah ;D


The partition is misaligned by 3072 bytes?

Getting this error in Red Hat's Palimpsest (Disk Utility)? Use gdisk to define partitions first, then you'll have no problems :).

The problem

Starting with their larger capacity, multi-terabyte/tebibyte drives, Seagate and Western Digital have moved from a 512 byte sector size to 4 kb. The benefits and tradeoffs of this new low level format is beyond the scope of this post; suffice to say it wrecks havoc with certain drive formatting tools!

If you attempt to format one of these newer drives in Palimpsest, you may receive an error similar to this:

The partition is misaligned by 3072 bytes. This may result in very poor performance. Repartitioning is suggested.

Technically the drive is completely usable in this state, but you'll pay a hefty performance penalty.

The solution

At the time of writing this post, both GParted and Palimpsest have trouble with these drives, but gdisk can handle them. Gdisk is a command line based disk editor that works on GUID GPT drives.

I shouldn't need to tell you to back up your data and quadruple check you're performing operations on the right drive. Please be careful!

  1. Install from your package manager (no, really?)

  2. Launch gdisk as root with the device path of your new drive; you can find that out from Palimpsest's "Device" label. It'll look something like this:

    # gdisk /dev/sd[x]

  3. Type n for new partition, and accept the defaults, assuming you want a partition that takes the entire drive.

  4. Type "w" to write the changes.

Now you can format the drive with any tool you wish!


Exception in thread "main" java.lang.NoClassDefFoundError

Icon from the Tango Desktop Project

In response to my previous Java post, I got a DM on Twitter from another university student asking if I'd come across the above error before. Often I do, when I'm programming in a dazed stupor at 3am, and I've done this:

% javac Something.java
% java Something.class

Instead of this:

% javac Something.java
% java Something

The error can be caused by any number of factors, but 99% of the time it's because of this. Much hair ripping has resulted from it!

(It turns out this was the problem. Glad I could help ^^)