Opening a Link in a New Back Window

Thursday, January 18th, 2007

Anyone know off the top of their head how to get a regular HTML link to bring up the linked document in a new background window when clicked? I do not control the document being linked to. The goal is to run through a site such as Artima or Digg and click all the interesting links. Then close the window and have all the articles opened there for me to read. In my case, I can control the page I’m linking from but not the page I’m linking to. This is for my personal aggrgeator so it only needs to work in Firefox. Ideas?

Upgrading WordPress

Monday, January 15th, 2007

I’ve upgraded this blog to WordPress 2.0.7 to close various security holes (though I very much doubt this release closes the last of them. WordPress is still breaking one of the most fundamental rules of HTTP: Thou shalt not use GET for unsafe operations.) Holler if you notice anything funky.

bad interpreter: No such file or directory

Thursday, January 11th, 2007

You sometimes see this error message when attempting to run a Perl, Python, or shell script that uses a shebang line to find the interpreter. For example,

$ hello.pl
-bash: hello.pl: command not found

(more…)

Perl and Multiple Line Ending Characters

Saturday, January 6th, 2007

Perl uses \n (the linefeed) as its default end of line character (record separator). You can change this with -0 option on the command line to be \r (carriage return), \r\n (carriage return linefeed pair) or something else. For example, this command sets the record separator to \r before replacing every occurence of the string foo with the string bar:

$ perl –pi -e -00d ‘s/foo/bar/g’ test.html

However my files are a weird mix of Unix, Mac, and Windows conventions. A few files may even use several line ending conventions in one file. Most modern text editors can autodetect and deal with this without any problem, as can XML parsers. However as near as I can figure, Perl cannot. It expects me to know in advance what kind of file I’m feeding it.

Is there any simple way around this? There’s more than one way to do it, but is there more than one $/?

REST Pessimists

Sunday, December 3rd, 2006

Several people have started to push back on the REST vs. WS-* and RELAX vs. W3C XSD and Rails vs. JEE fronts with a self-defeating argument. Well, of course, you’re right they say; but it doesn’t matter. The big vendors are selling these big, expensive complex solutions; and that’s all the CIO hears; so that’s all that matters. Sure, you can get the job done better/faster/cheaper with Rails/REST/RELAX, but you won’t. Well, to these pessimists I have a one-word response:

CORBA
(more…)

Right-wingers Don’t Understand Software

Saturday, December 2nd, 2006

Well, at least one right-winger doesn’t. Here’s a howler from Taylor Dinerman at Pajamas Media explaining why we shouldn’t bother to test weapons systems before buying and deploying them:

Certainly testing sounds reasonable. Why not make sure the stuff works before blowing billions on it? But the testing fixation ignores that, like software, most successful weapons systems are best debugged after being deployed. And some weapons systems were never tested at all before deployment.

(more…)