the corner office

a blog, by Colin Pretorius

# Dum de dum...

Dooby doo... twiddling thumbs... how long does it take 3 megs of source code to compile? The weekend's been spent on a Theory of Programming Languages assignment. The last 2 questions need diagrams of call trees and activation records and fun stuff like that. Last year I'd been doing my assignments with MS Word and using Word's Draw tools which did a decent job of generating simple diagrams. On Linux and having to make do with OpenOffice now, alternative arrangements are needed. For most of my assignments this year, I've just printed out the typed-up pages and hand-drawn whatever diagrams I'd needed, and submitted the assignments dead-tree style. Since this assignment is fast approaching the less charitable definition of 'late', I don't want to have to schlep to a drop-off box tomorrow and wait days before UNISA marks it as received, so I want to submit it electronically (and preferably before the clock strikes midnight.)

This means I need me some diagrammin' software so's I can create jpegs and drop them into the document. I just read Tom Duff's review of a free software for dummies book, and he mentions Dia. I haven't used Dia since about 2002, when I tried it on Windows and where it looked so dog-awful with its old Gtk widgets, that I didn't spend much time with it. But it's just what I need now, so I'm in the middle of a quick download & compile. Here's hoping it'll do the job.

Apart from that, it's been a fairly uneventful week. I'm getting a bit more cosy with T-SQL these days, which is fun, with a chapter here and there I've made my way through book 7 of WoT and on to book 8, but getting next to no work done on the new blog app. Given the mountain of assignments I've got to catch up, that seems unlikely to change soon.

Hmm, Dia's compiled. Back to work...

(Update: three cheers for Dia. Although they could win a lot more first-impression kudos if they simply halved the default line thickness in diagrams, so that things looked professional off the bat instead of looking like they've been drawn with the graphic equivalent of a kid's crayon.)

File under: personal : {2005.07.31 23:14} : Comments (2)

# RSS feeds almost done

Some more work this afternoon, and RSS feed generation almost done. I've been using XOM for XML readin' and writin' because it's, well, simple. One of the things it does is virtuously and transparently handle escaping of characters in text elements. The way my current blog handles comment fields with inline HTML, is to wrap everything in a CDATA secion. That's a rather naughty kludge, and dissed rather soundly by XOM's author, Elliotte Rusty Harold in this mailing list thread.

In spite of it being bad and wrong, I remain attached to the kludgey solution, least of all because I'm not sure what it all means for quick and dirty inling of HTML and keeping it distinct from inlined escaped characters meant to represent HTML in the content itself. I suppose there are vays and means which require fancier DTDs and the like, but if CDATA is wrong, baby, I don't know if I wanna be right. So to speak.

File under: thee_blog : {2005.07.24 23:48} : Comments (0)

# TCO v2 progressing nicely

I've spent a few hours on version 2 of The Corner Office this weekend, and I've made some good progress. The reader-facing stuff is quite close to complete, with a brand new look and feel and a few more 'bloggy' features to complement what's in the current Domino-based design. What's needed now is the back-end 'admin' functionality, and I'd be lying if I said it was the kind of work I'm relishing. By and large it's just forms & views and displaying and validating and persisting, and that's never thrilling.

That gets me to something of a cross-roads in this blog's design. When I started work on the blog, I decided to use a PostgreSQL backend, and so my data layer is basically good old JDBC code. I've come across two Java blog projects recently, Blojsom and Pebble, and what's intrigued me about both of them is that they don't use a database at all - everything's stored on the file system.

There are a few things about this that appeal to me. In a memory-lean hosted environment, avoiding the overhead of a database server is worth something, even it means more heavy lifting to access, categorise, index and store raw data. (Another way to look at it is that for a small blog, the meg-or-few saved on not having to worry about an RDBMS is available for cacheing.) The blog data is also more accessible. It means that a lot of 'admin' work can be done via SSH, vi and rsync, and means I can leave out or postpone building some of the web-based admin functionality. Above all, it presents a few interesting problems to solve, which will be useful for some pet projects I want to get going with as soon as the blog is done.

The one question I haven't answered for myself is performance. File system versus database? It seems to be something of a religious war. There's a fair amount of argument in both directions, even when it comes down to pure performance. The intuitive argument (which I tend to side with) is that file system access is faster, but the problem is exactly that - many comments or answers on mailing lists might be based on the 'obvious' answer that a file system must be faster, because, it's just obvious, dammit. But when you dive into issues like index structures, data storage formats, number of system calls, and the like, it's not that cut-and-dried, especially when you're going beyond simple 'find file x' scenarios. Apart from getting to the data you need (ultimately, a file system requires index tree traversal, much the same way an RDBMS does), you have to weigh up decoding of data records in C code, being serialised, flying up and down a TCP/IP stack, and being re-parsed by JDBC, to straight-up file I/O, but having to worry about XML parsing in slow(er) Java, etc. I suppose the only way to know for sure is to benchmark both, but that's not top of my priority list right now. It's safe to say though, that the performance differences are going to be slight enough for a quiet blog like mine, that I can afford to worry more about other issues like simplicity, memory and functionality.

It would be nice to know for certain, though.

Thankfully, the blog design is nicely tiered, and so if I do move away from database storage, it's just a case of implementing a new data layer, and if it turns out to be a problem, I can always move back.

File under: thee_blog, techie : {2005.07.23 23:34} : Comments (0)

# Microsoft Windows Vista

OK, so the name Longhorn was ripe for punning and abuse, but I've read a few mentions that Microsoft's Longhorn will be called 'Vista'. Yes, it conjures the wide open plains and wanderin' cowboys and stuff. I'd still prefer Longhorn, which has bucketloads more character.

I took a squizz at dictionary.com, and (part of) one of the definitions for vista:
A distant view or prospect
No surprises there.

File under: techie : {2005.07.22 22:10} : Comments (0)

# A less cheerful view of humanity today...

The attacks in London today didn't result in casualties - it seems the bombs didn't go off, and another tragedy was averted. It's still pretty damned sobering - if 2 weeks ago wasn't a once-off, just how many more attacks do these people have planned?

On another note, Vaz doesn't like the draft Iraqi bill of rights. I don't blame him. Lovely stuff - Sharia Law, a woman's duty to her family, dripping with hatred of Israel and Israelis, personal freedoms subjugate to 'moral values and public decency' blah blah. No small irony if after all the bloodshed in Iraq, the country gets 'liberated' just so that it can become another medieval hell-hole, like Iran.

(Update: having read through the document Vaz links to, the anti-Israeli stuff seems to have been removed in later drafts, and to be fair, there's a lot of nice touchy-feely stuff about equality and protection under law and all that stuff - but all with the rider that if it conflicts with Islam and Sharia law, well, sorry for you. Perhaps it is a reasonably balanced document for a conservative country very mindful of its main religion. Let's be honest, you could swap the world 'Islam' with 'Christian' and by and large it's a document that many of the Christian Right would say is eminently reasonable, nay, desirable. Having said that, the issue remains: qualifying fundamental rights with 'subject to Sharia' means they're not really being regarded as fundamental rights at all. Least of all if these qualifications end up being loopholes to allow or turn a blind eye to the kinds of abuses that happen in Iran and other Middle Eastern countries. Then again, to be fair, it's not like our own South African Constitution is bullet-proof when it comes to special interests, and we've done OK so far.)

File under: politiek : {2005.07.21 21:18} : Comments (1)

# Map o' the moon

To celebrate the anniversary of the first moon landing on 20 July 1969 (a whole 3 years before I was born), Google has launched Google Moon.

If today is a celebration of technology and progress, you have to stop and consider the incredible, dizzying progress and strides in technology that allows a gazillion Joe Schmoes across the world to sit at their PCs, and at next to no cost, connect to other computers halfway across the planet, and download and view incredibly detailed maps and pictures of the planet around us, and our moon. And not only that, but write up their thoughts about it, and make those thoughts available to people from every corner of that planet. We really are amazing creatures.

As an aside, Google haven't lost their sense of humour - visit the moon.google.com home page, and push the slider all the way up ;-)

File under: techie : {2005.07.20 23:08} : Comments (0)

# And even more reading...

Finished off book 6 on Sunday, and started on book 7. Did next to bugger-all else the whole weekend, which was wonderfully self-indulgent (as was the mountain of fudge we bought on Saturday evening ;-), but I'm starting to feel a bit guilty about the university assignment backlog.

The other cool thing I tinkered into a working state was moving one of my machine's hard drives to an external USB drive. We got the drive case (and a new monitor for Ronwen) from pcmall.co.za on Friday. I gather they're rather new (but the 'web' front-end for a longer-standing IT outfit), and was (pleasantly) surprised to get a rather warm reception when I popped in to collect the goodies from their offices. Decent prices and decent service; I can see myself doing some more shopping through them in future.

File under: personal : {2005.07.19 21:49} : Comments (0)

# More reading

Oh, and polished off Book 5 of the WoT this evening. I'm a bit behind with varsity assignments, but Book 6 was sitting on the bookshelf looking so pitiful, saying 'start reading me... start reading me...'

File under: personal : {2005.07.12 23:01} : Comments (1)

# The month's Gentoo update

This month's emerge world has been a royal pain. After I got past the initial broken ebuilds (thank heavens for the Gentoo forums), I'm now at my third attempt at upgrading to OpenOffice 1.4.whatever. The first try, on Sunday night, conked out after my root partition ran out of disk space. So yesterday, after I did some clearing up, and with what I'm sure was a gig and a half free on that partition, I restarted the compile. And again, today, when I looked in, it had bombed out again with no free disk space. Madness. I suppose with 200 megs for the source code tarball, then unpacked, then compiled, and whatever other voodoo portage does, then the whole glop needing to be 'installed', a gig and a half could go rather quickly. OOo is pretty much essential on a Linux desktop (AbiWord and Gnumeric are close but no cigar contenders), but this is just one more reason for me not to like the package one bit. Bloat bloat bloat.

Two other fairly significant changes in my Linux desktop adventures. The first was scrubbing KDE from my system. I've always preferred KDE over Gnome, but the 3 apps I spend 99.9% of my time in - Firefox, Thunderbird, and Eclipse, are all GTK apps, so even when running KDE, there's a near-complete Gnome subsystem chugging along in the background. So a month or few back, I switched to Gnome and I've been using it steadily ever since. It's not without its frustrations, but it's grown on me - enough to realise that there's very little reason to keep KDE hanging around - least of all having portage download and compile KDE upgrades every time I update my system.

The other milestone was giving up the FAT32 partitions and moving all my stuff to native ext3 partitions. When I first got going with a Linux desktop, I kept most of my 'stuff' on a FAT32 partition, so that I could share everything between Windows and Linux. FAT32 doesn't seem to do time stamps very well though, and I ran into a good few hassles with Eclipse freaking out about files being out of sync on the file system, and Thunderbird constantly re-indexing mailboxes (presumably because it thought the indexes were corrupt). But truth be told I boot into Windows less than once a month these days, if that much, and so I shuffled everything around, ditched FAT32 space and converted most of it to ext3 space. No going back now...

File under: techie : {2005.07.12 22:44} : Comments (3)

# Honest Injun

Waaay back when I was a kid I remember watching - hmm, it must've been Three's Company, and there was a line where Jack was all heartbroken about someone lying to him or breaking up with him or something, and the line went something like "(s)he even said honest injun" and the other person went "oh, honest injun, that's low" and made sympathetic mortified sounds and cue canned laughter.

The problem was that back then it just sounded like "onnastinjin" and I never knew what the hell it meant. Easily two decades later, that phrase would still come back every now and then and bug me 'cause I had no idea what this 'onnastinjin' thing was supposed to be. Then a few minutes ago, with mp3s of some obscure and long-forgotten goth band that I've listened and re-listened to a zillion times over playing in the background, I sat up and caught a lyric 'blah blah honest indian (with emphasis) blah blah'. "Hey!" thoughts I as a few synapses fired, and after a quick google I found a discussion on the etymology and meaning of the phrase "Honest Injun."

My life is now complete.

File under: personal : {2005.07.07 21:26} : Comments (0)

Next »

meta

-home-
about
contact
disclaimer
articles
code
tech blog

style: [?]
[plain.dark.blue]

Categories

java
linux
music
notes/domino
personal
politiek
studies
techie
thee_blog
world

RSS Feeds

rssfeed all posts
rssfeed all cmts
rssfeed tech posts
rssfeed tech cmts

Archives

2010.09
2010.08
2010.07
2010.06
2010.05
2010.04
2010.03
2010.02
2010.01
2009.12
2009.11
2009.10
2009.09
2009.08
2009.07
2009.06
2009.05
2009.04
2009.03
2009.02
2009.01
2008.12
2008.11
2008.10
2008.09
2008.08
2008.07
2008.06
2008.05
2008.04
2008.03
2008.02
2008.01
2007.12
2007.11
2007.10
2007.09
2007.08
2007.07
2007.06
2007.05
2007.04
2007.03
2007.02
2007.01
2006.12
2006.11
2006.10
2006.09
2006.08
2006.07
2006.06
2006.05
2006.04
2006.03
2006.02
2006.01
2005.12
2005.11
2005.10
2005.09
2005.08
2005.07
2005.06
2005.05
2005.04
2005.03
2005.02
2005.01
2004.12
2004.11
2004.10
2004.09
2004.08
2004.07
2004.06
2004.05
2004.04
2004.03
2004.02
2004.01
2003.12
2003.11
2003.10
2003.09
2003.08
2003.07
2003.06

© Colin Pretorius