the corner office

a blog, by Colin Pretorius

# 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.

File under: java : {2006.03.30 - 20:34} : Comments (0)

# The Gillette Singularity

The Economist ran an article about razor manufacturers going ape-shit 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 Des 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.

File under: world : {2006.03.28 - 20:24} : Comments (0)

# 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.

File under: thee_blog : {2006.03.26 - 17:21} : Comments (3)

# 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:

File under: linux, java : {2006.03.25 17:58} : Comments (0)

# 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.

File under: world : {2006.03.22 22:01} : Comments (0)

# 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!

File under: thee_blog : {2006.03.20 01:06} : Comments (0)

# One man's Krokodil...

Saw this article at IOL, about a recent PW Botha speech given to punt the release of an interview-on-DVD that nobody's going to buy. The speech itself is the usual blather in which the old geezer is still big on Jesus and without being too blatant about it, still not so big on black people or the 'new' South Africa because, well, who knows or cares anymore.

The only part of it all which struck me as interesting, in light of the Official Conservative standpoint on the evil-but-elected-neener-neener thugs known as Hamas was this:
Asked during question time whether Mandela would have been released when he was if he, Botha, had still been in power, he said he had given Mandela an opportunity to leave jail.

"I told him to renounce violence, which he did not do. He kept himself in jail at that stage."

He said he had spoken to then British premier Margaret Thatcher and German chancellor Helmut Kohl on this issue.

"One of them told me, let him go and then put him in jail again. I said no, itis for him to decide whether he is prepared to renounce violence."
As I've said before, Hamas aren't the ANC, but it's instructive to yadda yadda, shades of grey and perception, and all that.

File under: politiek : {2006.03.18 17:34} : Comments (0)

# Schadenfreude

Politicians are not my favourite kind of people to start off with, but I have a special bit of dislike reserved for Patricia De Lille.

It is with some pleasure, therefore, that I read about the rampant discontent and ire that ole Patricia has earned from her party after the mayorial fiasco in Cape Town (for example, here, here and here).

I guess the ID's measly 10% of the vote was from people who were voting for an opposition party, not a Personality Cult, after all. Or perhaps, after finally being put to the test and not just being a niche noise maker, De Lille let some of her true character shine through. Either way, it's satisfying to see a politician get their come-uppance - pity it doesn't happen more often.

File under: politiek : {2006.03.18 16:54} : Comments (0)

# IBM JDK 1.5 didn't work out so well

IBM's 1.5 64 bit JDK was promising, and a bit faster than Sun's 1.5 JDK (but not as fast as IBM's 1.4 JDK), but stability... not so good. Today was my first attempt at debugging something, and Eclipse's little blue breakpoint dot turned out to be Kryptonite for the poor JVM, causing it to segfault; a term which doesn't quite do the experience justice - a more apt description would be that the JVM soiled itself enthusiastically and then fell over dead.

This isn't the first weirdness I've had, actually. With IBM's 1.4 JDK if you tried to step into a switch statement during a debugging session, the app would die. You'd expect an IBM-spawned IDE like Eclipse and an IBM JDK to get along better.

I'm back to Sun's 1.5 JDK, which is also guilty of the occasional weird crash, but allows me to do what I need to do, albeit a bit sluggishly. I'm not sure whether to admit defeat and stick with this, or try out the 32 bit JVMs.

File under: java : {2006.03.18 16:38} : Comments (0)

# Crazee

A colleague sent me a link to this gem - something everyone secretly dreams of doing:
Johannesburg - An elderly woman crashed her car into no fewer than nine others at Rand Park Ridge here on Wednesday.

There was total chaos after 71-year-old Erika van Zijl smashed into the cars in a parking lot. Four of the cars, including her Volvo, had to be towed away.

A flabbergasted Robyn Fincham whose car also was damaged, said she couldn't believe her eyes when she saw the damage to all the cars.

Edmund Swanepoel, who heard the commotion, said he couldn't believe how much damage one car could cause in a single parking lot.

"I came out of the Lifestyle Nursery after I'd been shopping and saw the woman driving slowly into a parking bay in front of the nursery's main entrance.

"It looked like she wanted to park, but suddenly she put the car into reverse and raced backwards at a helluva speed.

"She smashed into a bakkie and a Renault," said Swanepoel.

"Then she put her car in first gear and drove forward at such speed that she spun the wheels.

"Then she hit a Toyota, but just carried on accelerating and pushed the car until it came to a halt against another car, a Mini Cooper.

"She put the car into reverse gear again and smashed simultaneously into a Pajero and an Opel Corsa.

"A security guard at the Lifestyle Nursery eventually turned up and pulled her car keys out of the ignition," said Swanepoel.
How do you explain that to your insurance company?

File under: world : {2006.03.16 20:32} : 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