Attention Yankee Fans: You Can't Be My Friend
True story:This morning, standing in line for my bagel, a Yankee Fan walks by, whistling. "You waiting in line?" I nod. He looks at my hat, the Boston "B" staring him in the face. "Sox Fan, huh? Nice...
View ArticleMarathon: Introduction
I blame it all on the Guinness.Many years ago, when I was in my mid-twenties, living and working in the city, hunched over my keyboard for long hours every day and drinking uncountable pints of stout...
View ArticleDay Zero
I'm totally out of shape, and now I have given myself exactly two years to pull it all together so I can run the 2008 New York City Marathon. Yes, it's only 734 days until the marathon, and I'm going...
View ArticleEvidence of Things Not Seen
OK, so earlier today I was complaining to my friend Jordan about the "West Wing: Sixth Season" DVD set. (Yes, the same Jordan who promised years ago he'd run the Marathon with me, but has since...
View Article(Re-) Starting Up
Hey there. It's been a while. Sorry about that. Thankfully, the interweb (that's you!) hasn't gone anywhere.I've recently started up my own software company with a close friend from college, so I...
View ArticleJS development on IE is busted.
My git commit for this afternoon, following 3 hours of debugging and work, contained the following description:IE7 fixes. DAMN that browser is busted.Look, I'm not going to go off on a rant, but there...
View ArticleManaging Git Submodules With git.rake
Update 2008-05-21: Tim Dysinger and Pat Maddox pointed out that git submodules are inherently not well-suited for frequently updated projects. Read the comments for more details, and please use...
View ArticlejQuery UI and Closable Tabs
So last week I decided (at my company, Pharos) to dump Ext-JS in favor of jQuery. The short version is that Ext-JS is hard to style with CSS, plus I was getting odd sizing of objects in my (pretty...
View ArticleFlash and the Firefox Reframe Problem
So I spent the last two days trying to figure out why Firefox insists on reloading flash content whenever I flip around in my tasty javascript-y tabbed interface.You haven't seen this? I'm not...
View ArticleFreezing Deep Ruby Data Structures
On one of my current ruby projects, I'm reading in a YML file and using the generated data structure as a hackish set of global configuation settings:firm_1: departments: sales: 419 executive: 999 IT:...
View ArticleRails Model Firewall Mixin
At my company, Pharos, we're about to launch a new product which will contain sensitive data for multiple firms in a single database. This is essentially a lightweight version of our flagship product,...
View ArticleNokogiri: World's Finest (XML/HTML) Saw
Yesterday was a big day, and I nearly missed it, since I spent nearly all of the sunlight hours at the wheel of a car. Nine hours sitting on your butt is no way to ... oh wait, that's actually how I...
View ArticleNokogiri, Your New Swiss Army Knife
PrologueToday I'd like to talk about the use of regular expressions to parse and modify HTML. Or rather, the misuse.I'm going to try to convince you that it's a very bad idea to use regexes for HTML....
View ArticleEasily Valgrind & GDB your Ruby C Extensions
Update: John Barnette (@jbarnette) has packaged these rake tasks up as a Hoe plugin: hoe-debugging.When developing Nokogiri, the most valuable tool I use to track down memory-related errors is...
View ArticleJSON vs XML: The Fairy-Wing Throwdown
TL;DRIs XML parsing more than an order of magnitude (i.e., 10x) slower than JSON parsing in real world situations?Both @pauldix and @flavorjones think XML parsing is slower than than JSON...
View ArticleFairy-Wing Wrapup: Nokogiri Performance
TL;DRNokogiri’s DOM parser was extremely way faster than either the SAX or Reader parsers, in this particular real-world example.ActiveSupport Hash#from_xml, I am dissapoint.On JRuby, Nokogiri 1.5.0 is...
View ArticleY U NO GEMSPEC!?
tl;drTeam Nokogiri are not 10-foot-tall code-crunching robots, so master is usually unstable.Unstable code can corrupt your data and crash your application, which would make everybody look...
View Article