This category contains posts about computing, programming, and development

Monday, 2008-04-14

Dell Gold support — awesome. Their followup survey? Much less so

I recently had a spot of bother with my work lappy. The screen went all blurry after a short while of use. I didn’t mind this as it didn’t happen when the laptop was docked.

However I felt it needed to be fixed, so I called the Dell Gold support line in Sweden. Very professional service from them, a tech arrived the day after with a replacement motherboard and LCD screen. So far, so happy.

This morning I arrive to find an email from Dell asking me to participate in a survey about my experience. I’ve ignored these in the past, only to be spammed by reminders, and I thought that in this case I should take it as a I was very happy with the service I got.

So like a fool I click the link to some god-awful outsourced company (prognostics.com). A series of barely literate, badly sequenced survey questions pop up. Each takes about a minute to load. They are repetitive. They have no discernable order. They seem to reiterate the same damn point over and over again.

So I waste about 10 minutes of my time with this crap and feel obscurely that I’m more unhappy with the level of service I’ve received than before. This is the last time I’m answering these, I’ll be creating a filter to bin them from now on.

Saturday, 2008-01-12

Getting native 1400x1050 resolution with Xorg i810 drivers on a Dell Latitude D505

I’ve been using Ubuntu 7.10 on a Latitude D505 for a while now, and I’ve always been disappointed with the screen resolution. The max I could get was 1280x1024, while the native resolution is 1400x1050.

I recently had to reconfigure X on this machine (dpkg-reconfigure xserver-xorg) and chose the intel driver (recommended by the configure script). However, it turns out that this driver hangs the machine when you close the lid. The older driver i810 works in this regard, but the max resolution is too low.

The solution is to use the 915resolution application. This does some weird hacking of the video BIOS to allow Linux to use the full resolution.

Using it in Ubuntu is a breeze. Simply install the .deb package and reboot.

Thursday, 2007-11-01

Somewhere in the heavens… they are waiting

Instant nostalgia. Thanks to the Aleph One project and these instructions I was able to compile the Aleph One application on my Ubuntu lappy and play Marathon 2.

It’s a lot of fun, especially as I can point out “we had that in Marathon 13 years ago” while playing Halo 3 with Leo. This pisses him off no end.

Friday, 2007-09-28

Is it Friday?

The site isitfriday.net provided an essential service: answering the question “is it Friday today?”.

Apparently it wasn’t deemed essential enough, cause the service no longer exists.

David has stepped up to the breach with http://isitfriday.gnapp.org/. Here’s my contribution:

#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
my $wday = (gmtime( time ))[6];
my $msg = 'no';
if ( $wday == 5 ) {
    $msg = b( 'YES!' );
}
print header;
print start_html( 'Is it Friday?' );
print h1({-style=>"text-align: center"}, $msg );
print hr;

You can see it in action here.

N.B. this script is not tested for days other than Friday. Also, your timezone will have to be in the general vicinity of UTC for it to work for you.

Wednesday, 2007-08-15

Users do care

Dave Winer thinks Atom is uneccessary, because users don’t care about the subtle nuances between RSS 2.0 and Atom.

While the Atom vs. Dave Winer saga makes for good soap opera, Dave is correct that users don’t care. The fact that there are two formats doing nearly the same thing is regrettable, but it can be laid pretty conclusively on Winer.

Dave is correct that end users don’t care about formats. But developers, who are also users (of formats and APIs) care a lot. They have to navigate the difficult morass to bring the end users the apps they want.

As a blogger and feed user, I do care about formats. The fact that RSS 2.0. can’t reliably handle HTML markup in post titles, while Atom can, is a good example. If I have a choice, I prefer an Atom feed over RSS 2.0 (or Feedburner feeds, which handles the complexity for me).

One of Dave’s mottoes is “Users and developers, partying together”. Pity he makes it hard for the developers to do just that.

Thursday, 2007-05-24

Scripts in Nautilus

I found out today that if you’ve installed a script in Nautilus, you won’t see it in the contextual menu until you’ve visited the script directory in Nautilus.

Install a script in ~/.gnome2/nautilus-scripts/ and making it executable.

Then visit that directory in Nautilus to “enable” it.

I’m not sure if you have to do this for every script you install, or only for the first one.

Sunday, 2007-05-13

For the love of $DEITY, check the return of system in Perl!

So there we were at work, wondering why part 2 of our home-brewed customer survey system[1] wasn’t sending the mails it should be sending.

Turns out that the perl script responsible read from one table in the database to find out the recipients of the emails. It then generated a form of authentication, updated the database to say that the mails had been sent, then called

system( "/usr/local/bin/email.pl" );

where email.pl was another script written by the same developer.

Note the lack of return value from that call to system.

So what happened was that in the distant mists of time (about 2 months ago) we switched source control systems. Apparently we lost our executable bits on some scripts, because email.pl was readonly and owned by Apache.

Had we checked the return value, we would at least have had a warning that something was wrong. But now the system apparently “worked” for a month or so, and we only realised that nothing was being sent when the responses dried up.

I’ve re-written the code to check if the call to email.pl was succesful, and only if it was would the database be updated.

Now we have to re-send all emails older than a month, which will probably put our server on a spam blacklist. Sigh.

Lesson: code defensively.

[1] Why we haven’t got a third-party solution for this is hard to understand, unless you worked there 2 years ago, when development time was considered free and maintainance was never factored in the cost equation.

Monday, 2007-05-07

My integer

D1 CF A9 CF 64 C4 F6 99 68 25 7E 5D 2F 35 BC DB

This is my integer
There are many like it
But this one is mine.

Get your very own DMCA-protected 128-bit integer here!

Saturday, 2007-05-05

Space bar navigation

I use the space bar to page down in Firefox all the time, but I didn’t know you could page up with Shift-Space. Thanks, Lifehacker.

Tuesday, 2007-04-03

Monday, 2007-04-02

Variables in (s)printf formats

Here’s a fun thing I learned for the first time today: you can have variables in formats for printf or sprintf.

Here’s a contrived example:

#!/usr/bin/perl -w
use strict;

sub variable_format {
    my ( $in, $len ) = @_;
    printf( "%0${len}d\n", $in );
}

variable_format( 42, 3 );  # prints 042
variable_format( 42, 9 );  # prints 000000042

Interestingly, I can’t find any mention of this in Perl’s documentation for sprintf.

Tip of the hat to Linus.

Thursday, 2007-03-29

New computer wishlist

So new we’re moving to a place with incoming fiber, and you’re allowed to run your own server. I’d love a closet media server, but space is at a premium and there’s the electricity to consider.

Another idea is a HTPC, ideally running Linux. If Joost worked on Linux and you could use a remote, it would be a no-brainer. I’m loathe to admin Windows just to watch media.

Then there’s the family computer, which will be used by the women of the house. Ideally I’d like H to have her own laptop, small and light, so she can move it between us and her dad’s. I’m considering a Mac for a stationary computer.

The family gamer wants a gaming PC, and of course a PS3 in addition to his Xbox 360. I’m thinking of getting a mid- to high-end Windows machine with a decent flat screen. If the machine has a TV card we should be able to view cable and use it as an input to the Xbox. Not at all sure if this is feasible at all though.

If we max out, this would mean:

  • closet Unix/media server
  • HTPC
  • family Mac
  • gaming PC in one room
  • laptop PC in another
  • my work lappy

That translates into 1.2 computers per family member. Maybe that’s excessive.

Sunday, 2007-03-25

Twitter posting script in Perl

Here’s a stab at a script for posting to Twitter:

#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use XML::Simple;
use URI::Escape;

my $username = 'your_twitter_username';
my $password = 'your_twitter_password';

my $message = shift or die "usage: $0 message\n";

if ( length $message >= 140 ) {
    $message = substr( $message, 0, 139 ); 
    warn "truncating message to: $message\n";
}
$message = uri_escape( $message );

my $ua = LWP::UserAgent->new();
# tell Twitter who we are
$ua->agent( "$0/0.1 " . $ua->agent );

my $req = HTTP::Request->new( POST =>
                  'http://twitter.com/statuses/update.xml');
$req->content_type( 'application/x-www-form-urlencoded' );
$req->authorization_basic( $username, $password );
$req->content( "status=$message" );

my $res = $ua->request( $req );

my $xml;
if ( $res->is_success ) {
    $xml = XMLin( $res->content );
} else {
    print "Posting failed " . $res->status_line . "\n";
}

my ( $created, $name, $screen_name, $id ) =
  ( $xml->{created_at},
    $xml->{user}->{name},
    $xml->{user}->{screen_name},
    $xml->{id} );

print << "EOF";
Your message

  $message

was succesfully posted at $created 
as user $name ($screen_name) with ID $id.
EOF

Thanks to Jim for the inspiration.

By the way, I’m gerikson at Twitter.

Update 2007-03-27: I removed the wget version as I don’t maintain it any more.

This Twitter API wiki is pretty helpful.

Sunday, 2007-01-28

FizzBuzz

Nearly flubbed this. Time constraints suck.

First implementation, aka bog-standard:

#!/usr/bin/perl -w
use strict;
my $i = 1;
while ( $i < 101 ) {
    if ( $i % 3 == 0 and $i % 5 == 0 ) {
    print "FizzBuzz\n";
    } elsif ( $i % 3 == 0 ) { 
    print "Fizz\n";
    } elsif ( $i % 5 == 0 ) {
    print "Buzz\n";
    } else {
    print "$i\n";
    }
    $i++
}

Maybe I’ll play a bit with this later… the online comments have degenerated into golfing in people’s favourite languages.

Check here for a funny-cause-it’s-true “example” in Java, everyone’s favourite enterprise language… (first comment).

Thursday, 2006-09-21

iTunes woes

I can’t believe I was stupid enough to install a point-oh release from Apple. itunes 7 sucks when it comes to playing music — the first priority for the software in my opinion. Playback is marred by pops and hisses, especially when accessing a CD-ROM. It just feels that it’s suddenly expanded to fill availabe RAM and swap.

Thank god for last.fm. Their new player rocks. Regarding iTunes, guess I’ll grit it out until the bugfix release.

Tuesday, 2006-08-15

Mounting LVM volumes from a USB disk

Quick start

  • attach the disk to the computer
  • Run the following commands as root or via sudo:

(The first command finds LVM volumes. The second one activates them.)

root@host:~# vgscan  
  Reading all physical volumes.  This may take a while...  
  Found volume group "foo" using metadata type lvm2  
root@host:~# vgchange -a y foo  
  2 logical volume(s) in volume group "foo" now active  
root@host:~# ls /dev/foo  
  root swap_1  
root@host:~# mount /dev/foo/root /mnt

Background

This may help others, I had a hell of a time getting it working, but that was just because I didn’t understand the concepts at all.

Background: a Linux laptop lost its video card recently. I was able to back up the most important files via FireWire to another machine before I couldn’t see the screen, but I felt I should have the entire hard drive handy in case I miss anything. So I removed the hard drive from the laptop and put it in a $40 USB enclosure.

An aside: this resulted in a very nice little wallet with 40G of storage, but with one big disadvantage. It gets its power entirely from the USB port, but unless you have powered port (generally one at the back of a tower PC) you need an external power brick. Most laptops cannot run the drive from their ports. Lugging a power brick around kinda negates the portability of the device. The point was moot in my case, as there was no power brick included in the package.

(In addition, el cheapo USB hubs can’t power this sucker either. I had a 3.5” enclosure with 3 USB ports that could, however.)

So, I plugged the drive to a laptop also running Linux (Ubuntu, same as the last one). The drive automounted and I could see the /boot partition. Obviously that’s formatted in some generic fashion that the automounter can recognise. A scan of /var/log/messages gave the device as /dev/sdb.

root@inspiron8600:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 4864.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          31      248976   83  Linux
/dev/sdb2              32        4864    38821072+   5  Extended
/dev/sdb5              32        4864    38821041   8e  Linux LVM

(note that I’m root here, no mucking around with sudo when there’s a lot of commands to issue!)

OK, so the data is on /dev/sdb5, in a LVM volume. What the heck is that? Linus has this to say:

You don’t want to use LVM, it’s a source of confusion and headache. It’s a toy variant of VxFS but doesn’t work nearly as well.

Words to live by, but Ubuntu has helpfully stashed my data into an LVM volume and I needed to get it back.

The short answer is to run vgscan:

root@inspiron8600:~# vgscan
 Reading all physical volumes.  This may take a while...
 Found volume group "Ubuntu" using metadata type lvm2

OK, this is where I went off the rails. You see, I thought that the volume group “Ubuntu” was the one on the host hard drive. So I spent a lot of time googling for solutions (someone somewhere must have had this experience before!), reading about using Windows (ugh!) and how not to do stuff. Then I read what I should have from the the beginning, the LVM HOWTO.

In the section Common tasks it tells you about Creating a volume group. This could then be mounted.

Aha! I tried

# vgcreate usb_volume /dev/sdb5

but got the message that it was already a part of a volume group, namely “Ubuntu”!

Mounting /dev/Ubuntu to /mnt was a moments work. I was able to copy the needed data easily.

(Update: /dev/Ubuntu showed up because I ran vgchange before, not knowing what that command did.)

Caveat: In the course of writing this, I tried to recreate the steps I used. However, I got this message back:

root@inspiron8600:~# vgscan
  Reading all physical volumes.  This may take a while...
  /dev/Ubuntu/root: read failed after 0 of 4096 at 38168100864:
    Input/output error
  /dev/Ubuntu/root: read failed after 0 of 4096 at 0: Input/output error
  /dev/Ubuntu/swap_1: read failed after 0 of 4096 at 1581187072:
    Input/output error
  /dev/Ubuntu/swap_1: read failed after 0 of 4096 at 0: Input/output error
  Found volume group "Ubuntu" using metadata type lvm2

I couldn’t mount the partitions either.

Looks like I was in the nick of time!

I have no clue whether the act of mounting the LVM volume via USB ruined it, or if this was just a bad disk. Be careful!

Thanks to Stefan and Linus for helping me with this!

Sunday, 2006-08-06

Lobotomised lappy

So the Linux lappy’s screen started flickering without reason and then conked out. Rebooting next day gave me 5 minutes of graphics before the darkness descended. It seems time-related, an instant reboot just gives blackness after the initial boot screen.

This sucks for the following reasons: this was my Linux laptop, and it had the best keyboard of the 2 I’m using. So my productivity will go down.

On the other hand this is a second-hand machine that’s basically non-essential to my life, and I managed to rescue the important files from it via FireWire. I’ll see if I can’t deliver another laptop from Windowsness or convert the current one to Ubuntu instead.

Saturday, 2006-05-20

Networking between Linux and Windows with FireWire (IEEE1394)

I wanted a quicker way to transfer files between two laptops than via wifi. One’s is running Ubuntu Linux, the other Windows XP.

Both machines have a 4-pin FireWire port (labeled 1394, apparently someone owns the rights to the “FireWire” name and someone else doesn’t want to pay royalties). I borrowed a 4-pin to 4-pin cable from my brother-in-law and set out to try to connect the machines.

I knew that Windows has built-in IP-over-1394 support, the clincher was enabling it under Linux. Ubuntu has the required modules installed and the kernel I use can use them. There is a project page for Linux1394 if you need to get the modules and install them by hand.

I loaded the network module eth1394 by running

$ sudo modprobe eth1394

(Maybe this isn’t strictly necessary, but I didn’t find any reference to the module in the dmesg output.) Checking /var/log/messages, I saw that the interface got the name eth2.

Then I connected the computers with the cable (after enabling the interface in Windows). I heard a “cable connected” sound in Windows. Running

C:\> ipconfig /all

showed me that the interface was up. After a while I got a private address (169.254.203.16, netmask 255.255.0.0). I configured a static address on the Linux side:

$ sudo ifconfig eth2 up 169.254.203.17 netmask 255.255.0.0

I then started an FTP client in Windows, pointed it to the address defined in Linux, and started transferring files. I’m getting about 2.5 MB/s which isn’t too shabby.

Update: some quick perusal of the transfer logs gave me a average transfer rate of 1.45 MB/s.

Thursday, 2006-04-27

Dead ultra5

My trusty Sun Ultra 5 workstation was due for a new OS (OpenBSD 3.8) and some new hardware. But when I started it up I got the following message on the serial console:

RED State Exception on CPU = 0000.0000.0000.0001

This is Bad News(tm) according to Google. So it’s time for the scrap heap for this old machine, and the search for cool hardware continues.

(BTW, if someone needs parts for their Ultra 5, drop me a line. Maybe we can work something out.)

Thursday, 2006-03-09

Ubuntu installed again

I installed Ubuntu again with an eye towards using it more often for work stuff from home. So I needed Java so I could run SQuirrel to access the ‘Orrible database. Of course you have to jump through N hoops to get Sun’s JRE installed, details here. Thanks to Matt for helping me out.

Another more serious issue was the lack of any sort of inetd on the machine I was trying to migrate files from. This is also an Ubuntu machine, stock install. It happily installed proftpd and tells it to run from inetd, but the actual package is just a virtual one. I manually installed the netkit-inetd package and got FTP working. This issue looks like a bug to me.

This new machine has a higher-resolution screen, that makes Gnome much nicer to work with.

OK, enough geekery for tonight. Time for bed!

Tuesday, 2006-03-07

Testing Kubuntu

I decided to try out Kubuntu on my new used laptop. I’ve been using Ubuntu (which uses Gnome) for a while and have grown comfortable with it, but I thought, “how different can it be?”. Answer: pretty different.

I’ve drunk the Gnome/KDE kool-aid, in that I now accept that you hunt around in panels to make stuff work instead of editing text files. I’ve been putting off using either system because I could barely grok what a window manager was, much less a “Desktop Manager”. But by using Ubuntu I could take the plunge all at once, so to speak, without having to assemble the parts myself. Of course, a certain amount of control is lost, but frankly life’s too short to get involved in all the minutae of modern Linux.

Anyway, back to KDE. It’s different enough for me to decide I’ll be sticking with Gnome in the future. (Also, the graphical style reminds me too much of a horrific Delphi app we had to try to maintain back in the day, along with every web app based on PHP I’ve ever seen.) Some apps that I’ve been getting fond of (X-chat and Quod Libet, for example) aren’t “native” KDE apps.

All in all, KDE is interesting, but I still feel Gnome is the better Linux desktop for me.

Monday, 2006-02-27

Quod Libet and the Audioscrobbler plugin

Quod Libet is an audio player for Unixes. It has nice file renaming capabilities and is generally a great player. I wanted to use the Audioscrobbler plugin so that I could update my Last.fm playlist. However, I couldn’t get it to work with the version that came with my Ubuntu install (5.10).

The solution was simply to run the latest version (0.17.1). Now I can continue to expose my poor taste in music, from the comfort of Linux!

Monday, 2006-02-20

Formatting FAT32 under Windows XP

Apparently you can’t format volumes larger than 32GB in FAT32 under WinXP. Anything larger will have to use NTFS. I’ve got a largish drive in a USB-connected enclosure that I’d like to use under Linux, so NTFS was out. As far as I know, the Linux support for it is still experimental.

Well, as the good book says, Google, and ye shall find. The first suggestions from MS was to boot into Win98/ME and use their FORMAT command to do this. This is akin to performing brain surgery with a butter knife dipped in pus.

But I also found Jens-Uwe Mager’s Windows port of the Linux command mkdosfs that worked like a charm.

So now I’m backing up the MP3’s on this machine. Can life get much better?

Friday, 2006-02-17

I ❤ Linux

I borrowed a Powerbook G4 from work yesterday, just to see what all the fuss was about. And sure, it was gorgeous, but it wasn’t for me. Give me a 3-year old surplus lappy running Ubuntu anyday. Sure, mostly it’s a question of what you’re used to, but I still didn’t feel at home with the Mac.

If any Mac zealot wants to convert me, however, I’m open for some free kit…

[Apologies for the Unicode-impaired, the weird char in the middle of the title is supposed to be a heart.]

Thursday, 2006-02-02

Keyboard shortcuts in web apps

I’ve started using the keyboard shortcuts in Bloglines more and more. Thankfully, they share the J and K keys for next and previous item with Gmail. (I believe this is from vi, mnemonics are jump and klimb). S jumps to the next subscription, and R refreshes the list of subs.

This is incredibly useful. I find myself reaching for the keyboard when reading blogs with lots of entries, and of course when using spit Outlook Web Abscess. Naturally, even if MS discovers keyboard accelerators, they will most definitely not be industry standard and we can expect to see them in 2009.

Tuesday, 2006-01-31

Converting from ISO-8859-1 to UTF-8 in Perl

When posting my observations via email any Swedish characters are converted to quoted-printable ISO-8859-1 by Gmail. However, this blog is in UTF-8. This is how I translated the input from the mail message.

#!/usr/bin/perl -w
use strict;
use MIME::QuotedPrint qw( decode_qp );
use Encode qw( decode encode );

# split the mail message
my ( $headers, $body );
{
    local $/ = undef;
    ( $headers, $body ) = split( "\n\n", <STDIN>, 2 );
}

# decode the qouted-printable input
$body = decode_qp( $body );
# decode to Perl's internal format
$body = decode( 'iso-8859-1', $body );
# encode to UTF-8
$body = encode( 'utf-8', $body );

print $body, "\n";

The result is piped into a second script that formats the actual posting.

Pretty basic, eh? But until you know how, it can be a bit frustrating getting this to work.

Thursday, 2006-01-26

Dual monitors

I bit the bullet and grabbed a second monitor from a departed co-worker. I’ve been making do with VirtuaWin, a utility that provides multiple desktops on Windows and that I really like. But I felt that I needed that real sysadmin/Bloomberg vibe and wanted 2 flat panel monitors taking up precious desk space.

The primary monitor is a Dell 19-inch LCD, attached to the DVI port of the video card. The second is a Dell 17-inch attached to the analog port. The difference is noticeable, even though the 17-incher has the same resolution and thus is pixel-for-pixel crisper. But there is some colour bleeding around window bar fonts. Also, it’s really hard to get more or less the same brightness on both monitors.

But so far, I like it. I’ve pushed Miranda, a putty session, the Bloglines Firefox window, and an Outlook window showing the unread mail search folder onto the secondary monitor. This leaves me space to concentrate on the all-time- consuming support box and TOAD session I seem to live in these days.

Both monitors have USB hubs, so between them, the 4-5 ports on the box, and my 4-port USB hub, I have more USB ports than I can shake a stick at. I’m old enough to remember life without USB. USB rocks.

Friday, 2005-12-30

Perl tools for mp3s

I recently had to edit a bunch of mp3s. I found the following Perl modules helpful.

  • mp3cut. Contains a script mp3cat that concatenates mp3 files. Very simple to use.
  • MP3::Tag. For all your mp3 tagging needs. Contains a script mp3info2 that can read and update tags.

These modules work fine under Cygwin running in Windows.

Thursday, 2005-12-29

Sony Librie coming to the West?

Engadget reports that Sony may be launching an e-ink reader like the infamous Librie (known primarily for its disastrous ebook selling scheme).

An e-book reader needs to have the following characteristics:

  • light weight
  • great battery life
  • good screen
  • access to many different file formats

Even though I suspect lots of publishers and authors are quaking in their boots at the prospect of an iPod for books, I still think that it would be a win. Sure, some people would make it a point to download scanned copies of books, but the legitimate usages outweigh them. Need to read a big document from work? Put it in the e-book reader. Same goes for long emails and web articles. How about books that are legal and open, like Baen’s? They sure are easier to read in an e-book reader than on a screen.

If you combine the reader with a UMTS chip and a web browser, that’s even better (but it would cut into battery life).

The point is, if the platform is open, markets will arise to address user’s needs. Cripple the product with DRM, and the only thing people will remember about you is your stupidity. (Yes Sony, I’m talking about you…)

Wednesday, 2005-12-28

iTunes “skip shuffle” and “remember playback” settings

I grabbed a bunch of audio books in mp3 format but was shocked, shocked I say! when the files weren’t bookmarkable (i.e. they didn’t remember where I stopped listening) and worse, the files were included in the shuffle. When you have 1,388 files, each a minute long, that kinda sucks.

I pecked around in iTunes a bit and saw that there was a setting in the Info->Options panel for a track that included the checkmarks

  • Remember playback position
  • Skip when shuffling

Perfectomento! BUT… you can only set these options one file at a time. Damn you Apple! Damn you to hell!!

(If you don’t use AppleScript. Which I don’t. Because I don’t have a Mac.)

I found 2 links on Google which offer some alternatives. The reason for this post is essentially that del.icio.us is down ATM and I need somewhere to post these:

Update 2005-12-29: basically there are two ways of handling this.

  • Convert to AAC format and rename

I tried this variant, but the resulting files were much larger than the files in mp3 format. I guess you can get around this by playing with the converting options, but I suspect they only apply to importing from CDs (see the second link above).

  • Merge the mp3 files and set the appropriate settings manually.

I went with this variant. A quick search of CPAN resulted in a bunch of utilities I could use. I merged the tiny files into chapters, then added what ID3v2 tags I could. The rest were added in iTunes, along with the required playback and shuffle options.

I will try to find out more about ID3v2 tag handling later, so as to automate this even more.

Thursday, 2005-12-08

Getting things done with Outlook

Rui posts some tips on how to manage your email more effectively with Outlook.

We’ve been using some of those techniques with the support box. I use “reply to all” for all mails, so we always get a copy of the reply in the same conversation. As we are two working with this, it’s a godsend to have a complete record of the conversation around the issue.

We use the nifty coloured flags to manage workflow. My issues are orange, my coworker’s are blue, issues awaiting answers are purple, escalated issues are green etc. This works pretty well, as you can easily spot issues that haven’t been addressed yet.

We have 2 archives, one based on the year’s quarter, and one where we put all escalated issues. Having mails sorted by conversation makes it easy to archive.

However, Rui’s tip about using a smart mailbox to combine your inbox and Sent items makes a lot of sense. It addresses the shortcomings of having to do a reply to yourself all the time.

We’ve worked around the limitations of Outlook’s default filtering by writing a little perl skript that counts the number of issues and alerts us if they are too old.

Tuesday, 2005-11-29

Brute force is good, sometimes

I had to try to extract about 12,000 IP addresses from our click database, over a period of one and a half months. The table is famously big[1] (140,000 rows a day) and indexed on the date.

I don’t know what flew in me, but my first attempt was to generate SQL queries for each IP and run that query over the timespan. That’s 12,000 queries at about a minute apiece, in other words 8 days. Plus I couldn’t run it all the time, as it bogged down the database.

Then I found a better way. I took all rows for the timespan and checked if the IP was in a hash. If it was, I kept it, otherwise I just went on to the next one. I can’t believe I was so stupid I tried the first approach at all, and that I’m now blogging about it…

[1] in our system, you probably have much bigger tables.

Saturday, 2005-11-12

Ubuntu rocks!

Due to a little accident, my wife’s standard laptop is hors de combat — basically, I dropped our son on it (from a small height, I hasten to add) and the power connection broke. So it boots, for about 5 seconds, before discovering that the battery is flatter than Kansas.

I have in my possession an elderly laptop with no more than 256M of RAM, much too little to run a modern Microsoft OS. So I decided to check Ubuntu out. This is supposed to be “Linux for human beings”, so I figured this would be OK for non-geeks.

I downloaded an install CD via BitTorrent and used it to install it. The installation went really well. I had to fight my old-skool Debian and OpenBSD instincts and just let things go as designed. Ubuntu has made a great product — it installed seamlessly on the lappy and presented a clean, workable graphical interface that I think will be acceptable for Linux-o-phobes.

The only thing that didn’t work out of the box was the wi-fi pc-card I bought expressedly for its OpenBSD compatibility. However, I discovered that I had no less than four wi-fi cards lying around, and the oldest 3Com card worked fine.

I’ve been using this laptop all day (in between re-stacking our woodpile) and I really enjoy it. Small stuff, like Alt-Tab window-switching and Alt-F4 window close work exactly like in Windows. But having a real Debian system underneath just feels sooo much better than Windows crap leavened with Cygwin goodness.

Tuesday, 2005-10-18

Gartner: IT will survive bird flu

Hilarious article in El Reg:

If the latest news from the wonderful world of Pandemia has got your organisation running around like a headless Romanian chicken, then don’t fret: Gartner has released an essential guide to avian influenza, aka bird flu, aka Black Death II, which mercifully states that although you will most likely be lying dead among the smouldering ruins of society, your IT infrastructure can be saved for future generations.

The article supplements Gartner’s tips (“Assign someone in your business to track biological threats such as the avian flu. […]”) with the following:

  • Bulk buy flowers and coffins as part of your business continuity preparedness for a permanent workforce outage scenario.
  • Assign someone in your business to stand on the roof and shoot anything with wings.
  • Set up email autoresponders to communicate: “Sorry, I’m out of the office due to death.”
  • Lock infected employees in their homes with broadband access and then paint a red cross on the door.
  • Leave a full set of instructions on how to reboot the servers for the next generation emerging blinking into the post-apocalyptic landscape.
  • Try to stay calm.

Thursday, 2005-10-06

God hates Ruby

Rui:

The last couple of hours were spent poring over a couple of Rails applications, and arriving at the (predictable) conclusion that Ruby can be just as incomprehensible as Perl when written by squirrels on the same kind of crack.

Shouts to Anders at ork…

See also www.GodHatesPerl.com :-)

Tuesday, 2005-09-27

Coding VBA

The Daily WTF:

At some point in your career as a programmer, you will be tricked into maintaining a VBA (Visual Basic for Applications, aka Word/Excel macros) application. I’d tell you how to get out of it, but I really don’t think it’s possible. All I know is that at some point between admitting to have knowledge of Excel and cursing under your breath while typing VBA, you will be coaxed into giving some “quick help” on a spreadsheet.

Then there follows an astounding example of horrible horrible VBA code, and the replacement: 3 lines.

There were some dangerous moments in the beginning of my current employment when people were nerving themselves to ask me for VBA help, but now I think it’s forgotten. And if it isn’t, I have to hunt down those people and administer more memory suppressants…

Wednesday, 2005-09-14

The good old days

Matthew: Generation VIC20.

Chris: So Dad, what’s a computer science class for at school?
Me: Well, you learn to program there for example.
Chris: Program?
Me: Yes, to write computer programs using a special language.
Chris: You mean like games?
Me: Well, yes I suppose.
Chris: Like Star Wars Knights of the Old Republic?
Me: Umm, no.

Classic.

I guess you could learn a lot by copying source code, even if it was just BASIC spaghetti code. With line numbers.

Thursday, 2005-09-01

“Proprietary”

For me, and many others, the word “proprietary” is pejorative. Proprietary tech is closed, not open; hidden, not shared; expensive, not free.

But I’ve noticed that in certain contexts, “proprietary” is loaded with positive context: it denotes quality and smartness that you only get when you pay clever people lots of money to develop great technology.

This is jarring.

Tuesday, 2005-08-30

Date in another timezone

Cool hack in Unix: if you know the zonefile abbreviation for a timezone, you can use it to get the date there:

$ TZ=PST8PDT date
Tue Aug 30 05:07:39 PDT 2005

This also works:

$ TZ=America/Los_Angeles date
Tue Aug 30 05:08:17 PDT 2005

Timezone files are in /usr/share/zoneinfo on OpenBSD and Linux.

Thursday, 2005-08-25

Sony DRM

Mike:

Sony really doesn’t like people being able to do what they want with Sony devices, so the thing is rife with all sorts of crippling roadblocks to innovation (I think the technical term for this is DRM, but I just call it teh suq).

Monday, 2005-08-22

Screen quickstart

This is quick basic intro to GNU Screen.

If you haven’t installed screen, do so. It rocks.

Starting up

Start screen. You’ll get a splash screen. Hit space to make it go away.

Depending on your flavour of *nix, you’ll get between 1 and n screens. First one is numbered 0. Try to switch to screen 1: Ctrl-a 1. If you get a message, create screen 1 with Ctrl-a c (create). Now you can switch back and forth between 0 and 1 with Ctrl-a 0 and Ctrl-a 1.

Want a “real” Ctrl-a? (If you’re in Emacs, you do.) Type Ctrl-a a.

Detaching

Start an editor in one screen, load a file and start editing. Detach with Ctrl-a d (detach). Logout of the shell, then login again. Attach to the screen: screen -r (reattach). You should be back where you left. Continue editing.

Finally

Screen is perfect for flaky connections, you’ll be back where you left off even if you get a hangup.

You can use screen -r -d to cleanly reattach from another session.

If you want a bunch of screens at startup, edit your ~/.screenrc. Mine looks like this:

shell -$SHELL
screen -t SHELL0  0
screen -t ROOT    1
screen -t SHELL2  2
screen -t SHELL3  3
screen -t SHELL4  4
screen -t SHELL5  5

The first line starts the current $SHELL in login mode. The others set up six windows and gives them titles.

Type man screen for more info.

Happy screening!

Update: here’s a more full-featured tutorial. (Via NTK.)

Saturday, 2005-08-20

GUT-DL

… or the the Grand Unified To-Do List: does it exist?

I’ll soon be having 3 main sources of things to do:

  • the Bugzilla system, used for stuff like accounts, and also to keep track of things we have committed for the tech team to handle
  • the soon-to-be-implemented issue tracking system for support work
  • ad-hoc stuff using Outlook (phone calls, random cow-orkers wandering up and presenting requirements for multi-week projects in 2 sentences, &c)

Wouldn’t it be great if I could get a unified view of all this, so I could slice and dice and prioritise GTD-style?

Friday, 2005-08-19

Favourite comment

Peter mailed this to the internal tech list:

// FIXME: Please note that this is a fulhack, made in panic before christmas.
// Should be removed och purged ASAP.
// ... Well, that didn't happen... surprised?
// ... and it just keeps growing...

(A “fulhack” is Swedish for “ugly hack”.)

Wednesday, 2005-08-17

Django CRUD

Matt has written a nice tutorial on how to use Django in a simple CRUD situation: Django Generic Views: CRUD.

(CRUD, by the way, stands for Create, Read, Update, Delete — basic database manipulation. The title of this post is in no way a reflection on Django on my part.)

Matt and others are very excited over Django — it’s Ruby on Rails for Python. I’ve been meaning to learn Python for a long time, but lately I’ve felt I’m too old a dog for new tricks. More on this in a later post, maybe.

Tuesday, 2005-08-16

Loving Perl

milardj:

Loving Perl is starting to resemble an 80’s John Hughes movie - really digging this girl but slightly embarrased about it and afraid you’re friends will find out.

Why am I still on Windows?*

Aristotle writes:

Hooking Markdown into the browser, and in fact into any application that has text input widgets at all, is actually more simple than might at first appear: you just need xclip (or some equivalent, I suppose, if you.re not on X11). This little tool can dump any of the X11 selections, such as the clipboard, to its stdout or slurp its stdin into one of the selections.

Thus, I have this shell oneliner bound to a keyboard shortcut in my window manager:

xclip -o -sel clip | Markdown | SmartyPants -2 | xclip -sel clip

With that in place, I simply write my entries in a natural format, then I copy, hit a key, and paste, and there they are, turned to HTML and typographically smartened. Presto.

Anyone know of a Windows analogue of xclip?

* Well, at work I support the damn OS, and at home I just enjoy the eye-candy…

Update: Jim pointed me to UnxUtils and the programs pclip.exe and gclip.exe. Here’s Jim’s post on how to use these with PyTextile, and here’s my version for Markdown + SmartyPants

c:\cygwin\usr\local\bin\pclip.exe | \
c:\cygwin\bin\perl.exe c:\cygwin\usr\local\bin\Markdown.pl | \
c:\cygwin\bin\perl.exe c:\cygwin\usr\local\bin\SmartyPants.pl | \
c:\cygwin\usr\local\bin\gclip.exe

The gnarly code is due to my choice of paths in Windows.

The code works, sorta, but it doesn’t return DOS line endings (\r\n). I guess you could hack Markdown to do this.

Thursday, 2005-08-11

Personal project blues

Russ talks about personal devel projects and the need to find time to do them.

I’m in a similar situation. I really need to do more development in my spare time, if only because it’s fun. I also need to learn more programming (especially in the Java space) for professional reasons. The hard part is finding the time to do it.

I have plenty of excuses, first and foremost being three kids from the ages of three to fifteen, and a house built in the 20s, renovated in the 40s and extended in the 60s. I should also be doing some sort of exercise before my belly becomes too noticable.

Maybe moving to Windows at home was a mistake. It’s too easy just to futz around on Windows, to do work you need a Unix laptop with a basic window manager and an instance of Emacs.

Tuesday, 2005-03-08

OpenBSD wi-fi hardware

This list is here so that I can check out hardware in stores via the phone.

  • ADMtek ADM8211 based CardBus/PCI adapters (atw) (G)
  • Aironet Communications 4500/4800 ISA PnP, PCMCIA and PCI 802.11b adapters (an)
    • Aironet 4500/4800
    • Cisco 340/350
  • Atheros AR521x based CardBus 802.11a/b/g adapters (ath), including: (G)
    • 3Com 3CRPAG175
    • Aztech WL830PC
    • D-Link DWL-A650
    • D-Link DWL-AB650
    • D-Link DWL-AG650
    • D-Link DWL-G650B
    • Elecom LD-WL54AG
    • Elecom LD-WL54
    • Fujitsu E5454
    • Fujitsu FMV-JW481
    • Fujitsu E5454
    • I/O Data WN-AB
    • I/O Data WN-AG
    • I/O Data WN-A54
    • Linksys WPC51AB
    • Linksys WPC55AG
    • NEC PA-WL/54AG
    • Netgear WAB501
    • Netgear WAG511
    • Netgear WG511T
    • Orinoco 8480
    • Orinoco 8470WD
    • Proxim Skyline 4030
    • Samsung SWL-5200N
    • SMC SMC2735W
    • Sony PCWA-C700
    • Sony PCWA-C300S
    • Sony PCWA-C500
  • Atheros AR521x based PCI 802.11a/b/g adapters (ath), including: (G)
    • D-Link DWL-A520
    • D-Link DWL-AG520
    • D-Link DWL-G520
    • HP NC4000
    • Linksys WMP55AG
    • Netgear WAG311
    • Netgear WG311
    • Proxim Skyline 4032
    • Senao NL-5354MP
  • Atmel AT76C50x based USB 802.11b adapters (atu), including: (G)
    • Acer Peripherals AWL300
    • Acer Peripherals AWL400
    • Aincomm AWU2000B
    • Bluetake BW002
    • D-Link DWL-120
    • Geowave GW-US11S
    • Linksys WUSB11
    • Linksys WUSB11-V28
    • Netgear MA101 rev B
    • OQO model 01 builtin wireless
    • Ovislink AirLive WL-1120USB
    • OvisLink AirLive WL-1130USB
    • SMC 2662W-AR
    • SMC 2662W-V4
  • Intel PRO/Wireless 2100 802.11b adapters (ipw) (G)
  • Intel PRO/Wireless 2200BG/2225BG/2915ABG 802.11a/b/g adapters (iwi) (G)
  • Intersil PRISM-2-3 based 802.11b Compact Flash adapters (will be detected as PCMCIA adapters) (wi)
    • Buffalo AirStation
    • D-Link DCF-660W
    • ELSA XI800
    • Linksys WCF12
    • Netgear MA701
  • Intersil PRISM 2-3, Lucent Hermes and Symbol Spectrum 24 based PCMCIA 802.11b adapters (wi), including:
    • 3Com AirConnect 3CRWE737A
    • ACTIONTEC HWC01170
    • Addtron AWP-100
    • Agere Orinoco
    • ARtem Onair
    • BUFFALO AirStation
    • Cabletron RoamAbout
    • Compaq Agency NC5004
    • Contec FLEXLAN/FX-DS110-PCC
    • Corega PCC-11
    • Corega PCCA-11
    • Corega PCCB-11
    • Corega CGWLPCIA11
    • Dlink DWL650 revisions A1-J3
    • ELSA XI300
    • ELSA XI325
    • ELSA XI325H
    • EMTAC A2424i
    • Ericsson Wireless LAN CARD C11
    • Gemtek WL-311
    • Hawking Technology WE110P
    • I-O DATA WN-B11/PCM
    • Intel PRO/Wireless 2011
    • Intersil Prism II
    • Linksys Instant Wireless WPC11
    • Linksys Instant Wireless WPC11 2.5
    • Linksys Instant Wireless WPC11 3.0
    • Lucent WaveLAN
    • NANOSPEED ROOT-RZ2000
    • NEC CMZ-RT-WP
    • Netgear MA401
    • Netgear MA401RA
    • Nokia C020 Wireless LAN
    • Nokia C110/C111 Wireless LAN
    • NTT-ME 11Mbps Wireless LAN
    • Planex GW-NS11H Wireless LAN
    • Proxim Harmony
    • Proxim RangeLAN-DS
    • Samsung MagicLAN SWL-2000N
    • SMC 2632 EZ Connect
    • Symbol Spectrum24
    • TDK LAK-CD011WL
    • US Robotics 2410
    • US Robotics 2445
  • Intersil PRISM 2-3 and Symbol Spectrum24 based PCI 802.11b adapters (wi), including:
    • 3Com AirConnect 3CRWE777A PCI
    • Belkin F5D6000 PCI (a rebadged WL11000P)
    • Corega CGWLPCIA11 PCI
    • Eumitcom WL11000P PCI
    • Dlink DWL520 PCI revisions A and B
    • Global Sun Technology GL24110P PCI (untested)
    • Global Sun Technology GL24110P02 PCI
    • Intersil Mini-PCI
    • LinkSys WDT11 PCI (a rebadged GL24110P02)
    • NDC/Sohoware NCP130 PCI
    • Netgear MA301 PCI
    • Netgear MA311 PCI
    • US Robotics 2415 PCI (rebadged WL11000P)
    • Nortel E-mobility 211818-A
    • Symbol LA4123
  • Intersil PRISM 2.5/3 based USB 802.11b adapters (wi), including:
    • Acer Warplink USB-400
    • Actiontec HWU01170
    • AirVast WM168b
    • Ambit WLAN
    • Apacer Wireless Steno MB112
    • ASUS WL-140
    • Compaq W100
    • Corega WLUSB-11
    • Corega WLUSB-11 Key
    • D-Link DWL-120 (rev F)
    • D-Link DWL-122
    • I-O DATA WN-B11/USB
    • Intel PRO/Wireless 2011B
    • Intersil Prism 2X
    • JVC MP-XP7250
    • Linksys WUSB11 v3.0
    • Linksys WUSB12
    • Melco WLI-USB-KB11
    • Melco WLI-USB-KS11G
    • Melco WLI-USB-S11
    • Microsoft MN510
    • Netgear MA111 (version 1 only)
    • Pheenet WL-503IA
    • Planex GW-US11H
    • Siemens SpeedStream SS1022
    • Sitecom WL-022
    • Syntax USB-400
    • US Robotics 1120
    • Z-Com XI-725/726
    • Z-Com XI-735
    • ZyXEL ZyAIR B-200
  • Ralink RT2500 based CardBus 802.11b/g adapters (ral), including: (G)
    • MSI CB54G2
    • Surecom EP-9428-g
  • Ralink RT2500 based PCI 802.11b/g adapters (ral), including: (G)
    • ASUS WL-130g
    • Minitar MN54GPC-R
  • Raytheon Raylink and Aviator 2.4/PRO PCMCIA 802.11 FH adapters (ray)
  • Realtek RTL8180L based CardBus 802.11b adapters (rtw), including: (G)
    • Corega CG-WLCB11V3
    • Netgear MA521

(G): Drivers for hardware marked with (G) are only included in the GENERIC kernels, but are not included on the various distribution floppies (including the cd-rom boot image).

(Source: OpenBSD i386 hardware list.)

Sunday, 2005-02-27

Time tracking software

I feel a need to keep an eye on what the hell I’m doing at work, and how long time I spend doing it. I know that there are lots of apps around which help you track time spent on projects, but most of them are graphical apps. I wanted a console app that could live in my screen session so that I could work from home and still have a totalitarian view of what I was doing at any given point in time.

A quick trawl through Freshmeat didn’t turn up anything other than the aforementioned graphical apps, so I happily sat down and started work on my own, using my recently acquired knowledge of Perl’s terminal capabilities. I wanted a full-screen app that I would just press a button in and switch tasks.

While writing this, I needed a trivial time conversion that I had forgotten. While googling for it, I discovered a time tracking app written in Perl that used it for its own purposes: tt. Ironic, huh? The app isn’t exactly what I envisioned, but it’s more full-featured than mine, so I’ll give it a try. Otherwise I’ll develop my own app further.

Friday, 2005-02-25

More on Perl

I’ve tried learning Python through Mark Pilgrim’s excellent Dive Into Python, but I’ve discovered that I haven’t enough time to really get into it. Perl is the language I use most days, both in work and personally, and it’s hard for me to break out of the Perlish mindset. Any “serious” Python coding would be sysadmin and report stuff, and I’d just try to remake Python in Perl’s image.

I’ve finally grokked Perl references, and I’m reading the second edition of the Perl Cookbook with real pleasure. Some of the quirkier passages from the first edition are gone (and Randal Schwartz seems to be persona non grata in this edition), but that’s outweighed by the treatment of Perl’s Unicode support (crufty and gnarly though it may be — the price of backward compatibility) and the new switch statement. Perl must be the only language older than 10 years where switch is an experimental feature.

Jim has apparently volunteered to become the Perl expert at his salt mine, for which he deserves equal praise for foolhardiness and pity. I think that he’ll find enough cool stuff in Perl to satisfy his C++ roots, what with all the esoterica available in the dark corners of CPAN (Acme::Bleach, anyone? Or how about Acme::Apache::Werewolf, by a hardcore Warren Zevon fan?)

I’ll never be a Perl guru, but I do think I can become a competent Perlist.

Thursday, 2005-02-10

Tags are the new black

Today in #mobitopia:

 16:16 <Netminder> tags are the new black
 16:16 <diego_> heh that's good :)
 16:16 <Moof> Netminder: I'm currently writing tag-aware blogging software
 16:17 <diego_> I am writing a tag-aware operating system. There will be no
       files or applications or anything. Only tags.
 16:17 <Netminder> my pet monkey just received first round funding on a
   tag-enabled venture he's working on.
 16:17 <diego_> I am talking to Shell as well, developing tag-based fuels.

Monday, 2005-02-07

Typical

I spent my free time this weekend re-designing my app for calculating Swedish holidays. It was pretty crufty, having evolved from a simple app to update our time-reporting database to being all things to all people — at least those that grok command-line Perl. Let’s face it — that audience is me.

So I ripped out the central part which actually computes the dates and put it in a module. I wanted to write a CGI that could be used online, so I had to research how to install Perl modules as a normal user, enable taint mode et cetera et cetera. I’m 15 minutes from deployment when I suddenly think “hey, this is so freaking simple it must have been done already” — and did a google for “svenska helgdagar”.

Of course, #2 on that list is a worthy competitor, with English and Swedish translations, flag days, and output to different calendar formats.

Humph.

Anyway, my efforts are here. Python version next!

Saturday, 2005-02-05

Gnus and Microsoft Outlook

For a long time I have been having trouble sending mail to people using Microsoft’s mail clients Outlook and Outlook Express. I use Gnus, an all-singing, all-dancing news-mail-and-everything reader for use in Emacs.

The trouble was that if I included any 8-bit characters in the header of the message, Outlook would translate any 8-bit characters in the body of the message to an equal sign and two hex characters. This was intensely irritating, as I naturally assume that all free software is superior to commercial offerings, especially Microsofts.

The trouble is that the version of Gnus I’m using (v5.8.7) doesn’t encode the headers in quoted-printable, thus confusing Outlook no end.

The solutions is to place the following in your .emacs or .gnus file:

;; iso-8859-1 support for headers
(require 'gnus-msg)
(add-to-list 'gnus-group-posting-charset-alist
     '(message-this-is-mail 'iso-8859-1 (iso-8859-1)))

Thanks to Kai Großjohann for this info.

Keywords: Gnus, gnus newsreader, GNU/Emacs, Emacs, Xemacs, MIME, mime, quoted-printable, transfer-encoding, Microsoft Outlook, Outlook Express, mangled, 8-bit characters.

Note: this was originally posted on another server, I’m posting it here in an effort to clean up my online life.

Saturday, 2005-01-29

Single point of failure

Russ got cracked. His website (and all the others on the same box) was defaced, his logs erased, and his life disrupted. The idiot responsible probably had no motive other than racking up a big number of defaced sites.

This points to a scary thought: many people nowadays have their professional reputations on one server: weblog, email, development. If this box is cracked, you can spend a lot of time trying to restore from backups (you do have backups, don’t you?), while your reputation crumbles around you. Your server has become a single point of failure.

Having a computer is hard. Just owning a Windows box implies being a sysadmin. Unix systems are generally more secure, but you do need to keep up on advisories and patches.

I see a need for a service that handles security on your box, with money back if you do get cracked. But that service probably exists, and costs $BIGNUM per month. The seemingly low barrier to entry in the online world — a couple of hundred for a colo box — carries a hidden cost.

Friday, 2005-01-28

Bugzilla needs RSS

An RSS feed of bugs from Bugzilla would be just great.

There’s an extension providing this but it isn’t exactly trivial to install.

It doesn’t help that the machine we’re running Bugzilla on does at least a hundred other things, all mission-critical. We really need a scratch/support box for messing with this kind of stuff.

Sunday, 2005-01-23

Upgrading the Mac mini

Russ shows how to upgrade the RAM in the Mac mini.

Russ doesn’t say, but I’m pretty sure that this voids the warranty on the beast. You can read than between the lines in quotes such as:

You have to jam the putty knife into the side of the machine, then pull back (with enough force to bend the putty knife) and it’ll pop and crackle and come apart. Just jamming the putty knife in though is quite the feat - it’s definitely a snug fit and just doesn’t feel like you’re doing the right thing at all.

You think?

Apple could have made this a bit easier, I’m sure there’ll be blood on the cases of more than few minis. But it’s definitely possible and straight forward to do upgrades yourself.

Well, it isn’t in Apple’s best interest to make it easy for consumers to upgrade their minis. In the first place, it really makes it hard to provide customer support when someone has jammed in some random hunk of RAM in the machine without reading the instructions or spec. Apple cuts down on the tech support questions plagueing the PC world by providing a locked down, controlled platform.

Secondly, it removes a lucrative income source in after sales upgrades. And thirdly, and possibly most important, making it possible for users to self-service their mini would ruin the looks of the machine.

Saturday, 2005-01-15

Changing machines

Arghh!! Engineering a hardware upgrade suddenly doesn’t seem worth it when you have to contend with re-installing every little damn piece of software that’s needed to make Windows bearable.

My gnus can’t display HTML mail anymore, and trying to fix that leads to installing lots of little packages from cygwin just to compile a program that dumps core.

The Oracle client is the install program from Hell.

The new monitor can only do 85 Hz @ 1200x1024, but then you get weird moving Moiré patterns all over the screen. Higher resolutions don’t have this, but then you only get 75 Hz.

Firefox will export bookmarks, but not the ones in your toolbar — which are all the ones containing the weird internal application URLs that no-one can remember.

Update: all of the four monitors we bought have the same defect. As I generously traded in my previous monitor to a co-worker who was suffering under a execrable Dell 17” “short-neck” (read as “shit-neck”) I now have to put up with an older 17” Dell monitor which is much worse than my previous one.

Also, re-packing monitors suck. They are heavy and hard to fit into the boxes again.

Teaching kids to code

Matthew asks how one goes about to teach kids to code. Viking is too small yet, but it’s an interesting question. I know Hanna is quite proficient in HTML, mostly by copying and pasting, but Leo has shown no interest whatsoever in coding.

Part of the problem is the polished and complex nature of todays computers. In our day, you could slavishly copy pages of code and get something that worked. Even if it was just copying, you got down and dirty with the code. Some of it stuck. A curious kid (which I was not) could explore further, learning more and more. Whether learning Basic and VIC-20 assembler was a good thing is another question…

But now? Who can feel that they can produce something like Doom 3 by themselves?

Having said that, I believe a programming environment should have a graphic component. A former co-worker’s son loves (loved? it’s been a while) a DOS-based program for scripting dungeon adventures. A language of that kind could introduce the building blocks of programming — loops, conditionals, events — in a fun way that gives instant feedback and makes debugging fun.

An OO component could make it easy to “clone” your succesful monster, trap, whatever, and re-use the code. Introducing test cases is perhaps overkill at this stage…

I haven’t seen Lego’s Mindstorm stuff, but if anyone can make IDEs for kids, it should be them.

Update: Bill Ward writes in a comment:

For me it was BASIC on the Commodore too. But today’s kids have options as well. I think Javascript may be a good choice. My wife is taking a Flash class at the local college, and teaching me what she is learning. That could be a good choice too, except for the fact that it’s rather expensive.

I remember someone prophesying that Windows Scripting would be the next “laymans programming language”, but I haven’t seen MS promoting it that way. Having an easy to learn powerful scripting language built into the OS would introduce lots of people to programming, not just kids.

Konfabulator for Windows

Russ gives Konfabulator for Windows a big thumbs up. And sure, it’s cool, and the widgets are really nicely done graphically.

But I’m still too much of a textmode guy to really appreciate it. Even though I use an analogue watch, I prefer the modeline of my emacs to show me the date, time, and week of year. I prefer to ask the mobibot the values of the stocks I follow, and the weather can be gauged by looking out of the window.

Besides, I have my screen full of apps. I never see my desktop.

But perhaps I’ll come round. If only Windows had working virtual desktop support.

Frank has some more thoughts.

Regarding the mobile angle, I’m not wholly convinced that Konfabulator would work “out of the box”. It’s very mouse-oriented (being based on JavaScript, after all). There are some difficulties in getting it to work in the majority of devices that have keypad/joystick input.

But for ease of development, I’m sure it can’t be beat.

Update: I maybe should have mentioned the number 1 reason I didn’t stick with Konfabulator: no nixie tube clock widgets.

Comments

Nick Wilson writes:

Besides, I have my screen full of apps. I never see my desktop

Being a 100% Linux guy, the first thing I do when i boot is open about a half dozen command line screens. I like the look of konfabulator but isnt it just a pretty toy?

For people that spend much of their waking day in front of a pc, like me, its so much simpler to be “text orientated”. Whereas I browse graphically, have some neat games and stuff I occasionaly get time to play, i really do appreciate a good functional no thrills text app.

Take email for example, Mutt is my app of choice, its ugly, but highly functional and very powerful.

I think things like konfabulator will be the ‘darling of the moment’ at very best. Give me solid functionality without thrills any day of the week..

Nick W

I’m with you all the way, Nick, but I still think we (Linux users and Windows “power users”) are a minority. Konfabulator represents the eye-candy market which is much bigger than the fast-and-effective command line market. It may be faddish, but there’s money in them thar faddish hills.