Perl programmers are psychopaths

I always suspected that anyone who likes to write Perl programs can’t be a healthy human being, but I didn’t know what evil, murderous psychopaths these people really are until I read this headline:

How to optionally kill a child and capture status if not killed

How could killing a child ever be optional? It’s illegal! It’s disgusting!

We must not tolerate these criminals in our midst any longer. Now is the time to put an end to that vicious disease called Perl.

Related posts

* 1 Comment.

Innovative Telephone Scams

There seems to be a new kind of scam, involving the telephone network: my sister (from her O2 mobile phone) called me (on my Alice fixed-line phone), but the Lithuanian premium-rate number 0037091005481 was displayed as caller ID - although we’re both in Germany! This has happened to dozens or probably hundreds of people in Germany in the last few weeks, apparently mostly to customers of O2 and Alice.

Of course, phone scams have been around for a while, but they usually involve social rather than technical engineering. The twist in this one is that the scammers must have hacked some kind of telephone switches. I don’t know what hardware and software phone providers are using these days, but I think it’s safe to assume that it’s connected to the Internet, and it’s increasingly involving VoIP. It’s also interesting to note that Alice cooperates with O2 for its mobile services. Integrating disparate systems can get messy - maybe a door was accidentally left open somewhere on the way?

Being curious, I called that mysterious number and heard the following recording:

Thank you for calling pentowork [sic? the name was hard to understand] payment system, the most efficient internet based billing solution. To receive your unique PIN code, you are required to hold the line for thirty minutes.

So the aim seems to be the same as in many other phone scams - get people to call an expensive number, and make them stay on the line for as long as possible. The three or four calls it took to correctly write down the recording cost me about €10, but I also got to enjoy some nice background music: Comanche from the Pulp Fiction Soundtrack and Man on the Moon by REM. I wonder what they selected for the remaining half hour…

More reports and speculation can be found at this thread about the scam (in German), some of which involves the Lithuanian secret service, letters to Vladimir Putin, emails to the Bundesnetzagentur and the fact that 0037 was also the international calling code of East Germany.

Related posts

* 1 Comment.

“gem install mysql” on Debian

Short note to myself and whom it my concern. If you try to sudo gem install mysql on a Debian system and it responds, after some working, with:

Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
(...)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
(...)
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

then this should be the solution for you: First you install libmysqlclient15-dev, which generates a mysql_config file, and the install the gem using the config.

Related posts

No Comments.

Keeping Up with Rails

I’m currently updating a not-so-small application from Rails 2.0.2 to 2.2.2 and it seems that about every other plugin is not compatible with the new version, because one or the other method was removed,  and I have to update them as well. Not such a big problem, if a compatible version exists, but takes quite some time, and I don’t understand that I have to go through this hassle (and other hassles) about everytime I update to a new Rails version. I don’t remember having this kind of trouble when I was working in Java Land. Can somebody explain?

Related posts

No Comments.

Developer Frustrations

I need unit tests for my unit tests testing whether the unit tests do correct tests or not. And a decent TestNG documentation.

Related posts

No Comments.

Developer Frustrations

Constructing software surely is satisfying work. But these days I dream of constructing airships. What if you could actually see the product of your very own hands, climb into it, loose the tag lines and fly away?

Related posts

No Comments.

Dirty Source Code

Why, oh why do classes, which have the purpose to remove something from documents, always have to be named “XYZStripper”? As a programmer faithful to the (often unwritten) coding conventions, I have to name instances of such classes of course - “stripper“. Unfortunately the names of those stripping methods do not quite match the juicyness of the class name. I would like to code things like stripper.renderNaked() or stripper.undoClips().

And with a swing of her hips
She started to strip
To tremendous applause
She took of her drawers

And with a lick of her lips
She undid all her clips
And threw it all in the air
And everybody stared

Chris de Burgh: Patricia the Stripper

Related posts

* 1 Comment.

Google Code Search

This must be either really new or - what seems more likely - I have slept over Google’s developments the last year. Google Code allows for a regular-expression-based search in publicly available source code. Nice one.

Related posts

No Comments.

Don’t Rethrow, Please

Dear fellow Ruby developers, please kick the habit of catching  and rethrowing exceptions, thus ridding your users of the expeptions’ stack traces. Recently I had to patch the source code of an ActiveRecord adapter as well as the underlying DBI implementation in order to find out where one particular exception was originating from. This makes debugging code really a hassle. I haven’t had this kind of problem in Java since nested exceptions.

Related posts

No Comments.

Scripting The Night Away

One of the very nice features of Mac OS X ist the ability of almost every reasonable application to receive AppleEvents, which makes the whole OS-app-bundle highly scriptable. Normally, Apple recommends that the scripting is done using a malevolent, programmer-unfirndly language named “AppleScript”. But there are alternatives, e.g. using Ruby together with the rb-appscript library.

As a first try, I wrote a small hack solving the following problem:

In Aperture, I normally sort photos in folders named YYYY_MM_DD, so when I sort them by alphabet (or Aperture sorts them and I cannot change the sort order), the oldest ones show up first. Unfortunately, iPhoto imported photos from my camera in the German format DD.MM.YYYY, so the alphabetical sorting is useless.

The ruby script goes like this:

require "rubygems"
require "appscript"
include Appscript

app = app(‘Aperture’)
puts app.projects
app.get(app.projects).each { |project|
  name = app.get(project.name)
  if name =~ /^\d\d\.\d\d.\d\d\d\d$/
    day = name[0, 2]
    month = name[3, 2]
    year = name[6, 4]
    app.projects[name].name.set(year+"_"+month+"_"+day)
  end
}

Related posts

No Comments.

Next Page »