coding
surround.vim
Via yesterday's Vimcasts episode, "Converting markdown to structured HTML with a macro", check out this most-excellent Vim plugin:
Surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more. The plugin provides mappings to easily delete, change and add such surroundings in pairs. While it works under Vim 6, much of the functionality requires Vim 7.
Anybody editing HTML or other markup can definitely use this.
Netbook vs iPad

I have been doing some off-and-on research for a while now on netbooks, with the idea of getting one to run Linux on as a home computer. The search has been getting more serious lately. While varying back and forth on different options, I'm currently leaning toward an Acer, running Debian with Xfce.
A pair of articles (as well as Matt Gemmell's iPad photos+posts on Flickr) floated into view the past few days that have added some wrinkles, specifically an iPad-shaped wrinkle.
iPad vs. Netbook
The first, from LinuxCommand.org, "Will The iPad Kill The Netbook? "
Ever since Apple announced the iPad, there have been countless stories in the press about the iPad's effect on the netbook market. I'm a big fan of netbooks and I agree that the netbook market is in trouble but it's not because of the iPad.
The author, William Shotts Jr, goes on to discuss how Microsoft has been systematically attacking netbooks thanks to its Linux threat. Which is intriguing, but of more interest to me is the notion of the iPad as netbook replacement. Shotts shoots down this idea:
[...] the iPad should not be directly competitive with netbooks at the conceptual level. In many ways the iPad is a remarkable device for content consumption. Unlike a Windows computer, it requires virtually no system administration. This makes the device a perfect "television of the future" where one just uses it to passively consume content. However, its lack of a real keyboard and limited connectivity options makes it a poor choice as a portable Internet interaction device; a role that the netbook hardware platform excels in.
Replace "portable Internet interaction device" with "portable word processor and coding device" and that describes my needs. I'm an excellent typist, fast and pretty darn accurate (depending on my caffeine intake ;) which makes typing-related activities a strength for me — I'm afraid I'd lose that advantage with the iPad's virtual keyboard, no matter how "magical" it is.
(See also the TechNewsDaily article that Shotts links to, "Is the iPad Killing Netbooks?")
Reading is Fundamental
Next is this from The Guardian UK, "Apple iPad: will it lead a reading revolution?", which looks at the device from the perspective of another favorite activity of mine—reading. Or more accurately, from that of writers and publishers: in fact, written by someone in the publishing industry who doesn't quite get what's going on. (See the comments for more on that.)
There's no denying the attraction of an ebook reader, if for no other reason than being able to carry around the collected works of, well, pretty much everybody in your messenger bag. However, I'm content with the analog versions most days, and usually limit myself to reading two or three books simultaneously. ;)
As far as the ebooks I read, they're normally found at Project Gutenberg, not the DRM-hamstrung ones from Amazon, iTunes, or any other virtual bookstore.
Still, I found myself browsing the iPad Guided Tours videos on apple.com yesterday, considering the idea of eschewing a netbook and going for an iPad. It was very, very tempting.
Then I saw the "from $499" price tag and came back to Earth.
Numbers Game
It's $499 for a 16GB WiFi-only model. $599 gets you 32GB, $699 = 64GB.
If you want WiFi and 3G, it'll set you back $629, $729, or $829 dollars.
Really?
I can get an Acer Aspire One netbook with an Intel Atom N280, 1GB RAM, 250GB hard drive, 10.1" display with Bluetooth and a six-cell for $340. If I don't mind going down to a 160GB disk, the price drops to $299. (If I browsed around some more, I bet I could find an even better deal.)
I can't even buy the lowest-end iPad for that. And how many years from now would I have to replace the iPad?
Magical Mystery Tour
Don't get me wrong—the iPad is a gorgeous, ingenious device. I've had a chance to play around with one. It is tempting, and for some people makes a ton of sense, especially when compared to a full-sized, few-1000-dollar laptop. Apple has already made a metric crapload of money from iPad sales—hell, they just passed Microsoft in terms of market cap value.
As a decades-long Apple user and evangelist, I never thought I'd consider buying a machine that wasn't a Mac (or whatever Apple put on it), much less one that came with Windows installed.
Yet for my needs—a word processor/coding/browsing/email/music machine with an actual keyboard—Apple won't be adding my dough to the pile this time. And Linux will get another full-time user.
More URL salad
A couple of months ago, I bemoaned all of the advertising campaign cruft being piled onto the end of URLs. Came across a perfect example just now.
This story on LinuxCommand.org, "Will The iPad Kill The Netbook?", would normally have a fine, clear URL of this:
http://lcorg.blogspot.com/2010/05/will-ipad-kill-netbook.html
Instead, it has this:
http://lcorg.blogspot.com/2010/05/will-ipad-kill-netbook.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+LinuxcommandorgTipsNewsAndRants+%28LinuxCommand.org%3A+Tips%2C+News+And+Rants%29
What the hell?
TextMate to Vim transition resources
Articles for people looking to transition from TextMate to Vim.
Arthur Debert (Stimuli): "Hello VIM, or quitting TextMate cold turkey"
In my last post I've mentioned my way through VIM. Quiting TextMate cold turnkey wasn't easy. But fear not: there are a bunch of plugins that will make it a breeze.
Jeff Ober (Artful Code): "From TextMate to Vim"
TextMate is an excellent editor, but it is beginning to show its age. It has a few squeaky wheels that have yet to be oiled, and it looks as though the author may be getting bogged down in the minutiae of his next release. With the next version apparently due sometime after the colonization of Mars, it seemed an auspicious time to try out another editor.
Jamis Buck (the buck blogs here): "Coming home to Vim"
Fast forward three years. The vim landscape is different now. There is actually a Mac-friendly GUI version of vim now, MacVim, which actually looks like it belongs on OS X. Vim 7 supports UI tabs, and a much more powerful auto-completion mechanism than before. And plugins like rails.vim and fuzzyfinder.vim mean that TextMate no longer has a corner on powerful project navigation.
On Reddit: "Ask /r/vim: How do you work with a project in vim?"
What I love about TextMate is that I can open a directory and it will list its hierarchy in a drawer, making it very easy to navigate files. Add to that the wonderful Cmd+T which incrementally lets me search for files within this hierarchy and quickly open one in a new tab.
I'm looking for something like this in vim. Or I'm wondering how other people solve the problem of working on a project which requires quickly opening different files and navigating within a hierarchy?
Also useful for those switching from Mac to Linux. ;)
App Store disfunctionality
About a week ago, NetNewsWire on my iPod Touch began crashing on launch. I looked up info online and indeed it was a known issue. The intrepid developer Brent Simmons had already submitted a patched version to the App Store. In fact he noted it on his @nnw_iPhone Twitter feed on October 4th:
Uploaded 2.0.1 (free and premium) — fixes the crash-at-startup bug. Hopefully they’ll get approved and on the App Store quickly.
So far so good.
Since I know Apple's App Store takes forever to shuffle stuff through what I can only imagine is an assembly line of elves from Santa's Workshop working in the off season, I waited the usual 2-3 days to check for NNW's availability. Yet I was only teased by an update for Cro-Mag Rally or one of the other (fine) Pangea games.
In the intervening nine days, I have occasionally and fitfully attempted to launch NetNewsWire, only to be denied by crashes. I also tried "Check for Updates" in iTunes, only to be presented with the dreaded

dialog box with the lowly, singular OK button. As if I have a choice. Just for the record, I am not OK with it. Not at all. And what's with the instantaneous denial? Did you even check?

App Store holding area.
I am picturing some App Prison like in Tron where they torture the Programs for believing in the Users.
Please Apple -- let my programs go!
UPDATE 10/16/09 17:17
Holy crap, the update finally showed up just now. And just short of a fortnight after it was submitted. Nice job, Apple! Feh.
Solution to MySQL ERROR 1 (HY000) saving INTO OUTFILE
If you run into this,
ERROR 1 (HY000) Can't create/write to file '/path/to/file' (Errcode: 13)
when attempting a MySQL SELECT * INTO OUTFILE command, you're suffering from a permissions problem. The command is issued as if you are the "mysql" user, which includes its filesystem permissions.
The quickest solution is to save it in the /tmp directory, then move it afterwards.
Vim a la TextMate
Alex Young posted "Vim for TextMate fans" a couple of years back, in which he ponders how to get the best of both worlds:
I’ve used vim a lot over the years, mainly because I spent a long time using Linux and it was there so I used it. The choice was obvious: vim or vi were on almost every machine I had access to, and worked excellently both locally and remotely. Once I’d learnt the basics I was set, I knew enough to get my work done.
Then I found TextMate for Mac OS. The immediacy of TextMate made it easy to get started with, and it has many excellent features. The problem is, I’m not always using a Mac. But you know who’ll follow me around to every platform I use? Good old vim! So I started thinking, how could I make vim feel more like TextMate?
Check out his screencast for more.