Archive for June, 2008

E-mail autoresponders suck. Please stop using them.

Wednesday, June 25th, 2008

I find it particularly annoying, when I write a mail to a list, like say, the NANOG list, and get emails in reply like:

From: EMAIL ELIDED

To: William Pitcock <EMAIL ELIDED>

Subject: NAME ELIDED is out of the office.

Date: Tue, 24 Jun 2008 12:02:35 -0400 (11:02 CDT)

I will be out of the office starting 06/23/2008 and will not return until 06/26/2008.

If this matter is urgent please contact NAME ELIDED at XXX-XXX-XXXX or XXX-XXX-XXXX

This really sucks, for multiple reasons. Mostly, that:

  • Nobody cares if you are out of the office. If they need you right now, they will call you on your cell phone.
  • It’s a mailing list. I didn’t directly e-mail the person which sent me that anything.

So please, for the good of all of the Internet, stop using autoresponders, because they are hideously lame. Or, at least, put something like AUTO-REPLY in your autoresponder so we can just delete the spam you insist on sending us.

Thanks lazyweb.

Maybe I’m wrong, but Python’s OO seems to be broken…

Thursday, June 5th, 2008

Note: I have since figured out inheritance in Python, so this is all just a rant that is no longer relevant, really.

So, I’ve been trying to figure out inheritance in Python. In Lisp (and even C++ and Java), derived objects will have the cons of their parent called. For example, look at the following C++ snippet:

#include <iostream>

using namespace std;

class B {
public:
	B() {
		cout << __PRETTY_FUNCTION__ << endl;
	}
};

class A : public B {
public:
	A() {
		cout << __PRETTY_FUNCTION__ << endl;
	}
};

int
main(int argc, const char **argv)
{
	A *foo = new A();
	delete foo;
	return 0;
}

This outputs the following:

B::B()
A::A()

As you can tell, the parent object’s constructor is called and then your derived object’s constructor is called. But, in this Python code, the parent object’s constructor is not:

class B:
    def __init__(self):
        print "B.__init__(self)"

class A(B):
    def __init__(self):
        print "A.__init__(self)"

A()

This outputs:

A.__init__(self)

Instead you have to do:

class B:
    def __init__(self):
        print "B.__init__(self)"

class A(B):
    def __init__(self):
	B.__init__(self)
        print "A.__init__(self)"

A()

To get the right output:

B.__init__(self)
A.__init__(self)

This seems broken to me. But maybe I’m not understanding something. The way I got bit by this was by trying to design a new replacement to debian/rules which used subclassing. (More on this later.)

Oh, and I intend to try to keep my blog updated more often.