P'unk Avenue Window

Archive for December, 2009

punkave.com is way cooler now!

December 23rd, 2009 by Rick 1 Comment

Not to toot our horn or nothin, but we’ve just launched a new site for ourselves. At 6:05pm on the last business day of the year we’ve cobbled our children some new shoes. It was a lot of fun making Apostrophe flex a little to suit our own needs. We figured it was time to drink our own koolaid. And it’s almost fully debugged (degrades gracefully) in IE.

So go check out our shiny new site!

To Geoff, Alex, John, Tom, (and if you didn’t know we’ve recently expanded to include) Dan, and Jake:

cheers

Cheers bros! It’s been a wonderful year.

svncampfire: svn commit notices in campfire, take 2

December 18th, 2009 by Tom No Comments

screenshot of svncampfire source

Using svn for version control? Have lots of repositories you’re interested in? Maybe some of them aren’t under your control, so you can’t set up postcommit hooks?

Check out svncampfire (literally… haha, see what I did there). svncampfire pastes svn commit notices into your Campfire chatroom.

We’ve just released version 1.1, which supports the new official 37signals API for campfire. It’s a great API, much more fun than screenscraping; I chose the JSON flavor because it’s so darn easy. Version 1.1 also adds friendly labels for commits from each distinct repository so it’s easier to see what is going on.

Right now svncampfire is monitoring over half a dozen repositories for us, all thanks to the magic of svn log --xml.

Batman Construction Set: Managing Many Identities With Gmail

December 17th, 2009 by Tom 1 Comment

Batman in life magazine

Last month Batman decided he was too busy to keep track of a separate batman@batcave.com email inbox. Especially since the economic downturn had forced him to lay off Alfred.

So he forwarded all of his batman@batcave.com email to his gmail account, brucewayne@gmail.com. (Sshh! Nobody knows.)

At first this was almost but not quite awesome. In fact, Batman spent a month wondering if gmail was just another impractical, slow-moving, overly talkative attempt to kill him. But as he mastered the ropes the brilliance of using gmail for multiple identities became clear.

Batman may be a loner, but he does appreciate the value of teamwork. So for the rest of you superheroes out there, here are Batman’s three crucial steps for multiple identity management in gmail:

1. You need to know who you are. Messages addressed to a particular identity need to be easily recognizable. You can achieve this quickly with gmail’s filters feature:

Click Settings -> Filters -> Create a New Filter
Enter the identity’s email address in the “To:” field
Click Next Step
Check “Apply the label”
Select “New Label”
Enter a descriptive label like “Batman” or “batcave”
Click “Create Filter.”

Now you can painlessly distinguish your Batman emails from your Bruce Wayne emails. In addition to showing up with a visible label in your regular inbox view, you can also filter to just a particular label by clicking on it in the left-hand column.

2. GMail needs to know who you are. When you reply to a message sent to a particular identity, you want your reply to come from that identity’s email address, not your personal email address. And you don’t want to be forced to select that manually – it needs to be the default or you’ll soon be having conversations about work at your personal address.

To set this up:

Settings -> Accounts and Import -> Send Mail As
Click “Send mail from another address”
Add batman@batcave.com

You can configure gmail to use your own domain’s mail servers rather than just sending through gmail. The former takes a bit more work, but it does keep your personal email address out of the headers completely, so it may be worth the effort for you. In practice hardly anybody looks at the headers closely, just as hardly anybody notices that Batman and Bruce Wayne have exactly the same build. Smoke and mirrors, baby.

Now, here’s the bit I missed the first time: you’re not done yet. You want to make sure that replies automatically come from the identity under which you received the message.

To fix that:

Settings -> Accounts and Import -> Send Mail As
Under “When receiving a message,” select “Reply from the same address the message was sent to.”

The default is to always send mail as your personal address, which is not what you want.

You can also choose to send messages from any of your configured addresses when composing new messages that are not replies. It’s important to keep in mind that your personal identity is still the default for new messages that are not replies (unless you change the default, of course).

3. If you use web forms that send you email, you want your replies to go to the right person. If you have set up various web forms that allow citizens to contact you in the event of a Joker attack, you are probably using the “Reply-To” field to indicate the citizen who should get your replies. More than likely the “From” field is defaulting to batman@batcave.com… the same address Bruce configured gmail to send mail from when he’s Batman.

Unfortunately, gmail has a quirk: if the “From” line of the message you’re replying to happens to be one of your “send mail from” addresses, gmail will ignore the “Reply-To” line, even though it shows up in “Show Details.” This is completely baffling and guaranteed to drive you insane, which is exactly what the Joker wants. (“Don’t Be Evil” is just a front, right?)

The solution is simple: change the “From” line of the emails you’re receiving from your web forms. If you coded those forms, you should be able to override the “From” line. In PHP it looks like this:

        mail('batman@batcave.com (Batman)',
                $s,
                $body,
                "From: support@batcave.com\r\n" .
                "Reply-To: $e");

When we set the “from” address to something other than batman@batcave.com, gmail magically decides to honor the “Reply-To” field, and gotham is safe.

Aaaand that’s it! DANANANANANANANANA! You’re ready to fight crime.

Give PNG a Chance

December 13th, 2009 by Tom No Comments

When I led the PNG working group and edited the first ten drafts of the PNG file format specification, I hoped that PNG image files would swiftly replace GIFs.

I was wrong about that. Netscape, which had offered nary a word of input during the specification process, came out with animated GIF support just as PNG was being finalized as a still image format. Doh!

All the same, PNGs are everywhere. They are all over the web (though still not as common as GIFs). And they are “under the hood” in many products, including Microsoft Office.

A lot of people don’t quite get what PNG is good for, and what it isn’t good for. 8-bit PNG (“png8″) is a great replacement for non-animated GIFs, and png24 is a great format for lossless storage of truecolor, high-resolution originals. But for web distribution of a truecolor, photorealistic image, you almost certainly want a lossy-but-tiny JPEG file.

Many people also don’t realize that PNGs are supported in Internet Explorer 6, with certain caveats, and fully and beautifully supported in later versions of Internet Explorer… and of course the rest of the “good” browsers. Apart from the specialized niche of really cheesy animation, it really is possible to “burn all GIFs” and move on.

PNG hasn’t quite reached the finish line yet. But true believers like Stoyan have kept the home fires burning with great how-to articles like Give PNG a Chance… which features a browser-generated music video. Excuse me, something in my eye…

You can read about the history of the PNG format here.

Dear Gmail: let us map filters to “From” addresses

December 2nd, 2009 by Tom No Comments

Dear Gmail,

labels.
multiple “From:” addresses.
Now, please let me select a default “From:” address when replying to messages with a particular label. Then I can manage my various secret identities business roles with a much lower rate of accidental goofage.

Yours in the wearing of many hats,

Tom “tommybgoode P’unk Avenue Boutell.Com salsadelphia.com” Boutell