Nothing but Porn
March 9th, 2008
We just decided that technology kills sex, but canceling cable and Internet access is totally screwed up, so we’re gonna cancel everything but porn channels and porn sites.
iTunes U Rules
January 5th, 2008
I am already fearing the point at which the velocity with which I consume content allows me to see the bottom of the proverbial barrel.
Please, dear God, let Frontline start releasing content under iTunes U. And MIT Media Lab, and…
All I can hope is that they don’t kill the series before I can download it all.
ActiveRecord to_xml Security Strategy
November 12th, 2007
As noted on blog.wolfman.com, there is a security problem when using the scaffolded respond_to set-up. By default, all columns in a given record will be displayed.
The write-safety mechanism provided by attr_accessible doesn’t help in this situation, but having to write a custom to_xml method that steps through each of these already-whitelisted attributes is a bit silly and not very DRY.
My solution is to do something like:
def to_xml(options = {})
super({:only => self.class.accessible_attributes}.merge(options))
end
Breaking that out, as I do, into a SecureModel mix-in seems like a good move.
Freaks and Geeks
November 6th, 2007
Most cultural classification systems to which I’ve been privy would probably qualify me as a member of the nerd family.
For a living, I program computers. I use a dozen or so made-up, unspeakable (well, except for Ruby) languages to write stories that tell electricity how to flow across networks, through processors and from one magnetic point to another. Because I work in advertising, the last page of each of these fairy tales is (hopefully) a swarm of consumers choosing one breakfast cereal or male body spray over another.
I also dress poorly, by most non-nerd standards. No, I’m not fat. Nor am I especially thin. My clothes aren’t dirty. But aside from those clichés, I have an Aspbergers-like lack of comprehension of fashion. My ideal outfit is a plain black t-shirt, slim jeans, and the least-memorable sneakers available. On its own, my fashion sense doesn’t make me sound especially nerdy – just boring. It’s more than the choices, though – it’s the driver behind them. I dress myself by way of negation. I imagine everyone I see in a typical day, and I reduce and reduce by eliminating anything that stands out from one person to the next. Dressing seems to be, for me, a passive act of nihilism.
In fact, I am downright angered by the ironic trendwhores and hypebeasts and whatever other terms you want to use for idiots who spend good money on overpriced haircuts and clothing in order to eschew sincerity. It drives me wild. And yes, somehow I still manage to live in Greenpoint. But I digress…
What else makes me a nerd? Hrm. We have computers, we have lack of fashion passion.
Growing up, I was in gifted classes from second grade on. I competed in Olympics of the Mind (later Odyssey of the Mind due to a litigious IOC) and usually won on the conceptual events and never on the performance-based events. Yeah, that’s right: I was the kid with stage fright AT THE NERD OLYMPICS.
Other nerdlies:
- One of my better friends releases software under the name Bytes of Spring and I will never, ever stop chuckling proudly about that fact.
- I have a brass bell on my bike. Ding-a-ling.
- I have Robert Frost poetry tattooed on my arms.
- I’ve never danced, and, in fact, can’t watch people dance without burying my head in a pillow for shame.
Pretty nerdy stuff.
Non-Nerd by Omission
The subject of this post, really, is about the things that make me a bad nerd. The truth is, I have very few items on any of the requisite cultural consumption lists: the nerd list, the indy list, the political conscience list. In my younger days, I might have obscured this fact in order to seem cooler. You know – the way you grimace dismissively when someone mentions a band you don’t know, implying something along the lines of, “Meh.” but really meaning, “Meh. I don’t even know what that is, but all ‘Mehs’ are the same to you, ya idiot.”
Well, I’m gonna fess up. Slightly. It would take forever to list the consumables I’ve not yet consumed. The meat is here. The exposed truth of the matter. The details are unimportant.
So let’s have a list, yeah?
Missing from the Geek Checklist
- 2001: A Space Odyssey
- Gremlins
- ET before the re-release in 2002(ish)
- Anything Star Trek
- Any Star Wars OTHER than Episode 1, which I saw in a theater a few years ago
- Most every video game ever made. I love games, but am non-committal. I own last-gen systems and like one game for each.
- Commodore 64 and other classic computer systems. I began “doing computers” in like 1997. What can I say? I was a poor kid growing up…
- Thinking 9/11 was a government conspiracy
- Like the item above, visiting digg.com
- Using Quicksilver for the Mac
- Ever liking They Might Be Giants
- Buying stuff from ThinkGeek
- Being a fanboy of any type
- Going to a LAN party
- Reading a graphic novel
- Collecting anything at all
- Playing any MMORPG, any RPG, or Zelda
- Reading Douglas Adams, Tolkien, Vonnegut, or Heinlein
- Ever seeing an episode of Dr. Who
- Being able to quote any Monty Python (movie, show, book, actor)
- Ever seeing an episode of Freaks and Geeks
- So very, very, very many more.
The Road to Recovery
I received Freaks and Geeks, Season 1, disc 1 in the mail recently from Netflix. I can’t stop reliving every moment of all three of the episodes I’ve seen thus far. I can’t believe how awesomely funny and perfectly tuned that show was. Freaks and Geeks has joined The Wire and Dexter in my Best Stuff Ever on TV list.
I’m inspired, folks.
I’m gonna watch the rest of Freaks and Geeks. When I’m done I’m gonna start exploring some of the other omissions. Maybe I’ve found the tip of an iceberg here.
This must be what it feels like to get sucked into a cult, like Scientology or Reagan Republicanism.
It feels mighty fine.
RSS in Leopard Mail Sucks. For Me.
October 31st, 2007
I gave it a shot. I hoped it would work. Unfortunately, I’ve become hooked on NetNewsWire Lite over the years.
My main gripes with the RSS/Atom support in Mail on Leopard are:
- It’s a pain to import OPML files. I posted a fix for that, though.
- The arrow keys aren’t incredibly useful for navigating between panels, through feeds and items, like they are in NNWL. Having to use my trackpad is lame. Having to tab focus on panes is bad.
- I haven’t yet seen any way to customize the display of feeds in Mail. Not a biggie, but the default view is kind of blah.
- Sorting seems to be alphabetical only.
- When Mail is handling more than a couple of accounts (especially IMAP with server-side folders) it’s invariable that you’ll have to scroll to see your feeds. I’d rather Apple+Tab over to NetNewsWire Lite or Vienna.
- It’s called ‘RSS’ instead of ‘Feeds’ or similar. This might seem nit-picky, but it’s like calling all computers ‘Windows’ instead of… computers.
I like the idea of having feeds in my Mail reader, aggregating the bulk of my passive reading. It’s kind of like using Adium to group all IM-type accounts (I don’t, but I see why folks do it).
Currently, the feed support in Mail is fine if you subscribe to one or two feeds I guess. The UI just isn’t conducive to someone with hundreds of feeds that are updated frequently.
Leopard: Mail, RSS, RMagick, ImageMagick
October 27th, 2007
Like a lot of developers, I’ve been running Leopard in one form or another for a couple of years now. In that time, I’ve had my share of frustrations. Of course, knowing at all times that I was evaluating pre-release software, I rolled with the punches with little more than the occasional bitch and moan (Apple: Don’t sue me. I only complained to others who’d signed an NDA. I swear. Don’t sue me.)
During my evaluation, I also found a few gotchas, tips, and compile tricks that might have been useful to others.
Given that the Apple NDA very clearly prohibited writing about Leopard before the release, I filed these things away.
A couple of the topics I didn’t write about were building ImageMagick and RMagick on Leopard and a how to on executing the Widget ‘flip’ with CoreAnimation.
Install RMagick on Leopard
The RMagick stuff seems mostly figured out now, as MacPorts has stuff updated pretty well. My instructions after that first release included compiling everything by hand with special flags and a sacrificed chicken. Now it’s as simple as:
sudo port install tiff -macosx
sudo port install ImageMagick
sudo gem install rmagick
Hopefully, someone can get FreeImage working soon… But I digress.
CoreAnimation Widget Flip
The CoreAnimation tip is something I’ll cover soon, once I confirm that everything is teh same on the official Leopard release.
Import OPML Into Mail.app
Today, I wanted to write about the pain in the ass of RSS on Mail.
I decided to export all my feeds from NetNewsWire Lite to OPML in hopes of giving Mail’s RSS features a shot. After all – mail, plus to-dos, plus iCal integration, plus RSS could make Mail my main app for non-dev work.
The main complaint I have is that Mail doesn’t support OPML. In fact, it doesn’t support any form of mass-import of feeds or bookmarks, aside from a klunky Safari-as-proxy import.
Safari, of course, doesn’t support OPML. Instead, it uses Netscape bookmark files (NETSCAPE-Bookmark-file-1 DTD). Yay, cutting edge!
It’s dumb, but here’s what you have to do:
- Export to OPML from NetNewsWire Lite (or Vienna, or whatever you use)
- Run the PHP script at the end of this post with php convert_opml_flat_to_nbm.php MySubscriptions.opml > MySubscriptions.html
- Import MySubscriptions.html into Safari
- In Mail, go to File > Add RSS Feeds…
- Check the radio button for Browse feeds in Safari Bookmarks
- Check whichever feeds you want added
Wow. That was simple. And painless. OMG TOTALLY NOT PSYCHE YOUR MIND!
Before you do all that, though, let me point out an apparent failure on the part of the Mail RSS reader: it doesn’t pass the referrer on requests for assets. This sucks because mihow.com, along with tons of other sites, turn off hotlinking.
What’s interesting about this, to me, is that Safari sends referrers. I’d have thought Mail would have used the same lib (or functionality) as Safari for request management. Seems like a WebKit no-brainer to me.
PHP Script to Convert OPML to Netscape Bookmarks
Save this to your machine as ‘convert.php’ (or whatever you want to call it). If you export your OPML to your ~/Desktop, you may as well save this as ~/Desktop/convert.php, which will enable you to easily run the command from Terminal.
<?php
function usage(){
return "Usage: php convert.php /path/to/opml_file.opml > output.html\r\n";
}
# Print usage if need be.
if(count($argv) < 2) die(usage());
# Grab the file path.
$f = $argv[1];
# Load it into a SimpleXML.
$xml = simplexml_load_file($f);
# Output buffer
$out = '';
# Run through the nodes in the OPML and buffer the Netscape output
foreach($xml->xpath("//outline") as $outline ){
$title = htmlspecialchars($outline['title'], ENT_QUOTES);
$feed = htmlspecialchars($outline['xmlUrl']);
if($feed){
$out .= "\r\n\t" . '<dt><a href="' . str_replace("http://", "feed://", $feed) . '">' . $title . '</a>';
}else{
$out .= "</dl><p>\r\n<dt><h3>$title</h3><dl><p>";
}
}
$out .= "\r\n"
?>
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<title>MyBookmarks</title>
<h1>MyBookmarks</h1>
<dl><p>
<?php echo $out; ?>
</dl><p>
Alternate Method for Importing Feeds
I can’t believe I didn’t try it first, but as someone commented, you can just drag feeds from NetNewsWire or Vienna into the accounts area of Mail and BAM – feeds. Man, what a simple solution. Oh well, given the traffic to this post, I’m not the only idiot out there ;)
Kids and Confidence
September 2nd, 2007
The News

This is Emory. He was born on 08/08/2007.
Michele and I couldn’t be happier.
The Knowledge
Caring for a newborn is a lot of work but we’re working together and I think we’re doing pretty well.
So far, the biggest secret I’ve learned about babies is that they spend all day farting. Loudly. Often with bubbles.
It’s very strange, and I think it bolsters my equalization/neutralization strategy for managing nervousness around people.
Let me explain…
The Stand-By
At some point in my youth, I thought about stage fright, nervousness, and the feelings of inadequacy that can strike someone facing an intimidating observer: an audience, an important person, a hot lady with the boobies and hips and such.
I considered the old cliché of imagining the observer in their underpants, and realized that, for the hot ladies with their boobies and hips and such, this could easily backfire under pressure. It seemed like a part-time solution, at best.
I’m an engineering type, and thus I am bothered by temporary or partial fixes to problems. I’m also crass and unconstrained by feelings that I can ever really be wrong about anything as important as philosophy. And thus, the birth of a new science…
The New Theory
A friend of mine once used the term “lazy wiper” to describe the very prevalent type of lazy person you would never describe as “detail-oriented.” Thinking about it, I realized that the majority of people I encountered on a given day were probably lazy wipers. If not, good for them. Because I’m giving neither benefit of doubt or underpants inspections, I make my assumptions and stick with ‘em.
This realization was the foundation of my own brand of nihilistic confidence: “This person is a lazy wiper. I am not. Therefore, I should silently elevate myself in comparison. Yay confidence.”
Sure, it’s hackish. Sure, it probably works by virtue of exposing the idiocy of feeling like one person can be more important or better than another. I don’t care. It works. And I think my experience with Emory has helped it to work even better.
The Praxis
Now, when I meet an executive of an ad agency, or big shot managers of certain mobile and computing devices, instead of elevating myself only by picturing their skidmarked $200 hand-stitched silk underpants, I can also picture them as babies, lying about for hours at a time doing nothing but grunting and farting, eking out the first hints at that most delicious developmental milestone: the smile.
Folks told me fatherhood would change me. Glad to know it’s for the better.
Why Do I Do This?
June 6th, 2007
Why do I keep starting these up, writing for a bit, and bailing on them?
I really don’t know.
I speak at WWDC next week. We got a new cat. Schmitty died. The baby is awesome. I sold a bunch of shit and bought a bunch of shit. I haven’t processed film in 6 months.
WTF.
This is retarded.
Hello, world.
Partial-Birth Abortion Defined
April 19th, 2007
The Partial Birth Abortion Ban Act of 2003 is a shining example of spinning an actual law.
You can read the Partial Birth Abortion Ban Act of 2003 at FindLaw.com.
Notice the two definitions given for the term “partial-birth abortion.”
The first is given in the Findings, in Section 2.1:
A moral, medical, and ethical consensus exists that the practice of performing a partial-birth abortion an abortion in which a physician delivers an unborn child’s body until only the head remains inside the womb, punctures the back of the child’s skull with a sharp instrument, and sucks the child’s brains out before completing deliveryof the dead infant is a gruesome and inhumane procedure that is never medically necessary and should be prohibited.
Who in their right mind would read that description and decide that, if nothing else, it describes a gruesome procedure that should be, if anything, a last resort?
What voting politician or active pundit would want their name linked to a support for such a procedure?
Good Lord, let’s ban that “partial-birth abortion” right now, except in cases of dire medical necessity.
First, let’s go ahead and read more than the first paragraph of this bill, though. May as well make sure nobody snuck anything into it.
Hrm, what’s this?
It looks like the definition of the term “partial-birth abortion” under the Prohibitions section is different that what was described in the Findings.
(b) As used in this section – (1) the term ‘partial-birth abortion’ means an abortion in which (A) the person performing the abortion deliberately and intentionally vaginally delivers a living fetus until, in the case of a head-first presentation, the entire fetal head is outside the body of the mother, or, in the case of breech presentation, any part of the fetal trunk past the navel is outside the body of the mother for the purpose of performing an overt act that the person knows will kill the partially delivered living fetus; and (B) performs the overt act, other than completion of delivery, that kills the partially delivered living fetus;
Hrm…
Suddenly, ANY FORM of vaginal abortion is considered “partial-birth abortion.”
Wow.
Good thing that we, unlike everyone else (including our representatives), read the full text.
Too bad the Supreme Court seems to have gotten stuck on the first definition and ignored the second.
The Inn at Little Washington
April 15th, 2007
In four hours, Michele and I will pull our unfathomably ugly rental car (a Chevy HHR) onto the grounds of The Inn at Little Washington.
My tongue is tingling in anticipation.