the corner office

a blog, by Colin Pretorius

Sharity

I discovered a new word this weekend: 'sharity'. There seem to be a few unrelated software products with that name, but it also refers to music buffs who rip their old, out-of-print vinyls to mp3 and share them on the Net. Since these albums have never made it to CD, and might never make it to CD, the copyright implications seem fairly innocuous.

I can't imagine these vinyl free-for-alls will last forever though (as one blogger said, all it'll take is for someone to post a bunch of 80's Madonna vinyls and they'll all get sued), but in the meantime, following these 'underground' bloggers, many of whom are encyclopaedically clued up, is a cool way to expand one's musical horizons.

{2006.04.17}

V for very busy

The blog's been quiet, I've been busy. I'm all Java'd out and have been spending some quality time in the lands of C and C++, and immersing myself in Kraut rock. Life is good.

Saw V for Vendetta. I can understand why it caused a bit of a stink. Notwithstanding the fairly obvious digs at contemporary US politics, the themes are universal: don't trust governments, sacrificing liberty for safety is a perilous choice, the day will come when the lowly ones will rise up and make the bugger's eyes water, etc etc. Under the broad stroke of 'totalitarianism', the movie takes on interventionism in all its forms, from nanny-statism and social engineering to save-me-mummy militarism and nationalism. It's classic liberalism 101 with knives and Natalie Portman. Cool.

{2006.04.15}

Proudly NOT South African

Commentary have moved from a local to international hosting service, because their growing bandwidth requirements were about to become rather costly. On local mailing lists I follow, 'go overseas' is probably the standard answer when people ask about hosting.

It might not be a bad thing to start a 'Proudly NOT South African' meme. If it took off, it might highlight the problem that local hosting providers face.

Telkom's monopoly and overpriced bandwidth costs means there's no way that local companies can compete with international providers, even for local traffic. This isn't abstract 'Telkom is Evil' ranting, this is a very clear instance where local companies, and consequently our local economy, and currency, are being hurt because of Telkom.

Then again, maybe not. I'd fully expect some wally to suggest that the solution to help local companies is to just ban people from hosting overseas.

{2006.04.09}

Bike restorery

My brother-in-law-to-be was here for a couple of days, and he's taken my old Honda CX500 down to Durban. It's going to a good home. He and his in-laws, aka the 'after-Wednesday-night-family-dinner-amateur-motorbike-restoration-club' were looking for a new project, and will be giving it a good dose of TLC and restoring it to its former glory.

I haven't ridden the bike in maaaaany years, and was well past realising that I'd never get around to fixing it up like I'd always wanted to. I'm glad I was too lazy/sentimental to flog it over the years, though. Now not only will the old beauty get the treatment she deserves, but I'll get to take her for a few spins when she's done ;-).

(Apropos: Rocky Oliver's bike post).

{2006.04.09}

Memory monitoring

Eclipse is holding up pretty well after the weekend's PermSpace changes. I allocated 128 megs to PermSpace, and no hassles since then.

I purposely didn't specify any heap settings, because I wanted to play around a bit, after I'd found two really nifty freeware tools which are like the modern geek equivalent of those custom oil pressure gauges that were standard kit for 1980's Ford Cortinas and souped-up Alfas: the Kyrsoft memory monitor and status monitor both tell you how much heap space your workspace is using - the one with a pretty graph view, and the other a small bar on your status line.

The status line monitor does the job quite nicely for me. In addition to providing info about memory usage, the plug-ins allow you to explicitly invoke the garbage collector, and set warnings for when you're running low on memory. Rather nifty.

{2006.03.30}

The Gillette Singularity

The Economist ran an article about razor manufacturers going ape with the multi-blade razor thing. They have a graph which suggests that we'd hit 14-blade razors in 2100. Then (via Unqualified Offerings) a feller named Avram Grumer noticed something else:

Now, that power-law curve predicts 14-bladed razors by the year 2100, but that’s not the interesting curve. The interesting curve is the hyperbolic one, for two reasons: One, it matches the real-world data. And two, it goes to infinity in 2015. And how are you going to get an asymptotically-accelerating number of blades onto a razor? Why, you’d need godlike super-technology to do that.

Right. There it is, proof of the approaching Vingean Singularity, sooner than anyone expected it, clear as the chin on your face.

This is quite topical because we were discussing razors at work the other day. I got my very first razor, a 2-blade Gillette Contour as a birthday or Christmas present in '87 or '88 - I don't remember which, except I think it was '87 because our mate D moved to Welkom in '88 and he started shaving after me even though he needed to sooner 'cause he was a hairy bugger and he started getting the man-tendrils going on the sides of his face and the whole lot.

I digress. My coming-of-age Gillette Contour served me faithfully until early last year, when it finally broke. I got a cheapo replacement 'stalk' and ran down my remaining stash of Contour blades. I was adamant I wasn't going into this whole n-blade hype thing and would stick with a 2 blade razor - except that suddenly Gillette Contour blades were off the market, so I had to use dreadful no-name brands from the supermarkets that had that 'made in China and we sure as hell aren't gonna use 'em. Bleed imperialist white scum bleed' look to them.

Those were not happy shaving days. Eventually I decided that I had to put pride in pocket before I got permanent scars, and took myself off to the local Clicks. It was touch and go, but I got one of them fancy 3-blade Gillette Mach3 jibby-jobbies. I came home, lathered up, and had an epiphane. That third blade was awesome. Shaving was a pleasure again. I've been a happy Mach3 person ever since.

So my point is basically this. I stuck with 2-blade technology for nearly 18 years. I was chuffed as hell when I finally made the jump to 3 blades. I can only imagine how much 14 blades is going to rock.

{2006.03.28}

Hello world (again)

If you're reading this, it means The Corner Office version 2 is live, and I didn't screw the conversion up.

RSS feed links should be redirected to their new homes for now, and if most feed readers are smart enough to handle redirects, all should be dandy. Eventually I'll create dummy feeds with a 'hey, I've moved!' entry, so it wouldn't be a bad idea to point your RSS reader to one of the new links:

Sorry for the inconvenience!

Now it's just a matter of waiting for DNS changes to propagate, and hope nothing breaks too badly. If you run into problems, please let me know.

{2006.03.26}

AMD64 and PermGen memory errors

I've been plodding on with Sun's 1.5 JVM, and constantly running into out-of-memory errors. I nudged the Xmx arguments upwards and upwards, but that didn't seem to help. It turned out I wasn't getting the usual heap-related out of memory error - I was getting this:

java.lang.OutOfMemoryError: PermGen space
This prompted a bit of research, and me learning a bit more about the Sun JVM's permanent generation, which is distinct from the 'normal' generations which are stored in the heap. The permanent generation is used to store class files and the like, (or as the JVM docs say, "it holds data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level.") It seems that 64-bit JVMs are even more susceptible to outgrowing the default perm space settings than their 32-bit counterparts, and a number of people complaining about the PermGen space errors mention they're using AMD64s. Eclipse ain't the smallest app around, and by the time you add monstrous plugins like MyEclipse, you've got quite a few classes loaded into memory. (I redirected -verbose:class output to a text file, and just opening and clicking around a few perspectives in Eclipse loaded well over 6,000 classes).

The solution is to adjust the PermSize and MaxPermSize settings using the -XX:PermSize and -XX:MaxPermSize VM arguments. I can't find confirmation of what the default space is for the AMD64 JVM, and how much I should increase it by, but I'll be playing around with the settings and see how it goes.

Useful links:

{2006.03.25}

Gettin' down

On nights when I leave the office a little later, the accountant in me enjoys listening to the MoneyWeb Power Hour while driving home. I was listening a few weeks ago and by chance, they'd started a new thing and were explaining the rationale: instead of playing the usual jingle, they were shaking things up a bit and playing rock and roll music instead. Of the jingle. Meaning you got a few bars of 'Start Me Up' and then back to talking. I thought it was quite a funny thing and figured ole Alec Hogg would soon get feedback that it was a bit daft and move back to the jingles.

Not so. Today I was driving home, and the 'theme' song for tonight's show was Black Sabbath's Paranoid. The most incongruous thing I've ever heard. "Finished with my woman 'cause she couldn't help me with my mind" Duh duhnduh duh duh duhnduh, "right, on to the market report."

Faaark.

{2006.03.22}

Style sheet changes done

In addition to ticking off lots of other niggles on the TODO list, I got the style sheet switching functionality done on the new blog design.

I started off with a pure JavaScript solution, based on an article at A List Apart. I got that working, but then redid it slightly differently. The ALA method specifies alternate stylesheets, and toggles between them on the client side. This is nifty (I'd never noticed, for example, that Firefox allows you to switch between provided stylesheets, or disable them completely, using the View > Page Style menu), but I noticed that Firefox sometimes had some perceptible delays in rendering using a stylesheet, resulting in a very flickery page load.

I also wasn't crazy about specifying all the style sheets at once. I'm not sure if browsers prefetch each CSS file, (and too lazy to find out for sure), but I'm taking a guess that they do. Even though browsers cache the CSS and JavaScript files, it just seemed a little wasteful. Also, by having browsers load only the 'chosen' stylesheet, I can see in my logs which style sheets are used most.

I ended up relying on a much simpler solution. I added a simple EL function to the standard CSS JSP fragment to find the relevant cookie and place only the requested style sheet in the page. A back-end map of styles is property-driven, so it's fairly easy to extend without touching code. A few extra cycles on the server side, but worth it for the flexibility.

I also built up a style sheet echoing the current style. Wasn't too hard to do, and I even managed to carry the venerable old logo across as well!

{2006.03.20}

« Older | Newer »