the corner office

a blog, by Colin Pretorius

# Technology and the environment (a response)

It's not often you get to have nice arguments about things. I saw Laurence at Commentary refer to a post by Ian Gilfillan responding to some of Laurence's posts on environmental issues. Much to my surprise, I saw my own name mentioned in Ian's post.

Ian refers to a comment I'd made on an earlier Commentary post, which started out with me saying "I have no time for Luddite environmentalists and I don't buy into the peak oil thing." Ian regards my comments as "utterly idiotic". Well now.

First, a Luddite in a modern sense, is someone opposed to technological change. You know, someone who's anti-technology. You don't have to look too hard to find people who regard abandoning our modern way of life and returning to simpler, if not all-out subsistence lifestyles as a way of dealing with the environmental issues our planet faces, as a good thing. It's pretty hard not to see people espousing these sorts of views on every second BBC environment-related segment, which is yet another reason why I find my mood inversely proportional to the amount of time I spend watching BBC News.

Ian reckons he doesn't know a single person who has an anti-technology approach to environmentalism. Well, jolly good for Ian and his hip mates, but if they're not Luddite environmentalists then I wasn't referring to them. Perhaps the term Luddite doesn't quite apply to Ian's admirable decision to live within walking distance of his job, or his espousal of the 'stop what you're doing' principle. I still think his beliefs are a little flawed, not because I disagree with the principles, but because I disagree with the means by which he believes those principles should be met. More below.

Secondly, Ian doesn't like the fact that I don't buy into the Peak Oil thing, by which I mean the rather popular notion in some circles of an economic and social apocalypse when we run out of oil (and not the notion that oil supplies aren't going to one day run out. I understand the meaning of 'finite'). Laurence was addressing this issue in his post and he said everything far better than I could.

Never thought not buying into the peak oil thing would be so controversial, but I guess Ian sees me as some puppet of the Conservative Corporatist Establishment or something, which is kinda odd given what I said in the rest of my original comment:

At the same time, the thing I don't like about the *other* side of the spectrum is that the economics of scarcity and finite resources should spark natural, economically efficient price rises and encourage the investment needed in alternative technologies, and I have a sense that a lot of people in high places will gladly pander to vested interests instead of allowing the pain that's needed to really drive the move to alternatives.

Be it finite oil supplies or any other aspect of the world's environmental woes, I think the biggest problem is not aligning the true costs of our environmental footprint with our lifestyles. In a word: the problem is externalities. Hypothetically and empirically speaking, when transactions between people on this planet more accurately reflect the true cost of the environmental impact of those transactions, then you soon find three things happening:

  • People choosing to limit their consumption, because certain polluting activities are too expensive.
  • People choosing more energy-efficient solutions to common problems, all other things being equal.
  • Higher costs driving innovation and uptake of new technologies which are more efficient and less pollutive.

How you mitigate externalities is a separate discussion, and I sure don't have the answers, but if you don't start with the premise that we're not going to effectively solve environmental issues if people are being exhorted to do things which are out of line with what they can afford and not afford to do in their daily lives, then a 'stop consuming or you're gonna die' approach is about as effective and persuasive as 'stop sinning or you're going to hell'.

Ian might not like my idiotic comments, but I suspect that many of our views are not that far apart. Not that I care if they aren't. What it really boils down to Ian's insinuation that I'm some conservative anti-environmentalist authoritarian reactionary, and that's ridiculous, although having read his blog for a while and having crossed subcultural paths in another lifetime a long long time ago, I can see why he'd think that based on what I said. Regardless, he's wrong.

I never once said that there weren't real environmental issues that need resolving, but I don't for one second believe that unrealistic exhortations to austerity or externality-absorbing populist politicians trying to suck up to voters are the solution. My views are decidedly classic liberal, libertarian, call 'em what you like, and I simply don't believe that things work just because politicians or moralists say they should.

PS. I think terraforming other planets is a ridiculous idea, too.

File under: world : {2007.07.26 - 00:30} : Comments (2)

# Nervous landlord

The water level has risen a bit. This is the Boathouse next to the Wallingford bridge:

Boathouse Pub

Again, the lower level was almost permanently under water in winter. Not this badly, though. Still, these aren't the worst floods in the town's history.

Floodline

That mark in the middle of the picture is the floodline from the town's worst floods, in 1894.

Floodline close-up

File under: personal : {2007.07.25 - 22:17} : Comments (0)

# Lousy weather

Of all the interesting things I'd thought we'd experience in Oxfordshire, flooding wasn't one of them. Ronwen popped down to the river this evening to take some pictures.

Floods next to Wallingford bridge

We're cheating a bit, because to be fair, the Thames like this is a normal sight during winter. Wallingford hasn't really been affected by the floods, and is unlikely to be. We're quite high above the river at any rate, and not particularly worried. Elsewhere though, it's rather soggy.

File under: personal : {2007.07.23 - 22:31} : Comments (0)

# Linkety link

So I was sitting around on the weekend, taking a break from doing anything important, and I thought to myself 'hey, I needs me a link blog'. So I fired up a MySQL client and ran some scripts and copied a .war file and tweaked some XML, and hey presto, I had a link blog.

Basically, I just wanted a place to dump all the links I pick up as I'm doing my daily thing, or researching particular topics. By publishing the links, I can add to the list wherever I am, linkees get some search engine luvvins and I can use search engines to go back and search through my own link collection when I need to. It's all good.

I've always battled a bit with this blog, because it's always been a bit schitzophrenic - technical, political, and personal. The link blog is also a hodge-podge, but it's really a tool for me, with no real designs of being useful to anyone else. Nonetheless, you might find it interesting to follow, just as likely you won't. I'm just writing this waffle 'cause it seems a bit silly not to mention that it's there.

(PS setting up a fresh instance of my blog app meant I uncovered a bug or two, and I've placed an updated version of the tco-blog app on my website.)

File under: thee_blog : {2007.07.19 - 01:09} : Comments (0)

# Handbags at dawn

The diplomatic row over the expulsion of Russian diplomats in response to Russia's refusal to release Andrei Lugovoi for extradition to the UK over Alexander Litvinenko's poisoning last year is a joke.

There are a few questions to ask: is there gonna be a war? No. Will the nukes start flying? No. Is anything serious going to happen? No. So basically it's just huffing and puffing and posturing, ie. it's all BS.

File under: politiek : {2007.07.19 - 00:31} : Comments (0)

# Return an empty collection, not null

I just got bitten by a silly thing: according to the J2EE spec, HttpServletRequest.getCookies() returns an array of cookies, or null if no cookies were sent with the request.

Why return null? It forces client code to explicitly check for null, while boiler plate cookie extraction code requires you to iterate through the list of cookies anyway. You could just as easily communicate 'no cookies' with an empty array, and it results in less crashable code.

True, common convention is to return null when you're unable to find an object that's supposed to be returned by a method - that's an understood and sensible convention. I don't think it follows that the same should be done when returning collections of objects. My preference is almost always to return an empty collection, as opposed to returning null. Why? You can still explicitly check for the existence of returned objects with a length == 0 or size() == 0 check, and iteration generally drops right though, with no NPEs and no NPE-avoidance code required.

The only argument against doing that might be performance - saving the creation of an object when no results were found. Apart from extreme cases - where the reasoning should be documented - empty results aren't the normal case and performance gains are likely to be infinitessimal, if they exist at all.

File under: java : {2007.07.15 - 23:45} : Comments (0)

# Tourist stuff

We've been all touristy the past few weeks. Last weekend, the Henley Regatta, and this weekend, Stonehenge.

The Regatta was an excuse to walk for miles to find a picnic spot under a tree with a lovely view of the booze tents and all the Beautiful People dolled up to the nines. Most people in the 00's trying to look traditionally spiffy don't really manage to pull it off. Maybe looking traditionally spiffy needs trousers and blazers and summer dresses made by tailors or movie costume designers, not M&S or Gap.

Stonehenge was... more inspiring in the documentaries. I mean, it's amazing, seeing this huge structure, and you wonder how the hell, and why the hell, but in the documentaries, it's always filmed at sunrise with atmosphere and dew on the grass and nobody else around. In real life, Stonehenge is an interesting prehistoric site that looks like a movie set, but nicely cordoned off with rope walkways and a million tourists all bumping into each other because they're engrossed listening to the narration on the little radio player jobbies they hand out at the entrance. It is an incredible structure though, and set in a beautiful piece of countryside, and well worth seeing.

File under: personal : {2007.07.15 - 20:07} : Comments (0)

# Lulz

I am a bit behind with hip-hop'n'happenin' stuffs on teh Internets. Today colleagues introduced me to the magic of lolcats, a la icanhascheezburger.com.

File under: world : {2007.07.12 - 00:29} : Comments (0)

# SWT DateTime

Eclipse 3.3 has a new feature, a DateTime component, which means you don't need to rely on third-party widgets anymore. I'm quite pleased because I never made the effort to actually understand or use one of the custom widgets normally pointed to in forums and the like, and now I don't need to.

At present it has two shortcomings I dislike: first, it can't act like a drop-down, a-la your average web page, or for that matter, the good old Notes date control. You can either have a date spinner, or a time spinner, or a full date selector, but that's all. I guess you could build a composite that mimics drop-down functionality with a custom dialog, but it'd be better if it was built in.

The second thing I'm not nuts about, is that you can't just give it (or retrieve) a date value: you have to explicitly set or get each component of the date or time. How hard could it be to have a setDate(java.util.Date) method, or, if political API correctness is an issue, a setDate(java.util.GregorianCalender) method?

Nonetheless, a nice addition.

File under: java : {2007.07.12 - 00:13} : Comments (0)

# Well, that helps

I've just learned something (the hard way) - if you use BigDecimal.divide() and your quotient has a recurring decimal, you get a big fat:

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.

BigDecimal values are nice and quick for adding up things like monetary amounts, certainly faster and kinder to your electricity bill than Doubles, but the safest approach for dividing BigDecimals seems to be to drop to primitive doubles and then re-build from there.

Now maybe it's just me, but I don't think there's much point in having a divide method if you have to remember that it only sorta-kinda works. The BigDecimal JavaDocs are clear about the risks, but still.

File under: java : {2007.07.06 - 00:00} : 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