Skip to site navigation

Andrew's diary

bleb.org > Writings > Diary
<<< 11/2006 January Feburary March April May June July August September October November December 01/2007 >>>

Saturday, 23 December 2006

Photo of NetSurf on the Nokia 770
Figured out how to port Glade-using applications to Maemo, and integrate them into the Hildon desktop. This allowed NetSurf's GTK+ port to work beautifully.

Some step-by-step instructions:

  • Add -lhildonwidgets to the gcc line somehow.
  • Change the class of a window from GtkWindow to HildonWindow in the .glade XML file.
  • In the C file which builds the UI, include HildonWindow and Glade builder:
    #include <hildon-widgets/hildon-window.h> #include <glade/glade-build.h>
  • Create a function to tell libglade how to create the HildonWindow:
    GtkWidget* glade_hildon_window_new(GladeXML *xml, GType type, GladeWidgetInfo *info) { return hildon_window_new(); }
  • Register that function with Glade before creating the window:
    glade_register_widget( HILDTON_TYPE_WINDOW, glade_hildon_window_new, glade_standard_build_children, NULL );

Menubars etc. can then be converted as per Sylpheed.


Thursday, 21 December 2006

Roland pointed out an interesting story on Steve Yegge's blog, called Parabola. It's an allegory about the pitfalls of type "safety" in a real-world scenario, largely - it seems - to point out the flaws in Java systems which have, inherently, poor API design as there are always scenarios the designers did not consider.

What would happen, though, if the story continued...

Parabola Redux

The airport security line was no longer a line at all. Indeed, it was an example of perfectly elegant system: the appearance of chaos with people pushing and shoving, but in fact they generally shuffled towards the velvet-roped entrance in an unerring ability to simulate sand running through an hourglass.

At its narrowest point, next to the velvet-roped entrance stood D.T. He'd not been in the job for very long: the airline management had heard glowing stories about his performance in previous jobs at florists, garages and the like. He was a people person, he exuded friendliness to everyone around, eager to prove and distinguish himself to management. Unlike his predecessor, D.T. wasn't a large, gruff, intimidating security guard. No, D.T. was positively svelte; a "well-being coordinator", as he liked to be called.

D.T.'s friendly, primary-coloured clothes weren't garish; and the simple, PlaySkool-like, font on his name badge belied the power he could wield.

Today, like any other day, the mob were pushing forward, the elegant machine letting them through exactly as intended.

Today, like every other day, the shortcut line - reserved for airline personnel - was empty. After all, sometimes the crowd were in the way; sometimes airline personnel were just plain more important.

Although... D.T. noticed someone at the back of the throng: no luggage, just a small carry-on bag and a child. A boy and his mother, presumably, looking for a way through, hoping the sea would part and let them on their way. The sea didn't part, though, and the woman raced down the empty shortcut line, her boy dragged behind her, bouncing like the rucksack on her shoulder.

"We need," she gasped, "to get through." Ever helpful, D.T. turned to look, raising an eyebrow at her bedraggled appearance: despite being friendly, he couldn't ever think of a circumstance in which he'd let himself out in public looking so... ordinary. Where was the colourful clothing? The clever naming?

"Our flight leaves in ten minutes and there's a family emergency. The ticket desk gave me this temporary pass. Please! Let me through."

D.T. remembered the story of Anushri: the resulting complaints and media coverage nearly bankrupted the airline and, most seriously, cost D.T.'s immediate predecessor, T.S., his job. His outwardly lax behaviour, however, didn't make him negligent. He looked at the temporary pass; it certainly appeared the right size and shape for a pass and the woman was eager to be let through. She wouldn't be so pushy unless she could be trusted, would she? After all, most people know what they're doing.

D.T. eyed her up once more, he evaluated the percentage correlation with his expected input and, finding a 99% match, let her and her son through. Happy that he'd been helpful and efficient, he turned back to the sand and let it once more trickle through the hourglass.

 

Ten minutes later, the plane blew up. It crashed to the ground and took out all the airline's customers.

Dynamically-typed languages have their uses, as do statically typed ones. But the strawman argument presented in Parabola is an argument against crap design, not type safety. Programmers make mistakes, if they didn't, we wouldn't need memory protection. The same principle applies to type safety. Sometimes you want to bypass Perl's "suggestion" of "be nice and don't poke into objects where you're not supposed to", but production-quality middleware systems need a defined API.

And let's not even get started on the benefits tools like Eclipse can bring to code quality and refactoring, which are that much harder with a dynamically typed language.


Friday, 15 December 2006

Some strange bug (food poisoning from the pub yesterday lunchtime/sausages at tea? stomach bug returned?) made me my second Christmas lunch/party in a row. Bah, humbug.

Made myself feel slightly better by ignoring the nausea and watching half of Red Dward VIII I got for my birthday.


Tuesday, 12 December 2006

TLC Direct stock rounded, coloured trunking which looks very swish and should go nicely up the corners of our room. Still, it'll have to be after Christmas once the tree's come down before we can put them all up.

Saturday, 09 December 2006

An expensive day: ordered new glasses and bought a set of B&W M1 speakers (with Yamaha subwoofer) from Sounds Expensive in Rugby. Now we've just got to work out how to route the cables: I think we'll go for under the carpet, and trunking up the walls. White box trunking on our nice cream walls could be a pain, though.

The cheap Technika DVD player's giving up as well - so we'll take that back to Tesco, get a refund and get a decent one; probably the Samsung HD-DVD860.


Friday, 08 December 2006

Worked from home: train problems aren't going to be resolved until Sunday - nothing to do with the Wii launch!

Thursday, 07 December 2006

Train chaos on the way home: a train pulled down overhead power cables somewhere around Milton Keynes, meaning that no Virgin trains were running up the West Coast Main Line from Euston. For Rugby, we were directed to St. Pancras, but the Midland Mainline staff weren't briefed, or expecting us, so the only way they could suggest to get to Rugby was to go to Leicester and change.

Instead I ended up in Kettering and Mel and Alex drove out to pick me up.


Tuesday, 05 December 2006

The VIA EPIA M6000 motherboard in the media PC has died: looks like a similar problem to that which affected coto. Decided to replace it with an M10000 Nehemiah motherboard, with a "silent" fan from QuietPC.com. It'll still be louder than the fanless solution we've got at the moment, but with a processor rougly twice as fast hopefully the menus in MythTV won't stutter and it'll feel more pleasant to use.

Monday, 04 December 2006

Trident is "essential" to maintaining a nuclear deterrent and a nuclear deterrent is "essential" for the next 50 years. Apparently.

But at a cost of £25,000,000,000 - that's a lot of money. My back of a fag-packet calculations works that out as 50 hospitals for 10 years (assuming annual running costs of £50m based on historic figures).

Do we really need such expensive weapons would never be used (can you imagine the political fallout from a nuclear attack hurting civilians?)? Two individual bombs ended World War 2, dropped from planes with relatively low yields. (One might even have done it). If Iran/Syria/North Korea need the threat of MAD to keep them inline, the thought of a "Little Boy" or "Fat Man" on Tehran/Damascus/Pyongyang should do it.


Friday, 01 December 2006

The migraine which has been "stalking" me for the last couple of days finally caught up with me.

Did mean a lot of sleep, though: I had time when everyone else was asleep to investigate Hildonisation of GNU Classpath to ensure all AWT (and possibly Swing apps) runing on the Nokia 770 fit into the rest of the Maemo environment (e.g. HildonWindows instead of GtkWindows).

Also released the third version of my Sylpheed port. A bit of bodgery's meant that all menus are drop-downs from the titlebar, rather than a menubar. Personally, I think the Maemo team would be much better off forking GtkWindow and GtkMenubar, rather than subclassing them: existing Gtk+ applications would then just need compiling to integrate nicely into the HAF.

Still, it should be straightforward to use the GtkWindow -> HildonWindow and menubar-modification techniques I've used in Sylpheed for other things.


<<< 11/2006 January Feburary March April May June July August September October November December 01/2007 >>>