From the latest edition of The Science Show on ABC Radio National, a comment from Robyn Williams following an excellent argument from Professor Derek Denton about how various parts of the human body present evidence against the notion of intelligent design:
"And finally, one only has to consider human genitalia: who would put a piss-house in the middle of the playground?"
Recently I mentioned that I had been enjoying refactoring a Java application I wrote a few years ago.
It is a simple application that I wrote to generate pages for the fixtures section of my local cricket club's website. Based on a database and a web page template, the application generates two sets of pages: one with lists of fixtures for each team and the other with lists of fixtures for each playing day of the season. That's it. Nothing extraordinary but it was very useful because, at the time, our hosting provider limited us to static pages.
Now I'm in the process of enabling someone else to use the generator for the new season. Having finished tidying up the code I'm making the source available should anyone be interested.
With that little announcement made it's time to get back to my latest project, also with a cricket theme. This time it's a web app written in Ruby on Rails.
So Trevor Hohns and company have included Nathan Bracken in the twelve for the First Test against the West Indies in Brisbane. Stuart MacGill is also in the squad but is likely to be 12th man.
I have mixed feelings about this selection. I guess Bracken has earnt another chance. He did take 43 wickets in last season's Pura Cup campaign and took 6/27 to play a major role in winning the final for NSW.
But I still think MacGill is a better wicket taking option than Bracken. Even in Brisbane. And does Australia, with Watson in the squad as well, really need four quicks?
Having just arrived back in Sydney I can report that I was momentarily upset during the flight from Canberra.
I was enjoying a complimentary glass of red when turbulence struck and, try as I might, I couldn't prevent the precious liquid from staining my trousers. Bugger!
Oh well, I soon calmed down when I returned to reading Peter FitzSimons' book about diggers perishing on the Kokoda Track. It put my minor calamity into perspective.
Still, it was disconcerting to waste some Margaret River cab sav!
"Walk to work?", I thought. "What a joke!"
This was several weeks ago as I was listening to someone on the radio promoting a "walk to work" day. Whilst I'm all in favour of that idea in principle it's a tad unrealistic when you live 70km away!
However, this week I have had the luxury of working between the hotel and the office where I have been teaching in Canberra. The route has taken me along the very pleasant City Walk.
The other day I noticed on the bookshelf my copy of Beyond Chaos, a collection of essays chosen by Larry Constantine from the Management Forum in Software Development Magazine.
Here are some random quotes:
You have no real control over anybody else. The only person whose behavior you can change is you.
Larry Constantine
I choose to be here.
I will stay as long as working with you meets my needs.
While I am here, I will try to support you.
If I am not getting what I need, I will make a change.
I may change myself in some way.
I may ask you you to change, and will respect and accept your response.
I may choose to change our relationship and stop working with you.
Dale Emery's variation of Fritz Perls's "Gestalt Prayer", quoted by Sue Petersen.
It's fashionable to disdain "process" as the last refuge of uncreative bureaucrats, but every group can find ways to improve the work it performs.
Karl Wiegers
When people are challenged with exaggerated or impossible objectives, they often do not take those challenges seriously.
Johanna Rothman
Full features and functionality can be delivered even under highly restricted time schedules, but only at the price of quality or added cost in development resources.
Larry Constantine
We must always remember that technology is used by people for human ends. Technology in itself solves nothing. Like all tools, it has no soul and cares nothing about how it is used.
Larry Constantine
There are many things I like about Head First Design Patterns (HFDP), by Eric Freeman and Elisabeth Freeman, not the least of which is the teaching style that is employed. Various vehicles are used to get the message across. Cartoon style conversations between the Skeptical Developer and the Friendly Patterns Guru and crosswords, for example, both reappear as the chapters progress.
A page that I like, presented near the end of each chapter, is entitled Tools for your Design Toobox. It builds up lists of OO Principles and OO Patterns in addition to the OO Basics of Abstraction, Encapsulation, Polymorphism and Inheritance.
I thought it would be interesting to summarise the order in which these principles and patterns are presented. In brackets is the related pattern:
Encapsulate what varies. (Strategy)
Favor composition over inheritance. (Strategy)
Program to interfaces, not implementations. (Strategy)
Strive for loosely coupled designs between objects that interact. (Observer)
Classes should be open for extension but closed for modification. (Decorator)
Depend on abstractions. Do not depend on concrete classes. (Abstract Factory, Factory Method)
Only talk to your friends. (Adapter, Facade)
Don't call us, we'll call you. (Template Method)
A class should have only one reason to change. (Iterator, Composite)
I don't have anything profound to add; I just thought it would be interesting to summarise these principles as they are presented in HFDP.
Right, oh. I want to become more of a nerd (I mean cut down on my phone bills) and use Skype.
Any suggestions for an inexpensive set of headphones well suited to travelling?
What should I expect to pay? If you're ahead of me and already use Skype, how do your headphones compare to these?
Ever found yourself in a seemingly never-ending spiral of attempts to refactor code with the aim of getting it into a fit state to implement a change?
You spend some time analysing a method to understand what it's doing and then do the right thing and refactor it, perhaps using the Compose Method refactoring. Then you find something else that, to use the refactoring jargon, smells. You make that code better, pat yourself on the back and prepare to start implementing the changed behaviour. But you can't; there's yet more pungent code blocking your path to an elegant solution that will be better in the long run.
Sometimes I think the Code Smell metaphor is too mild. Even Code Stench can be insufficient. The image of being trapped in a sewer full of toxic fumes would be more apt.
Pass the gas mask and show me the way out of here!
John Doyle has presented a brilliant, wide-ranging and thought-provoking lecture in honour of the late Andrew Olle. Naturally he had the audience in stitches as well.
If you missed it on tele, have a read or a listen. It's well worth it.
It would appear that I have been guilty of spreading a myth about improved performance if you declare serialVersionUID in a serializable class.
As Vladimir Roubtsov pointed out a couple of years ago, declaring serialVersionUID has a neglible effect on performance. If not declared the SUID is computed only the first time the JVM serializes an object of a given class. For the curious, read Vladimir's article as well as the details of the SUID computation.
Thanks to Chuck Herrick for alerting me to this. Mea culpa!
Do you ever have days when you wonder what you've done to deserve your bad luck?
This morning I was enthusiastically continuing my refactoring when my iBook's screen went blank. Dead as a dodo. Hopefully it won't take long to get it fixed.
Oh well, all was not lost, I told myself. I had the afternoon to look forward to. Having retired from cricket, I had answered a call during the week to fill in for the men's team that my son would be playing in. I have to admit I was looking forward to it. The captain had even guaranteed to give me a bowl.
When Wyong sent us (Mountains) in, I was asked to open the batting. No problem... until the fourth over. I was backing up, forgetting my age and on the lookout for a quick single. Then I felt a sharp snap in my left calf. So the only time I got to spend on the field with my son was for two balls as he acted as a runner for me! At the end of the over I realised that discretion was the better part of valour and hobbled off to put my leg on ice.
Still, at least I knew there would be a couple of medicinal James Squires beers in the garage fridge when I got home.
It's a cruel, cruel world.