|
|
Tuesday, November 10th, 2009
| |
9:32 am - Hibernate and MySQL timeouts
|
Oh my.
This seems to be a common problem with using Hibernate and MySQL. MySQL is conventionally configured to drop connections after a period (8 hours). The standard advice (which is good) is to use a connection pool.(The advice to drop the wait timeout in mysql for testing purposes is also good, since your testing cycle time is otherwise creakingly slow.)
However, I was still getting timeouts, no matter what I did or what combination of parameters that I set. What seems to be the problem is that I wasn't letting go of hibernate sessions properly. I has kind of assumed that, when I make a web call, thread-based sessions get cleared up on exit. Since hibernate allows for long-running sessions, this is wrong, wrong, wrong. What's needed is either neat code that properly cleans up or an interceptor implemented as a servlet filter that cleans up on exit. Like this, in fact.
current music: The Moodists - The Disciple's Know
|
|
(comment on this)
|
| Wednesday, September 23rd, 2009
| |
9:47 am - Software as a Share House
|
With a considerable debt owed to He Died with a Felafel in His Hand1
- Free Software
- is the control-freak vegan. She insists that the dog is fed lentils until it can fly around the room at mach-1. She throws a massive tantrum every time she comes home and can smell sausages. She keeps on trying to insist that the household should buy a complete new set of saucepans, just in case the old ones have been used to cook meat. She's an "artist" and is "working on a big project". She posts the list of house rules on the fridge and monitors the kitty. She can explain the reasons for her decisions in detail and will do so until your ears bleed. Her inflexibility attracts cohorts of teenage boys, who think she's cool.
- Linux
- is free software's boyfriend. Pretty easy-going, he spends a lot of time acting as a sort of buffer between his girlfriend and practically the entire universe. He's a cabinet maker and lots of people want his work, since it's very solid. His girlfriend insists on co-signing all his work, on account of her "creative input." You'll often find him sleeping on the couch, when he's got fed up with the monotonous diet and has snuck out for a steak.
- The Open-Source Collective
- A labyrinth of rooms at the back of the house, some smelling of bong water, some pumping out viking metal at hazardous volumes and some containing desiccated corpses, contains a floating artists commune pumping out endless paintings, group shows and installations. Everybody is sleeping with everybody else. The collective is on pretty good terms with Linux and borrow his power tools all the time, returning them polished and sharpened. Free Software's teenage admirers usually get sucked into a room, after a while.
- Apple
- is an immaculate clubber, always perfectly dressed and stepping carefully over the left-over food on the floor in the living room. His room is exquisitely decorated and perfectly clean. At least, that's what the rest of the household see when they sneak a look through the door, since nobody is allowed in the room. Ever. Occasionally, he brings people back from outside the house. They vanish into his room and are never seen again. He never does the washing up, claiming that he has a private dishwasher in his room.
- Microsoft
- is a monogamous couple of bank tellers. They spend their time oscillating between telling the rest of the household to "get a real job", ostentatiously ignoring them and being barely aware that they're in a share house. Grossly overweight, they spend their time on the couch, watching TV and eating off trays. One of the collective secreted a webcam in their room one night and filmed them having sex; the rest of the household spent a lot of time sniggering over the result, but everybody watched it. His mother occasionally shows up and tries to force the rest of the house to move out. They're the only ones with any real money.
- Sun
- works at the same bank as Microsoft, but in the IT department. She wears a short skirt and a long jacket and is a bit older than the rest of the household. She moved in after her marriage broke up and was short on cash.
1 The fun book, not the dreary movie.
current music: The Trilobites - I wish it could be 1965 again
|
|
(comment on this)
|
| Wednesday, September 2nd, 2009
| |
8:56 pm - One. two, three. four. I declare a thumb war!
|
One of the delights of school-age children is learning all the new lore and language1 that comes from the school-ground. I've always thought that "paused" for temporarily being out of a game because you've got a stich or such-like was very clever.
Before going to bed tonight, we were having a thumb-wrestling tournament and there's now a little rhyme to ensure that both players start at the same time.
1 My mother has a book called The Lore and Language of School Children from the 60s. A fascinating read.
|
|
(comment on this)
|
| Thursday, July 16th, 2009
| |
1:20 pm - Choose Your Poison
|
|
| Monday, May 18th, 2009
| |
3:17 pm - On re-reading Count Zero
|
I find the story just fine, the voodoo still very interesting, the characters well-drawn.
And the constant use of brand names and the obsession with clothing like a spoilt teenager that can't shut up. At first I thought it was a bit of characterisation for Turner. But they're all like that.
current music: Mozart - Krönungsmesse
|
|
(comment on this)
|
| Thursday, January 15th, 2009
| |
8:07 am - First Morning at the Whitehouse
|
I have the perfect tune for the Obamas when they first wake up in the Whitehouse.
Obamas in pyjamas are coming down the stairs Obamas in pyjamas are coming down in pairs ...
Original lyrics here.
It does make me wonder who the Rat in the Hat is, though. And also whether the Obamas will be able to say "Are you thinking what I'm thinking O1?" "I think I am, O2!"
|
|
(comment on this)
|
| Sunday, October 12th, 2008
| |
12:47 pm - Serendipitous Recipe
|
Someone has probably done this before, but this was something I accidentally discovered when running out of plain flour.
Rhubarb Cake-Tart
Pastry: Castor sugar, equal amounts of plain and self-raising flour, butter, milk. Rhubarb: Rhubarb, sugar Custard: Sugar, eggs, milk, vanilla
String and cut the rhubarb and cook with sugar and water until soft. Make the pastry as for sweet short-crust and blind bake in tart tin for 20 minutes. The "cakestry" should rise. Spread the rhubarb in the bottom of the tart and pour the custard over. Bake for 30 minutes. The custard will seep into the base. Eat with cream.
|
|
(comment on this)
|
| Wednesday, October 1st, 2008
| |
10:30 am - Radio Birdman SVG
|
|
| Friday, September 26th, 2008
| |
8:39 pm - How to ruin a really expensive car with a 52x11cm piece of metal
|
Driving in to work this morning, I'm variously in front of or behind a Lotus Elise. A really beautiful car, making me feel that I'd suddenly fallen through time and was driving next to a space car. I was filled with an oddly contented wistfulness.
Until I saw the number plate, "TUF 1", which might has well said, "Not only is my dick is shriveled and tiny but I'm also going through my mid-life crisis." And the feeling vanished.
|
|
(comment on this)
|
| Wednesday, June 4th, 2008
| |
10:41 pm - Just for the record
|
I really, really hate Samba.
I've been using it for nigh-on 8 years now to provide file access for my various home windows machines. I absolutely dread Alison saying, "My computer won't let me access something that I could yesterday," since I know that I'm in for an inexplicable mess of things which explode every prime-numbered time, confusing options that are attached by bits of string and wood glue to other confusing options and closets full of robot chainsaws trying to get out.
After 8 years, I can usually expect to be pretty much on top of most packages that I use. But not samba. I've read the documentation, I've bought books (which are usually inexplicably out of date the moment that they land on a bookshop's shelves) and I've trawled the web. And, every time, after hours of fiddling and peering at useless log messages I end up resorting to witchcraft. I've tried using swat and the fedora and SuSE configuration GUIs and I might as well have not bothered, since they're basically just the smb.conf file tarted up with some labels and boxes.
After Alison got a Mac, I could see the end in sight. However, it appears that the mac expects/prefers smb to talk to other machines and one package needs to be embedded in the amazingly cool VirtualBox running Windows. I'll never be free.
current music: Steam hissing out of the ears
|
|
(2 comments | comment on this)
|
| Sunday, April 27th, 2008
| |
6:06 pm - Earth Hour: No good done but no harm done either
|
On 30 March, the family dutifully turned out the lights for an hour. I'd raised my doubts about Earth Hour before doing so but there's nothing wrong with playing with candles for an hour and Matthew (8) and Marina (6) were definitely looking forward to the whole event. Marina was very excited by the whole affair and declared herself in favour of global warming; which is a bit of a warning sign.
Prior to Earth Hour, I'd been doing a little research into the relative CO2 emissions of light bulbs, candles and oil lamps and I'd come across graph showing the effects of the 2007 Earth Hour on demand. This uses the freely available demand data from Nemmco. So I resolved to do the same thing when the March 2008 data became available.
The 2007 analysis used as a comparison demand curves that looked similar to the curve on the Earth Hour date. I couldn't figure out how they were arrived at, although it looks like they were chosen to match the pre-Earth Hour demand. I wasn't too happy with this selection method, so I chose to use the correlation functions of excel and look for days that had the highest correlation with the Earth Hour day. I also wanted to look at the weather and see if that had any effect, since the curves can be quite variable.
My data sources are Demand data: http://www.nemweb.com.au/mms.GRAPHS/data/DATA200803_NSW1.csv Weather data: http://www.bom.gov.au/climate/dwo/200803/text/IDCJDW2124.200803.csv
You can get a (zipped) copy of the spreadsheet that I've used at http://www.charvolant.org/~doug/earthhour/EarthHour.zip.
First off, here is the complete set of demand curves for the month:

The demand curve for 30 March 2008 has the purple triangles along it. As you can see, there is quite a range of consumption curves. However, they all show a similar shape, rising to various levels in the afternoon, with a small peak around 1900-2000 and then a decline in the late evening.
The curves with the closest correlation to the Earth Hour day were those of 2 March 2008, 23 March 2008 and 9 March 2008. Surprise, these days are all Saturdays. The curves for these days are:

Or, zoomed into the Earth Hour region

First off, these show almost identical profiles, suggesting that Earth Hour doesn't have much of an effect on anything. The reductions in power consumption that are claimed seem to happen anyway without people turning off their lights. This also suggests that Earth Hour doesn't create an offset spike in electricity as claimed in the original 2007 analysis. The spike seems to just be a basic feature of Saturday nights.
Since total electricity use is pretty variable, I then normalised the demand curves so that they showed the same total consumption per day and then ran the same excercise. I ended up with the same days and the following graphs

and zoomed

Although there seems to be a minor jump post-Earth Hour, there doesn't seem to be anything to choose between the graphs. Earth Hour doesn't seem to have any effect whatsoever.
As a side note, I also looked at the effects of temperature and day of the week on daily consumption:

Although the shapes are interesting, it would probably require greater statistical skills than mine to tease out the relationships here.
So what do I think about all this? I'm amazed that Earth Hour could have so little effect for good or ill. I was at least expecting something. I'm never comfortable with symbolic gestures but this seems to be a completely empty gesture. Arguments that it somehow shows commitment or makes people "aware" or raises profiles strike me as essentially damaging; you're going around saying that you've done something when you've done nothing. All it seems to do is feed people's moral vanity.
current music: TV
|
|
(9 comments | comment on this)
|
| Sunday, March 30th, 2008
| |
11:02 am - New-Aged Out
|
Saturday was a day for waffly newaginees.
More on Earth hour later, after I have had a look at the Nemmco demand curves properly -- I'm waiting for the update to the demand data. (Although it looks like the demand spike from the 2007 Earth hour has appeared again if, if the day-graph is anything to go by.)
The afternoon was spent by Lake George for the Werriwa festival dance program. The dance was very good and it was all good fun. However, "asking permission to go on the lake out of respect" is utter bullshit. If there is an entity that is "the lake" it's unlikely to have a completely non-human idea of how things work. As it is, "asking permission" is nonsense, unless there is a way for the lake to say, "no." Instead, the whole ritual is just an anthropomorphic conceit, pretending to have a respect for something you were just going to do anyway. Proper "respect" involves gathering information, thinking about your decisions and then acting on them.
|
|
(comment on this)
|
| Friday, March 21st, 2008
| |
8:33 am - Music Meme
|
Seen via Andrew Wheeler.
Name your top 10 most played bands/artists on iTunes/FM/music player, etc., then answer the questions.
Last.FM makes this easy.
1 XTC 2 The Cruel Sea 3 Shriekback 4 The Cramps 5 Models 6 Talking Heads 7 The Pretenders 8 Iggy Pop 9 The Church 10 The Clash
1. What was the very first song you heard by 6? (Talking Heads)
Once in a Lifetime One of those, "Oh my God, That's just amazing!" moments.
2. What is your favorite album of 2? (The Cruel Sea)
Very hard to choose. Probably This is Not the Way Home but they've all got multiple good tracks on them.
3. What is your favorite lyric that 5 has sung? (Models)
It would have to be the lyrics to Two Cabs to the Toucan. But I can't reproduce them since Sean Kelly's singing style means that I would only be guessing at the lyrics. Listen for yourself
4. How many times have you seen 4 live? (The Cramps)
Three times.
5. What is your favorite song by 7? (The Pretenders)
Don't Get Me Wrong since I'm also an Avengers fan.
6. What is a good memory you have involving the music of 10? (The Clash)
Listening to London Calling in a thunderstorm and feeling the chill of destruction.
7. Is there a song of 3 that makes you sad? (Shriekback)
Beatles Zebra Crossing
8. What is your favorite lyric that 2 has sung? (The Cruel Sea)
From Black Stick:
My heart is a muscle and it pumps blood Like a big old black steam train My veins are the tracks And the city is my brain My stomach is the ocean and it swallows up the sun At the end of a summer's day My breast like a breeze Blows all those storm clouds Away
9. How did you get into 3? (Shriekback)
A friend played All Lined Up and I was hooked.
10. What was the first song you heard by 1? (XTC)
Jumping in Gomorrah from Go 2
11. What is your favorite song by 4? (The Cramps)
One of Bikini Girls with Machine Guns, Goo Goo Muck or The Crusher but don't ask me which one.
12. How many times have you seen 9 live? (The Church)
Never. I think.
13. What is a good memory you have involving 2? (The Cruel Sea)
Listening to This is Not the Way Home in a failing car on a dusty road North of Mildura and realising that it was the perfect song for the occasion.
14. Is there a song of 8 that makes you sad? (Iggy Pop)
From Iggy Pop? Be serious.
15. What is your favorite album of 5? (Models)
Cut Lunch is an EP. Local and/or General for overall consistency. The Models songs are always interesting but some hang together better than others.
16. What is your favorite lyric that 3 has sung? (Shriekback)
From Fish Below the Ice:
The sound of a satellite, Screaming, "Get me down!"
17. What is your favorite song of 1? (XTC)
Hard. Very hard. Very, very hard. English Roundabout?
18. What is your favorite song of 10? (The Clash)
London Calling
19. How many times have you seen 8 live? (Iggy Pop)
Once. In Cardiff, I think. Or maybe twice, then.
20. What is your favorite album of 1? (XTC)
I'll take the mid-early ones. Drums and Wires, White Music, Black Sea, English Settlement
21. What is a great memory you have considering 9? (The Church)
Lying in a park stoned and listening to Under the Milk Way
22. What was the first song you heard by 8? (Iggy Pop)
I'm Bored, The Passenger or Dog Food I don't know which.
23. What is your favorite cover by 2? (The Cruel Sea)
The Cruel Sea do lots of covers but I don't really know which are and which aren't. All artists borrow, great artists steal.
|
|
(comment on this)
|
| Thursday, February 7th, 2008
| |
10:11 am - Militant Agnosticism
|
|
| Monday, January 14th, 2008
| |
10:36 am - The Golden Compass, the Catholic Church and Scientology
|
I went to see The Golden Compass about a week ago. All very good fun.
Afterwards, I got thinking about the ho-ha about its supposed anti-Catholic naughtiness. Nicole Kidman, a cradle Catholic, feels that the movie isn't anti-Catholic and I like ross_teneyck's comment that the Magesterium feels more like a version of the church where Lucifer has won the battle to take over heaven.
The Magesterium is a creepy and authoritarian religious organisation. However, in the film, it draws visually from Star Wars' Empire as much as anything. All I can conclude from the complaints is that the Catholic League is suffering from a case of bad conscience.
However, the Magesterium also displays a distinct technological bias, with machines for separating children from their souls.
For Kidman at least, it may be that the Magesterium is considerably more representative of Scientology.
Personal views on religious matters: I'm an agnostic who thinks that black is a colour and that zero is a number. I have family connections with the Anglican church and a considerable amount of respect for the members of the Anglican clergy that I have had contact with, who go out of their way to provide pastoral care for anybody they think could do with it.
current music: Shriekback - Waterbaby
|
|
(comment on this)
|
| Wednesday, January 2nd, 2008
| |
4:29 pm - On the fetishism of building from source
|
The first bit of the documentation[*] of almost every open source program covers downloading and building the program from source. This strikes me as one of those odd historical left-overs, such as bows on men's dress shoes or putting a fake head on a horseless carriage. It also strikes me as being a little fetishistic, as if by doing so one can invoke the brave days when open source programs were written by programmers for programmers, and the analogy is more like one of those odd left-over bits of winter solstice ritual that you find embedded in Christmas.
[*] If it exists and isn't for some version lost in the mists of time, of course.
current music: Einstüerzende Neubauten - Yu-Gung
|
|
(6 comments | comment on this)
|
| Tuesday, January 1st, 2008
| |
10:13 am - My phone thinks that 2008 is a telephone number
|
|
| Saturday, December 29th, 2007
| |
9:41 am - Kicking an own-goal
|
I've received in my inbox what can be best described as a looney rant on the subject of muslims in Australia and how they don't adapt. So far, so bad, although I thought better of the person forwarding it to me. What caught my eye, though, was the passage:
'In God We Trust' is our National Motto. This is not some Christian, right wing, political slogan. We adopted this motto because Christian men and women, on Christian principles, founded this nation, and this is clearly documented. It is certainly appropriate to display it on the walls of our schools. If God offends you, then I suggest you consider another part of the world as your new home, because God is part of our culture.
One problem here. 'In God We Trust' is the national motto of the United States. Australia doesn't have an official national motto and the unoffcial one is 'Advance Australia'.
Sauce for the goose is sauce for the gander?
|
|
(comment on this)
|
| Wednesday, December 19th, 2007
| |
3:09 pm - Undeadlines
|
Most of the deadlines I seem to have to deal with are purely artificial, conjured into place because someone has pulled a date out of thin air to satisfy an equally gaseous demand for a date. At some point, a ritual denunciation of a random scapegoat is made and the whole thing is repeated.
I propose the term undeadline to describe these artefacts. I can think of at least three versions:
- Zombiline
- The zombiline slowly shuffles forward in the hope of meeting a target that stays out of range by a constant amount.
- Ghostline
- Nobody believes in ghostlines. They're just scared of them.
- Vampireline
- An overlord does believe in the vampireline, in the process sucking the life out of all those who fall victim to their delusions.
current music: The Pogues - Young Ned of the Hill
|
|
(comment on this)
|
| Wednesday, November 21st, 2007
| |
10:10 am - Must work harder!
|
Seen via matt_ruff

(Although I find the surreptitious sneaking in of a "cash advance" advert into the linking HTML a bit off.)
current music: Shoenberg - Pellas und Melisande
|
|
(comment on this)
|
|
|
|
|