Friday, November 27, 2009

Grails - infuriating

I am doing a bit of work in Grails at the moment. For those who are going: "What??", it's a web framework, which intends to allow a developer to build web applications quicker, or better, or easier.

Overall, it is a bit of fun, easy enough to get off the ground, and you don't seem to have to write a great deal of code to get a great deal of result. But doing anything beyond a simple website it seems to get you into ever increasing layers of complexity and time-consumption.

The things I most dislike about it are:

  • There does not seem to be a lot of information out there on it that is beyond the simple stuff, airports and flights, books and authors. I find that if you add the words "finally found an answer" to the google search, it leads me more quickly to helpful people who are also trying to do non-simple stuff.
  • The documentation, particularly the "Guide" is reasonably good and (for a change) well-written, but so many important nuggets of information are buried in it, you find yourself reading and re-reading the same section of doc over and over to try to find answers. You know the answer has to be there somewhere.
  • The specs seem to change markedly from one version to the next. Little things mainly, of course, but it potentially means that when you think you have found the answer to your question, you have to be careful that the answer is still current to the latest version.
  • The community seems to contain more than it's fair share of "that's the way it is, deal with it", or "it is simple, you are stupid" people. It certainly doesn't encourage asking questions when you see some bloke get his arse flamed off for asking the same dumb question that you had. No I didn't notice the subtleties in the previous answer, thanks for pointing them out and displaying your obvious superiority.
  • The Exceptions that are generated when things go wrong in the app are way out there. I guess this is as a result of the way it's built on top of Groovy on top of Java with potential other helper frameworks jammed in. But struth, if it's a database error, then tell me it's a database error and not some other obscure error.
  • Grails uses Hibernate for database access, and getting it to work with an existing database is a real trial. Days worth of work, trust me. Oh so you DON'T want an intersection table with that simple one-to-many relationship? Well you're doing it wrong then. Whether it's complexity is Hibernate's fault or Grails's is debatable, but cripes, sometimes I wonder whether it's easier for me to write a simple SQL query. Much easier than trying to wade through the Hibernate documentation as well.
  • And finally, some things just don't seem to work as advertised. Or perhaps I didn't read the fine print in the advert? For example:

    //// A bug? ILike doesn't seem to work here and an exception is thrown.
    //// At least in this case, the exception is meaningful!
    //list = Customer.findAllByNameILike(params.ajaxParam + '%')
    //// The following does work, though.
    def crit = Customer.createCriteria()
    list = crit {
        ilike('name', params.ajaxParam + '%')
    }


I am not giving up on it yet, it will just take me time to learn. I am thinking though, when I compare it to my experience learning Struts, that while I spent a LOT more time writing code to get to a certain level, I spent a lot less time finding out how to do things. With Grails to get to the same level, I spend a LOT more time finding out how to do something, and then writing two or three lines to code it up! The time spent seems to be about the same.



I am also thinking that Grails may not quite be the Holy Grail of webapp development that I originally was hoping for.

Tuesday, November 17, 2009

Top 100 Books Update

I'm still continuing with reading my list of Top 100 books. Refer to this article. Over a year since my last update. One thing I am noticing, looking at the dates I have started and completed the books in my little tracking spreadsheet, is that large or hard books slow me right down. While this may seem obvious, it is more than just a simple words-per-minute ratio. Hard books tire me out, and I usually end up having a break from reading, or resorting to familiar, small or kids books immediately afterwards.

These are the latest read in order of finishing:

  • The Berlin Stories — Christopher Isherwood. A bit different to Cabaret. Really.
  • The Picture of Dorian Gray — Oscar Wilde. Spooky.
  • Treasure Island — Robert Louis Stevenson. Rollicking.
  • One Hundred Years of Solitude — Gabriel Garcia Marquez. I really liked this one.
  • The Thirty-Nine Steps — John Buchan.
  • The Great Gatsby — F Scott Fitzgerald. Strange. I've read this before and remember it as mainly a "fun" book. How wrong I was.
  • Lord of the Flies — William Golding.
  • Frankenstein — Mary Shelley.
  • Moby-Dick — Herman Melville. I read this via Daily Lit, one page per day.
  • The Stand — Stephen King. I chose his most recent version, with all the cut out bits added. The ending stretched on and on and on.
  • Guards! Guards! — Terry Pratchett. Funny.
  • To Kill a Mockingbird — Harper Lee. Not sure if the movie spoiled it for me or not.
  • The Executioner's Song — Norman Mailer. Creepy. Long and drawn out.
  • BFG — Roald Dahl. The Queen?
  • Charlie And The Chocolate Factory — Roald Dahl.
  • Charlotte's Web — E. B. White. And then I watched the cartoon.
  • The Lion, The Witch and the Wardrobe — C.S. Lewis. OK. Enough children's books already.
  • Pilgrim's Progress — John Bunyan. Another Daily Lit read. Tortuous. But I'm sure it is responsible for saving someone's soul.
  • The Hitchhiker's Guide to the Galaxy — Douglas Adams.
  • The Catcher in the Rye — J.D. Salinger. I really don't think this helps me understand John Lennon's killer. Not that I really want to.
  • Lucky Jim — Kingsley Amis. Amusing.
  • Things Fall Apart — Chinua Achebe. Unexpectedly good.
  • Harry Potter And The Philosopher's Stone — JK Rowling.
  • Harry Potter And The Chamber Of Secrets — JK Rowling.
  • Matilda — Roald Dahl.
  • Money — Martin Amis. It took a long, long time for me to get into this one, and then I got into it, and rushed it at the end to finish it. Martin Amis turns out to be Kingsley "Lucky Jim" Amis's son.
  • Huckleberry Finn — Mark Twain. I struggled with the American patois.
  • The Portrait of a Lady — Henry James. Daily Lit again but in two parts. So just when you finish the first you realise there is a whole second-half of the story to go. Why say two words when you can more eloquently express the fullness of your ideas in a more abundant literary manner.
  • The Prime of Miss Jean Brodie — Muriel Spark. Yeah, I liked this. I'm sure it was shocking in it's day.
  • Lolita — Vladimir Nabokov. I struggled for ages with this. Dare I say: a little bit boring.
  • The Unknown Terrorist — Richard Flanagan. This is one of those books you read and immediately think it is preposterous, and then it gradually eats into you, and you start closely reading the news for hidden agenda. I rush read it the story was so good. Yea gods, one of the characters in this lives in Panania. Panania. That's the suburb next-door to where I was raised.

My current Daily Lit read is David Copperfield (Part 124 of 447). This is a bit embarassing, because I was supposed to read this for English in High School, but I ended up giving up quickly and reading the Brodie's Notes on it. I must admit I like it better the second time around. The book by the side of my bed is Part 1 of Lord of the Rings, and my read-on-the-bus book is The Wide Sargasso Sea. This latest is a very hard book to read in an environment that is conducive to travel sickness.

Saturday, November 14, 2009

My son and I

Yesterday I went into the kitchen, and tripped over our son's toys and plates that he'd pulled out of the cupboard. I said a couple of swear words, cleared things up and went out to the loungeroom. It was covered in musical instruments, mostly guitars, sound gear, music stands and music that I had left everywhere.

We're not really that dissimilar.

Reminds me of that great line from Men Behaving Badly (the English version) when Dorothy and Gary are having a baby, and Dorothy laments about now having two flatulent little bastards with a breast fixation.

Friday, June 12, 2009

How to kill Google Chrome (from behind a corporate firewall)

This is quite annoying. Most annoying is the fact that I do this every single morning without remembering the issue.


  1. Start up Chrome.
  2. Before the proxy sign-in window has a chance to come up, open a new tab.


Stop. You've done enough. From here, you can't seem to do anything, no keypress or mouse-click works, and you have to kill the process and start again. I imagine if you wait long enough, something will time-out, but you know...

Monday, March 23, 2009

Talking on the bus

It still amazes me how much some people can just, well, talk.

This morning on the bus going to work, a pretty young girl entertained the whole back half of the bus for the full 45 minutes journey. First, it was talking to another young girl, who could hardly get a word in edgewise. The subjects ranged from her boyfriend, to her part-time job babysitting, and to her prospective purchase of a new car. After we had heard at 80% volume that her man is inattentive, her little charges are just gorgeous, and that she is intimidated test-driving cars that are equipped with a manual transmission, her no doubt partially-deafened friend exited the bus at the first city stop. She immediately took out her mobile phone and, at 75% volume, regaled the rest of us and her lucky callee with her hopes and expectations for her upcoming trip to Byron Bay.

Although this may sound strange coming from a man who blogs to the world, which is in itself a form of loud talking on the bus, I wonder whether this girl finds time to herself to just think rather than talk. One of the things she perhaps may think about, if she ever found the time, is how utterly ridiculous she sounds.

After alighting from the bus, I passed her in the street. I was surprised to see that she wasn't still on the phone. Her think-time, perhaps?

Tuesday, March 10, 2009

A Revelation

I read this stunningly informative article yesterday on the Sydney Morning Herald website, which reports on the results of a study. Feel free to read it yourself, but don't read it standing up or if you have heart complaints because the shock may cause you to faint to the floor.

Employees wary, unmotivated after sacking 
(http://www.smh.com.au/national/employees-wary-unmotivated-after-sackings-20090308-8sh5.html)

My stars, how insightful! Who on earth would have guessed, that after there have been sackings at a company, the remaining employees are less motivated. It is a complete revelation.

I have heard that the Sydney Morning Herald are running these related stories:
  • Study confirms reducing staff reduces employee costs
  • Poll results: workers prefer not to be retrenched
  • Happy staff are more productive

The only, and I mean the ONLY slightly surprising information provided by this "news" item, is the last paragraph, which states that nearly 50% of companies that sack staff need to rehire soon. And being one of those people that was retrenched and then re-hired quite soon after by the same company, it is not nearly so much of a surprise to me. Actually, what is a suprise is that these nearly 50% of companies are willing to admit their incompetence.

What is the greatest surprise is that:
  • People got paid for the results of the study; and
  • Someone got paid to write that article.

Thursday, December 04, 2008

Inappropriate behaviour

On Monday night after basketball, the team always goes down to Percy's Bar in North Sydney for a couple of quiet beers. This last Monday was no different.

At some point during the evening I went to the toilet, and standing at the urinal was reading the advertisement on the wall. It was for Tooheys White Stag beer, which promises one-third of the carbs of a regular beer. The ad says the remaining two-thirds of the carbs will be sent to those who need it most -- Americans. Interesting ad, amusing, however, the thing which caught my eye was a QR Code, and the line which went something like: "Point your mobile phone's camera at this QR code, and your phone's browser will pop up and take you to the Toohey's White Stag website."

Now, I may be all on my own here in this opinion, but I am NOT taking my mobile phone out to take pictures of ANYTHING in a pub toilet. The places are scary enough as it is. And I am certainly not going to be browsing the net while standing at the urinal. I mean for starters, my phone is a Palm Treo, and needs two hands to operate.

What on earth were they thinking?

Thursday, September 04, 2008

Cultural differences

I was looking through Kinokuniya in Sydney the other day. A labyrinthine, multi-language bookstore near Town Hall. I wandered from the English language fiction section over to the German langauge fiction section to test out some of my incredibly poor High School German.

I immediately noticed that the printing on the spine of German language books was in the opposite direction to that of English language books. To read through the titles, you have to tilt your head down to the left instead of the right. Cool!

My kids weren't impressed with this revelation. You try to teach children to enjoy the little things in life, but they are Generation Z (maybe Z+1?), and everything is either "mad" or "meh". This was clearly the latter.

Tuesday, August 12, 2008

15 Things they don't tell you about getting old.

  1. It's harder to wake up in the morning.
  2. Your metabolism changes. Suddenly, cheesecake for breakfast, McDonald's for lunch and Kentucky Fried Chicken for dinner is unacceptably bad for you. You actually eat the salads that come with the main meal.
  3. You can't go out drinking till late, sleep for two hours, and get up and run the City-to-Surf.
  4. You have an obsessive need to check your weight every morning.
  5. The words cholesterol and hypertension don't have to be searched for in the dictionary.
  6. Bad service makes you very cranky.
  7. The acceptable age range for attractive ladies gets wider and wider.
  8. You have to warm up at least 20 minutes for a 40 minute game, and still suffer 2 days of pain. If you don't warm up at all, expect 10 days of injury.
  9. The number of days suffering from the common cold quietly approaches, or even exceeds, the number of days spent without it.
  10. Your hair gets more wirey, and starts appearing in unusual spots, primarily nose and eyebrows.
  11. The antics of the school kids on the morning bus no longer amuse you.
  12. You doze off. Anywhere.
  13. The weekend is for doing nothing, as opposed to doing lots of things other than work.
  14. You still get pimples.
  15. When there is rubbish on television, you turn it off rather than sit vacantly waiting for something better to come on. And isn't there a great deal more rubbish on television nowadays, or is it just me?

Thursday, August 07, 2008

Sign of the times

Taking the girls back home on Sunday night, I found myself stuck behind these two cars going into the entrance of the Lane Cove tunnel. The first was this huge old Big American Car, straight out of the 50's, chugging along at about 40kph (or possibly 25 mph?). The second was a ute and obviously a "chase" car.

Once we got into the tunnel proper, I overtook them and drove on, and quickly lost sight.

About an hour later, on the way back after having dropped the girls off, just before the entrance to the tunnel, I spotted the Big American Car, abandoned by the side of the road. It has obviously only just made it out the tunnel before conking out.

Fairly symbolic, I thought, that the age of the big car is well and truly over.

Friday, June 27, 2008

School House names

On Wednesday, I was out at Josephine's primary school for a presentation, and hanging up behind the stage were the four house flags. I can't remember what the house names were, other than they were botanical. At my High School the houses were early Australian explorers, Blaxland, Lawson, Wentworth and some other intrepid soul. Hume, maybe?

I reckon for a Western Sydney school, you couldn't get better than having the houses named after motorsport people. What about Brabham, Doohan, Gardner, and Webber? Much more interesting than Waratah, Banksia, and the like!

Monday, June 23, 2008

Top 100 Books update

I'm now up to 32 books read. Refer to this previous article if you are not sure what I'm talking about.

These are the latest read:

  • As I Lay Dying — William Faulkner. This will either change or confirm your in-built views of back-country Americans. I liked this one very much.

  • Dune — Frank Herbert. I think this is about the fourth time I have read this one. A favourite.

  • Neuromancer — William Gibson. I find his narrative confusing in spots; probably a personal problem.

  • Scoop — Evelyn Waugh. Usually, it takes me a little while to get into a book and then I'm hooked. This was different. I initially thought it hilarious, I cooled on it in the middle, and got back to it in the end.

  • Tinker Tailor Soldier Spy — John le Carre. OK.

  • Wind in the Willows, The — Kenneth Grahame. Very English countryside kids story. I'm sure I have read this before, possibly?



And I'm still reading Moby Dick via Daily Lit. Page 100 of 252. Struth! I'll get there in the end.

Wednesday, June 18, 2008

A car accident

I was involved in an accident yesterday. No people damage, just to my car. Very annoying, with only this one surreal bright spot.

Tuesdays at petrol stations in Sydney (and possibly elsewhere) are just crazy now, reminding me of the petrol rationing times. Everyone lines up back into the street, blocking traffic, so they can fill up on what is supposedly the cheapest day of the week. Wow, one or two cents a litre, maybe $1.20 you saved for sitting with your car running for 20 minutes. But yesterday morning I was running on fumes only, and had no choice but to stop off at the Speedway Petrol Station on the corner of Falcon and Miller Streets to fill up my Civic. The arrangement of pumps at this station is unusual: since the station has access to both Miller and Falcon, the pumps are at 45 degrees to both roads, sort of cutting the corner if you like. I went round the corner and came back in, squeezing in behind a woman filling up, while a flat-bed tow-truck was filling up at the diesel pump alongside. He spent the whole time filling up on his mobile phone, which I thought unusual enough, seeing as there are always signs to say "Turn off mobile devices!" with the ubiquitous crossed-through red circle with the silhouette of a mobile phone inside. The woman left and I edged up to the front and plugged in.

We finished at the same time, he hopped into the truck still chatting away on the phone, and we both started to head out, him on the right, me on the inside. To get back onto Falcon Street we've both got to come back left at that sharp 45 degree angle. I decided to let him go first as he was edging aggressively into the traffic. But that wasn't enough for him, he had to cut across and he hit me while I was waiting there, ripping the front bumper up and almost off. The car was still driveable, so I headed out into the street, expecting him to stop up ahead. But no, despite my beeping the horn and yelling out, he was off and heading to the Harbour Tunnel turn-off, still talking on the phone! I had to accelerate and jump in front of him to get his attention, and then we went on a merry chase, me following, through the back streets till he pulled up in Ernest Street with his back end sticking into a "No Stopping" zone. One of those nasty red "No Stopping" signs that you know are going to cause no good if a cop comes past no matter what excuse you have. I had no choice but to pull in behind him.

He got out of the truck cabin, came back and spoke these immortal words:

"Hang on a sec', mate. I've got to fart."

Tuesday, May 27, 2008

The breakdown of society

One thing that scares me about the possibility of society breaking down, is the knowledge that I may have to use a filthy toilet. I don't handle filthy toilets well. Any occasions where I have to use portable toilets induce constipation. Camping or going away somewhere that doesn't have a proper sit-down are similar. I'm not referring to the stand-up situation but rather the sit-down. Obviously.

Cleaning and eating a feral cat--no problems. Sitting down on a warm seat--uggh.

Just another in a litany of my not-so-deep-down psychological issues.