[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Summer in the city

Filed under: General — Thomas @ 01:04

2007-06-20
01:04

Summer has hit in all its sticky sweaty glory.  This is my least favourite part of Barcelona - the summer months.  It's doubly bad because my most favourite season - spring - was basically non-existent - it was either rainy like hell or overly hot.  Too bad.

Now it's going to take a good two weeks of insomnia to adjust to the heat, and then holding on until August when a deadly calm hits the working part of the city.   There's still tourists - mostly the ones that are crazy or ignorant about the temperature - but most real people flee the city.  Here's hoping I can get stuff done while customers go quiet for a while.

I left work rather late and got hit by the wet summer heat, sprinkling droplets of sea salt all over my arms and legs.  I swung by Ciudad Condal on the way back from work - comfort food, always works - and I arrived with a thin film covering my body.  I probably stunk the place up but I don't care, Ciudad Condal is my hangout you tourists.

I will be happy to see Kristien tomorrow night and I hope we can still have our day off together on Thursday.  Time together is in short supply as it is, given her irregular schedule and her face on TV.

Friday we're having a little ex-work get-together, the people from 4FM meeting up at a bar.  It's going to be fun seeing those people back - the ones that deserted me, the ones that I deserted, and my bosses from before who sold the company at the wrong time and missed out.  It'll be a night filled with fun war stories.  It's so much easier to look back with fondness when time has put distance between me and the memories.

Bloglines

Filed under: General — Thomas @ 23:29

2007-06-18
23:29

I started noticing some of my Bloglines feeds not updating. In particular, my Penny Arcade and Dinosaur Comics ones were definitely over a month stale. So I thought, "what the heck, let's try the contact link and ask what's up."

The mail I got when opening a ticket had this in it:

Thank you for allowing us to be of service to you.

It is on a line on its own, there is no irony around it, and it is so sharp and pointily effective that I have no choice but to take this at face value, instead of writing it off as cheesy American service.

This line made me do two things:

  • Make the best, clearest possible bug report that I could, instead of a half-assed "I can't figure out what the URL is that breaks because your web interface doesn't make it easy" - instead I went digging around until I found a link to export to .opml then scan through that .opml file
  • When I realized that I could in fact export my subscriptions and thus possibly switch to another service, I thought "Man, these guys care, so I am going to stick with them."

We should hire the guy who wrote this template for our support team. We've had two incidents over the past week that could have been handled better :)

one button life change

Filed under: Hacking — Thomas @ 22:18

2007-06-17
22:18

This weekend.  Lots of plans, getting organized, cleaning out my inboxes, lots of things working against me.

Like, say, my ADSL connection being reset every 30 minutes.  Goddamnit that is awful and I have still after three years not been able to figure out why.  It starts happening at some point, then goes on for a few days, then goes away.   Really shitty to have in Evolution ,because it means you have a small window in which you can trust theconnection to work, and Evolution typically can't complete most of the operations it's trying to perform in that window.  And then it just hangs on whatever task it's doing (either showing (...) or Working (0xp01nter) at the bottom).

It was so bad that I decided to go to the office today just to get shit done, knowing there would be a perfectly fine internet connection over there.

During my mail cleanup I also Google'd a little to figure out if at all, and if so how, offline folders in Evolution actually work with IMAP (I'm still not sure after the googling).

And there was this one post that said that there is a Cancel button.  And that you can actually <b>click it and it cancels</b> the running tasks.

What ? Where ?

I've been using Evo since like forever and I've never seen a Cancel button ! Where the hell is ... Oh, hey, what's that red round button at the top to the right with the white cross through it.

OMG.  It works.

This is definitely going to beat the crap out of --force-shutdown if this thing keeps working as well as it is right now.

On unrelated news: my private Inbox is currently EMPTY and my work Inbox has no mails in Inbox for June.

Of course, I always cheat a little bit and move reasonably old mails to a THROUGHBOX folder which I promise myself to get through someday (needless to say it has mails from as far back as 2000), but I did process over four months of mail and am back on top of my INBOXes.

Let's see how long I last this time...

N800 wizards

Filed under: Hacking — Thomas @ 17:35

2007-06-15
17:35

Please enlighten me - what is this process called "enprocess" that runs on my N800 as soon as it boots, takes pretty much all of my CPU most of the time, and seems to not mind to be killed completely as far as I can tell ?

What is it, what is it doing taking so much CPU and wearing my poor battery out, and where are the docs on this ? No man pages makes it hard to figure out...

UPDATE: it was indeed a process related to email.  I fixed it permanently by moving my mail directory ouf of the way, and restarting the mail application and reconfiguring my email account.  Now it seems to be a lot less CPU hungry.  Thanks everyone who commented.

deleting backups

Filed under: General — Thomas @ 13:58

2007-06-11
13:58

backups are good.

Over the years I've come to realize this simple mantra, to the point of thinking, every time I put in place a new service - "how do we back this up ?"

Usually the answer is relatively simple. You svndump an svn repository then tar/bzip2 it. You dump a trac setup and tar/bzip2 it along with the config files. You rsync over maildirs (not entirely correct but good enough). You add this as a daily cron job. And so on.

This isn't perfect, though. Sooner or later you will have to deal with the swaths of disk space your backups are wasting. And really, do you still need the svn dump from two years ago on Monday if you also have Sunday and Tuesday ?

So really, what you want is something more like "only keep the daily backups for three months, and after that only keep a weekly backup, or one every x days".

I searched for ages among various find-like tools to make this possible from a shell script, and never found anything useful. Two weeks ago I decided I'd just write it in python, and it turns out it's a lot simpler than I was fearing it would be:


#!/usr/bin/python

import glob
import stat
import os
import time

files = glob.glob('*')

for file in files:
keep = False

s = os.stat(file)
mtime = s[8]

# keep if it is from a sunday
anyGivenSunday = time.mktime((2007, 5, 6, 0, 0, 0, 0, 0, 0))
secondsPerDay = 24 * 60 * 60
if (mtime - anyGivenSunday) % (7 * secondsPerDay) < secondsPerDay:
keep = True

# keep if it is younger than 3 months
now = time.time()
if now - mtime < 90 * secondsPerDay:
keep = True
print file, mtime, keep

This script prints out one line per file from the current directory, with True in it if the file should be kept.
So typically I run this as

keep-sundays | grep False | cut -d' ' -f 1

to see the list, and then add "xargs rm" if the list makes sense.

Next step would probably be to refine this a little, add some arguments, and put in a cron job, but for now it solves the problem of weeding out my backups and free some disk space on our servers after 3 years of backups.

« Previous PageNext Page »
picture