Efficiency

May 15th, 2008

Those who say that it will be done “faster than you can say Jack Robinson” should not spend the time it takes to use said phrase, and rather simply assert that “it is done”. The necessary time interval is built directly into the phrase.

Other phrases “It will be done…”

“… faster than you can glance over your shoulder.”
“… faster than a pig in heat.”
“… faster than a wet noodle on a jelly slide.”
“… faster than you can say Mrs. Pennyfarthing, mistress of the Parlour, who makes the finest scones in the district when she does but as she’s been a trifle ill recently she hasn’t been baking as often which is quite a shame.” … if you need additional time.

Proper Grammar

May 13th, 2008

It occurs to me that Gouda might rather be called Bedda.

Lizard of the Week

April 27th, 2008

lizard.jpg

On Trusting, and Throwing

April 13th, 2008

It’s important to take stock of your idiom before you use it. You might look at a large person. They might be shady — not to be trusted. You might then say “I trust that person about as far as I could throw him.”

You’d be right. Were you to try to throw him, you would likely find it harder than it would be to throw a hard boiled egg.

Of a particularly dastardly hard boiled egg, you would not say “I trust that hard boiled egg about as far as I could throw it.”, because you might be able to launch it a considerable distance.

Another consideration is the actual distance that confers trust between thrower and throwee. If you only ever trust items that you can comfortably throw into the sun from where you stand, you may end up a distrustful person.

Spampant

April 6th, 2008

I’ve become an overnight success. No, actually, it’s just spam. Comments like this:

“Sounds great! Your blog is one of my most favorite now ;). You have hit the nail on the head, just like you always do.”

and this:

“Oh… Your blog used to be nice, but now it’s spoiled. Stop posting trash like that or stop posting at all.”

have started popping up all over the place. If you run a blog, you’re probably aware of this “comment masquerading” spam already. It actually fooled me the first time. I’m going to delete them for now, and eventually I’ll block them from even getting through, or require user accounts to post (something I don’t want to do). Like I don’t have better things to do with my time than deal with this.

If you don’t run a blog, lock up your emails and bar your doors because you’re next.

The problem with spam is not the spammers. They’re fucks but there is an ever greater menace: the spam customer. Somewhere there’s a complete tard who is actually giving these people a viable business model. Stop being so dumb — I beseech you.

Rolled

April 2nd, 2008

I teamed up with Mike over at The Cleverest to produce this meeting of memes.

Fail duckroll

Reference: duckroll

Although rickrolling enjoys more fame at the moment, the literature says the duckroll was the precursor meme. In my opinion it’s funnier but who’s counting?

I’m going to send this to the fail blog as well. We’ll see if they deem it fit for posting.

Dig Yourself, Baby

April 1st, 2008

I realized that this record existed a few days ago. I’m enamored of it. First off, it’s a good jargon dictionary. As you might remember, I like those.

Believe it or not, it also has some good wisdom to it. The hip commandment: “Thou shalt not bug thy neighbor, which means be cool.”

It’s sampled on a DJ Food track, The Riff. I heard the track a number of years ago but hadn’t made the connection. Nice.

“It’s very important to work on your brains.” More wisdom.

Chunk & Write

March 25th, 2008

Coders develop a style much like writers do. I’ll compare coding to writing prose again in the future. I don’t draw much distinction between the two.

Code has agreed upon conventions. I’ve read the phrase “don’t cuddle an else”, probably in a Perl style manual — Perl coders are style mavens.

But what does it mean? It means that:


if(it's_true) {
    say "yay, true!";
} else {
    say "yay, false!";
}

is stylistically worse than:


if(it's_true) {
    say "yay, true!";
}
else {
    say "yay, false!";
}

The difference is subtle but the rule makes sense. And it’s a structural sense that it makes. Code is easier to change when your else statements ride on their own line. That’s just a simple, logistical fact, and the assumption should consistently be that code is going to change.

Prose doesn’t have as strong an adherence to logistical efficiency. Sure, there are roundabout ways to say something, but that’s poetry and doesn’t lose style points unless it sucks. There’s bad code, too.

Calling it Even (Idempotence One)

March 24th, 2008

Idempotence in an operation exists when that operation may be exercised multiple times producing the same result. There’s a bit more but that’s basically it.

When I code a module, often times there is a part of the module that loads information. For example, an initialization method might load data from a file or a database. I compare these types of operations to realizing you forgot something and having to drive to the store — this is very inefficient behavior though sometimes necessary.

Sometimes you end up (inadvertently, perhaps) calling the loader function more than once… Generally I do something like this:


# pseudocode!
class = new Class() {
  function initialize() {
    i'm_not_loaded = true;
    load();
  }
  function load() {
    if i'm_not_loaded is true {
      load_me();
        i'm_not_loaded = false;
      }
  }
  function load_me() {
      do_lots_of_expensive_calculations();
      drive_to_the_store();
  }
}

class->load(); is functionally idempotent. The result is absolutely the same each time it is called. Note that if the load_me() function were written such that all of its expensive calculations had the same result each time they ran it would also be idempotent. What is interesting to me is that those expensive calculations (at the in-expense of a flag in memory) can not be run twice. This is an optimization, and while it is idempotent it does not replace something that is non-idempotent.

What’s idempotent in meatspace? Not much, it seems. Even if the result is the same the first billion times, the billion-and-first time might spark a total meltdown. Entropy is a bitch. Anyway I want to think about it some more. Ideas?

Predictive Text

March 17th, 2008

A quicky for today — check this note out that I got from the ACLU:

Dear Mark Angelillo,

In a few days, you will receive notice that your ACLU membership expires in May. I hope you’ll respond right away because the ACLU needs your renewed support TODAY.

I didn’t know the ACLU was in the business of predicting the future. In a few days, I’ll write a blog post about the ACLU writing to me.