One of my test based development imperfections: use driven testing

Recently I've been coding what I call a 'sinkhole SMTP server' inGo (a SMTP server that doesn't do anything messages except perhapssave them to disk). Over the process of this I've once again gottento watch one of my (bad) habits with test driven development inaction, something that I will call 'use driven testing'.

A SMTP server can conceptually be divided into at least two layers.One layer is a general layer that handles the SMTP protocol; it


Wnen trying to unsubscribe from spam can be not completely crazy

For reasons beyond the scope of this entry, I've started running alittle 'sinkhole' SMTP server to collect email for what is essentiallya disused set of old addresses of mine. The server takes in everything,logs the messages to disk, and then tells the senders that theyweren't delivered; later, I can go through the logged messages tosee if anything interesting has shown up. In the process of doingthis I've noticed that a surprising amount of the spam comes with List-


In Go, sometimes a nil is not a nil

Today I ran into what turns out to be a Go FAQ .First, as a little Go quiz, see if you can tell what this program should printbefore you run it in the Go playground (I've put the program in asidebar in case it ever goes away on the playground).The core of the program is this code:

type fake struct { io.Writer }
func fred (logger io.Writer) {   if logger != nil {      logger.Write([]byte(

The state of limits on how many groups you can be in (especially for NFS)

It is an article of vague Unix folklore that your users can only be inso many groups before they may start having weird problems or thingsjust fail outright. Depending on who you ask and what conditions you'reoperating under, this limit might be 16 groups, 32 groups, or a lotmore. There are actually two limits: the local system limit and a limitimposed by many NFS configurations.

On modern Unixes that you'll want to use, the local limit is generallyhigh. Based


Yahoo Groups has a bad spam problem and they don't care

For a while, one of the things I've noticed any time I look at ourmail system is that we seem to be getting spam from Yahoo Groups.Today I decided to look at the magnitude of that spam. I'm afraidthat the results are really terrible.

Over the past roughly 30 days, our main spam filter has seen 29,545 email messages with anenvelope origin address at returns.groups.yahoo.com. 28,869 ofthem has


Some things for enumerated constants in Go

The standard way to do C style enum s in Go is with iota and a typed setof constants. This looks like this:

type SmtpCmd int
const (    EHLO SmtpCmd = iota    MAILFROM    RCPTTO    ....)

This set of constants is perfectly fine in one sense, but it has anon-obvious drawback (at least for someone coming from a Pythonworld): you can't tell an uninitialized instance of SmtpCmd froman EHLO value. Like all Go types, SmtpCmd has a zero value andsince


Computing has two versions of 'necessary'

In various fields of computing we often wind up either saying thatsomething is necessary or arguing about whether it is necessary.One of the things that complicates these discussions is that incomputing we have two versions or meanings of 'necessary', themathematic and the pragmatic.

The mathematical version of necessary is minimalism. At its strongest,the mathematical 'necessary' means that this feature or thing is essential , that you have to have it, that things do not workwithout it. The pragmatic version of necessary is what


Firefox, DRM, and reality

Today I ran across someone retweeting yet another petition askingFirefox to reject DRM or more specifically to reject EME .As this person doesn't usually seem to be given to supportingquixotic and crazy causes, the whole thing has pushed me over theedge about this issue. Apparently soft honesty is not working on people, so I'm going to try being blunt about thesituation.

What I think most people who support this petition don't understandis that by asking Firefox to reject DRM and EME, they are


Why Java is a compiled language and Python is not

A commentator on Charles Marsh's article Why are there so many Pythons askedan interesting question:

[...] If both Java and Python produces Bytecodes which in-turnis run by VM's why Java is called as Compiled language and Pythonis called Interpreted language? [...]

One comment's answer was 'marketing', which in a sense is correct;one reason we call Java a compiled language is that that's what Suncalled it from the start. Another comment


What ssh-agent does with multiple keys loaded

Ssh-agent is probably normally used to handle a single identity key,but it can hold more than one if you want. One of the things that the ssh-agent and ssh manpages are a bit silent on is what happens ifyou have multiple SSH keys loaded into a single ssh-agent . Since I'vebeen dealing with this as the result of transitioning from one set ofSSH keys to another, I'm going to write down what I've learned so far.

(The simple version