the corner office

a blog, by Colin Pretorius

Deadeye

The unpacking continues... in retrospect we should've flogged them too, but we brought our TVs over, so as soon as our goods arrived we returned our loaner to my sis. Now we have our nice big LG telly from home, but it has no SCART port, so we'll have to run Freeview through normal TV aerial cables. It also looks like we'll have to manually tune all the channels, and since the TV manual is still in a box somewhere, the TV has stayed off (apart from an episode or two of Twin Peaks, which Ronwen is introducing me to - I dunno where I was when it first came out, but I completely missed the original Twin Peaks craze).

I haven't missed the TV much. OK, I miss Dog Borstal, but that's about it. The weather's tamely shifting to spring and more snow seems unlikely (dammit) so who cares? Watching the news and especially the vapid news presenters just gets me worked up, the throwaway shows are exactly that, and in this day and age you can afford to wait for everyone to blog or talk about the really cool TV series, and then rent or buy them soon after they've run.

So really, I'm in no rush to get the TV set up. I don't think my dearest agrees, though.

{2007.03.08 00:32}

They grow up so fast - cronolog edition

The first of this month marked 1 year since I signed up and rented this virtual server. It's been rather well-behaved:

colin@colinpretorius:~$ uptime
 23:31:08 up 199 days, 17:51,  2 users,  load average: 0.00, 0.00, 0.00

I have no idea why it got bounced. Wasn't me, promise.

I also noticed that the kind folks at RoseHosting have bumped me up from 256MB to 512MB of memory somewhere along the line.

colin@colinpretorius:~$ free -m
             total       used     free  shared  buffers  cached
Mem:           512         30      481      0        0       0
-/+ buffers/cache:         30      481
Swap:         4000        611     3388

I've been busy on the server this evening, which has kicked up some dust. The server's been averaging around 25 megs of in-use memory for a while now. The swap file's rather big, but if the OS thinks the gumpf can be paged, it can't be that important. Who says Java apps need to be expensive? I could probably store the whole damned blog in memory, and get away with it.

Anyhoo, the fact that the server's been going for a year, meant I had some emergency admin to do. A year ago I decided I didn't like the way logrotate handled my log files, and found a utility called cronolog which suited my needs far better. Cronolog wasn't an active project though, and I wasn't in any rush to make the change because logrotate would only start dropping log files after 52 weeks.

A week or so back I realised that a year was already up, and it was about time I tweak logrotate or swap to cronolog. Needless to say, I could remember very little about how to do either, so I did some homework, and tonight took the plunge and switched to cronolog, which once again seems to be active. I wrote some notes to remind myself of what I did and how I did it.

{2007.03.06 23:51}

tco-blog

And so it came to pass that I finally decided that enough tinkering was enough, made a few last tweaks to the meagre documentation, and rolled the project folders into a zip file and put it up on my server. My goal was to get this baby done before moving on to the next thing, and it's done: tco-blog [link removed] is as good-enough ready as it'll ever be, and downloadable.

If you're vaguely interested in taking a peek at this blog's innards, now you can do it. Enjoy.

Update: I removed the code, years later, but kept this post as a reminder to myself that I did it.

{2007.03.06 00:37}

A quick one

The CAPS lock key must be the most useless and irritating key on a modern keyboard. It does nothing but vex me. It should go.

{2007.03.01 00:45}

getLastModified

Having posted photies the last few days, I realised that the way I handled file serving, meant the app was re-serving the files each time, which clearly wasn't optimal, nooosirree. This prompted a tweak to the app and a visit to HttpServlet's getLastModified() method. I don't think this method gets used too often in web apps because there's so little static content in 'em, but it's exactly what's needed when you want to send an HTTP 304 / Not Modified response to a client who's sent you a If-modified-since header. I'd never come across the method before, hadn't even realised that servlets could handle this so easily.

You just override getLastModified() (which gets called before service()) and return the resource's age if you have it, and the web container takes care of the comparison with the client's header, and sending the proper response back. If the resource hasn't changed, service() doesn't get called. Nifty.

Now to be virtuous I ought to getLastModified-rinse some of the other static resources. I could go ahead and even handle this for plinks and summary pages, since I know when last anything got updated, and for a quiet site like mine, it might be a good idea. I think I might be getting a bit carried away if I did that, though.

{2007.02.26 00:07}

I wasn't joking...

... when I said our staff, er 'stuff' had arrived:

staff inside

When we spoke to the removals company, we were advised against packing our belongings ourselves. If your goods are marked 'PBO' (packed by owner) it's apparently a guarantee that HM Customs will rip your boxes open and go through all your staff/stuff thoroughly. So even if you have things already stored in boxes, the movers will open the boxes, make a note of the contents, and re-pack them. I don't see what comfort HM Customs draws from boxes labelled 'stuff', but it seems to work for everyone, so I'm not complaining.

That bubble-wrap they use is evil though. It's part-paper and part-plastic, so I don't think it's recyclable. Not only that, but they go crazy with the wrapping, so that after unwrapping half the furniture we brought over, and only a few boxes, we've already got one full car-load of the stuff to get rid of. The worst part is it's impossible to pop the bubbles!

{2007.02.24 23:45}

Our stuff is here!

lotsa boxes

Our goodies from South Africa got delivered today. Ouch. Our flat seems fair-sized by UK standards, moreso by modern Joburg matchbox townhouse standards, but our duplex in Northcliff was huge, and over the years, we filled it up.

We flogged the bulk of our furniture when we left, so the majority of items on our 7 page inventory list were boxes. Around 40 boxes make up our book collection (precioussss, precioussss!), and another 50 or 60 are CDs and DVDs and clothes and kitchen and personal crap. We're too sentimental for our own good. We're on a short lease here, so there's no point in unpacking the whole lot now (even if it could fit, which it won't). The plan is to unpack and check everything to make sure it survived the globe-trotting, extract things we really need and want, and then re-pack, re-seal and store the rest until we're in digs which are a little more... spacious.

We got by rather well without our stuff, and in many ways bootstrapping from nothing in a new place was good mental and spiritual housekeeping, but I must say, it's pretty damned comforting to know that everything's with us again.

{2007.02.22 23:28}

Visual Basic in Mono

Miguel de Icaza has blogged about Visual Basic.NET support in Mono:

Today we announced the support of Visual Basic.NET in Mono...

...The new compiler is fascinating because it is a VB 8 compiler (this means that it supports generics), but also because it is written in VB itself. This compiler was sponsored last summer by the Google Summer of Code (2006 edition).

The compiler on my laptop takes 12 seconds to compile itself (78,000 lines of code).

My first thought was 'that must be one helluva laptop'.

Nowadays it feels like it can take up to 12 seconds to compile a 10 line JSP in Websphere Portal. I know I'm comparing apples and gherkins, but still.

{2007.02.21 23:17}

The odd fauna and flora of Anglia

My entire life, birds chirping outside has meant that the sun is coming up, ie. it's time to go to bed. Tonight, it's 11h30, I'm sitting here at the dining table, tinkering on the laptop, Ronwen's dulcet preggy-snores gentle breathing occasionally emanating from the bedroom, and there's a bird chirping in the tree outside. Is it just confused or are British birds crazy? I feel completely unsettled, for the first time in years I have that guilty 'it's going to be a looong day on 2 hours of sleep' feeling.

On a related note, I always thought daffodils were really pretty flowers. I still think they're pretty, but considering how they're squeezing up absolutely everywhere, I'm mentally reclassifying them as weeds.

{2007.02.20 23:37}

Blog upgrade didn't break everything!

Cool. I was looking at the blog app's version history, and the last version I'd uploaded to this server was from April last year. So I'm rather pleased that the upgrade went OK: the blog should look no different to what it did half an hour ago, but it's served by the new version, which means it's a huuuge new chunk of code and hanging off of a brand new config system and seems to have made its way through table changes, the lot, without breaking (much).

I picked up a few niggles that need attending to, but they won't take long. Thereafter, I'll get to see how easy this thing is to set up from scratch, because Ronwen wants her own blog, dammit, and I'd best get cracking. She's been waiting patiently for quite some time, poor lass. Once Ronwen's blog is up and running, it'll be time to sling together a download page, sling up some zip files, and wash my hands of this whole blog app thing for a very long time.

{2007.02.20 23:20}

« Older | Newer »