Archive for May, 2004
Saw Tim Burton’s Big Fish with B on Friday, and The Day After Tomorrow with Eva and Colin on Saturday. Big Fish was good, but not Tim Burton’s best. The structure was interesting, with cuts back and forth between the (dull) present and the (fantastic) past. The ending was predictable and the climax/pay-off felt forced. The final ending was really well done though, and felt more like a Tim Burton film than the build up to it.
The Day After Tomorrow was an excellent pop-corn summer blockbuster. The twisters in LA were thrilling, exciting. The flooding of New York was awesome. The water dynamics were pretty good - the computer-generated water had a massive and ponderous feel to it. (In reality the mass of the water would have probably swept Manhatten clean, but that would have shortened the movie somewhat). The dissing of the political establishment: very welcome. The opening sequence is great — it’s a bit like the opening of Ice Age, but played seriously. Suddenly a megaton of ice sliding around is no longer funny.
(spoilers below)
Continue Reading May 31st, 2004
B had found a chinese floral print top and looked quite adorable. We had dinner at Xích Lô, a viet/thai restaurant. B had chicken satay while I had grilled tuna. Xích Lô served up delicious and not-too filling dishes. B twisted my arm and we had an excellent coconut pie with ice-cream. They didn’t have cocoa, so we had a brisk stroll while looking for a quiet place for coffee and cocoa. We went to see Tim Burton’s Big Fish. We ended up talking late into the night again. At half past two I left a tired B to sleep and finish preparing her novel for submission to a new author contest — it has to be all done and submitted on tuesday, and like me she leaves things to the last possible moment. It had been a lovely evening, and I floated down the stairs and out into the spring night.
I’d gone a block down a side street on Grunerløkka when a drunk staggered up to me, begging for help. This guy was so out of it he could not stand up straight. He wavered about like he was on the pitching deck of a ship caught in a storm. He wanted to get on a bus to Hønefoss, but I figured I could escort him down to the emergency room at least. He wasn’t about to be let on a bus in his condition. He got a phone call from a buddy. Trying to talk and stand upright was too much for him, so he tripped on a cobblestone while staggering backwards. He fell. Hard. Knocked himself unconscious for a few seconds, probably concussed himself. Someone rushed over and checked his pupils and breathing while I was trying to get a name out of the guy at the other end of the phone. “Morten” was his name, and this was not unusual for him apparently. Morten came to and tried to speak. He babbled syllables incoherently — I worried that he’d hurt something serious when he fell, but he got better as time went by.
A nice couple stopped up and helped me carry him over to a doorway and called the police while I tried to keep Morten from walking off. After about five or ten minutes (it’s hard to tell when you’re supporting a wobbly human) the cops drove up and took over. They knew what to do and a minute later Morten was sitting down and the cops were trying to find out what (besides alchohol) he was on. I got home and collapsed into bed a bit after three am.
May 29th, 2004
Yay spring! Yay romance! Dating… I’ve never got the hang of checking up women in bars - I’m too shy. Online personals weren’t working - I haven’t had the nerve to try speed-dating yet. I’ve answered four different personal ads since March. Two of them turned out to be fronts for asian aunties who were trying to marry off their sweet-but-still-in-asia nieces, one was a dud (no chemistry), but this time B turned up.
We had hit it off well on the phone. We had laughed a little, so we’d agreed to meet yesterday. Butterflies looped the loop inside while I waited. She was lovely, quite pretty. Demure on the outside, but underneath a bit of a rebel. She’s smart enough to have chosen her own path. She’s not the techno-geek I am, but this is probably a good thing. Bookish, likes movies, literate, good looking. She writes — daily.
Time flew by unnoticed while we talked. We looked up and it was eleven o’clock. Hopefully the second date will go as well. I can’t wait.
(This seems dangerously like a teenager’s liveJournal. I’m not sure if this is a good thing…)
May 26th, 2004
Progammers often need to lay out stuff (widgets we call them) in a window, and to reposition things when the window changes size. This resize logic is usually tedious stuff, with lots of simple arithmetic, like this:
center_x = width / 2;
label_x = center_x - label_width;
txt_x = center_x;
label.SetPos(label_x, 40);
txt.SetPos(txt_x, 40);
txt.SetSize( width - txt_x - 40, 20);
This sort of logic is easy to write, but impossible to read. You can add comments to the algebra to make the intentions clearer, but that is really just polishing a turd.
A clever chap at work came up with the following superb little functions, which I’ve extended to handle the stretching needed to cope with resizing, and hence this little blog note to hopefully enlighten others out there.
The Widget class is extended with these functions: AlignAbove, AlignBelow, AlignLeftOf, AlignRightOf, StretchUp, StretchDown, StretchLeft, StretchRight.
These all take another widget as a parameter, and an offset to let you place a gap between the two controls.
The logic above becomes:
center_x = width / 2;
label.AlignLeftOf(center_x, 40);
txt.AlignRightOf(label);
txt.StretchRight(NULL, 40); // stretch to edge of parent window, minus 40 pixels
which is a lot more understandable than the algebra in the first example.
Now, this is mainly useful for those of us not working in the dotNet world, where a fully automated layout engine makes this a matter of pointing and clicking in the UI designer. But for everyone who likes to program the old-fashioned way, with a text-editor, I humbly submit this little programming pearl to make the inscrutable resize logic a little clearer.
May 22nd, 2004
The Confusion, Neal Stephenson
900 pages of bliss. Stephenson mixes opera with high-seas adventure yarns and it makes a satisfying and enjoyable read. The stories run from about 1680 through to 1701, weaving through most of Europe on the one hand, and across the world on the other. Fabulously entertaining and instructive too. The book touches on derivatives (both monetary and algebraic), monetary theory, naval tactics, alchemy, basic chemistry (including the manufacture of phosphorous from urine), and the 1600s history of kingdoms in Europe, North-Africa, India, and Mexico.
Death by Meeting, Patrick Lencioni
Short and cliched. You don’t read management literature for the story. The meat of this book is worth reading though: basically any sizeable organization will need to have meetings. Most meetings are dull and boring. Here’s how to have more interesting meetings:
1. have daily 5 minute check-in meetings to keep everyone on the same page.
2. have weekly hour-long meetings to discuss tactical short-term planning. Do a quick check-in at the start of the meeting.
3. monthly two-three hour long meetings to discuss strategy.
4. quarterly offsites.
To avoid being dull, create a culture of open debate where opinions can clash without fear of recriminations. This is easier said than done.
A Hat Full of Sky, Terry Pratchett
Just got this - oh joy! It’s another childrens book, but it’s got the wee free men in it, so Crivens! I need to go read som more.
May 22nd, 2004
Supremely silly and a brilliant use of the internet: infinite cats
May 12th, 2004
Molly came to visit! Briefly. A day of sunshine and happiness. An unannounced and unexpected flyby from the Girl Wonder, with just enough time to chat with her, Mark and April and Johannes while checking out Munch’s angst-filled paintings.
May 9th, 2004
Serendipitous late night TV movie watching: Hackers - the 1995 cyber movie. Seeing it again it’s obvious this movie was ahead of its time. It covered the internet and security issues much better than later movies (Sneakers and The Net, for example) even though it does all the usual hollywood hacking cliches: glowing floaty things in space, bogus floating equations (ooh look — E=mc2).
But I have to give it props of namechecking the Cyberpunk roots of the story: William Gibson (the Gibson mainframe they hack), Emmanuel Goldstein of 2600 fame, actual hex dumps and unix shell commands (a trick not seen again until Matrix Reloaded when Trinity roots the powerplant). The reference to “leet” hackers is cute, especially since the l33t hackers are about to get their own tv show. Love that!
May 3rd, 2004
Mucus is a funny word. Just say it out loud: “muuuucuuus”. I mention this now because I’ve spent the last week generating the stuff in voluminous quantities. I have a cold. A proper nose and throat cold with a touch of fever. I just managed to remember to send in my tax forms in my Nyquil induced haze.
The mucus showed up suddenly. Wednesday morning: fine, fit as a fiddle. Wednesday evening - mucus city! Cough cough. Snort! Snivel…
I had to work Thursday in spite of the cold because of various meetings with external clients. Probably infected everyone I met. Oh well…
Spread it around! Share and enjoy! It’s the gift that keeps on giving! I hate this - I can feel my strength draining away while I lie here in bed, trying to sleep while not choking on the mucus.
May 1st, 2004