nice marmot

While this would have been better posted to bash, I present a snippet from Triple-Em himself regarding an inadequacy in the standard I/O libraries available to him:

1:37:20 PM Matthew Miller: Think I’m going to write an RFC with the suggestion that we extend the standard 4 option I/O error handling directives — Abort, Retry, Fail, Ignore — to include a fifth: Fuck_It_Dude_Lets_Go_Bowling
1:37:31 PM Ryan McKern: i’ll second it if you do
1:37:45 PM Matthew Miller: excellent. let’s see what the experts group thinks.

Word of The Day: Pile

Pile

n. pahyl

  1. a collection of objects laid on top of each other

  2. What happens when something is so utterly terrible that it’s heaped into a mound of failure, resembling nothing so much as a collection of animal shit, which you’ve probably just stepped in.

Example: The kerfuffle over this subdomain and it’s associated implications for the document root that it serves has turned gone hostile. This project is officially a pile.

synonyms: heap, mound, agglomerate, cumulation, cumulus

Yehuda Katz finds culinary religion!

In his post titled “Delicious Food“, Yehuda Katz (of Ruby community fame or infamy, depending on your point of view) discusses his recent branching out into a life of truly considering his diet.

While this is only one incident, I hope it portents a seachange. I find that more and more the Powers That Be are attempting to spoonfeed the idea that all technically oriented people (be they developers, sys admins, or even just “hardcore” gamers) MUST indulge in a diet that is terrifyingly high in saturated fat, processed starch, chemically manufactured corn-based sugar products, and “brain enhancers” like guarana or caffeine. In discussing his epiphany regarding his diet, Katz extolls the positive benefits it’s had on his health, his weight, and the level of enjoyment he derives from the simple act of eating.

Working on the help desk and transition into full time admin work, I found that the diet of most of my peers can be described as one of convenience at best. Lunches are short, and often taken at Burger King, D’Angelo’s, local take-out Chinese counters, or the local mall. The meals are high in processed, saturated fat and processed starch, and loaded with flavorful chemicals. The staple is red meat, and the only vegetables I see eaten regularly are in the form of french fries and bread and butter pickles served on sandwiches. Snacks are frequent and often come from the candy vending machine. The sugary beverages, often provided from the soda fountains and fruit juice machines on every floor, flow freely; 200 calories of high fructose filler at a time 4 to 6 times a day.

I don’t know what the industry average for obesity, diabetes, or heart disease are compared to the rest of the population, but I’d be willing to at least make a safe wager on it being markedly higher. When I realized that this was killing me, I quit High Fructose Corn Syrup outright, cut caffeine from my diet, and began attempting to sharply limit the amount of refined sugar in my diet. Some months I do better than others, but the act is about the effort as much as the results with large lifestyle changes like this.

Nitpicking aside, while I might think his use of a bread maker is indulgent (because I have a seething disdain for machines that only do one thing well) or that his claim of cooking brown rice on the stove being “impossible” is misleading (full disclosure: I use a rice cooker to get back space on my stove top; It’s an excellent steamer in addition to a rice cooker, therefore not a uni-tasking space hog), I applaud his willingness to examine his diet and make the big changes. I respect his willingness to talk about a subject that I find more and more of our peers just don’t “get” or want to understand. I wish more people would do what he’s doing right now, much less more geeks, nerds, admins, or developers. Talk about your diet! Think about your food!


And Yehuda, if you’re reading this for some reason (or, you know, anyone else who has made it this far), check the instructions for the grain cultivar you’re cooking if you ever try brown rice on the stove again. No two brown rice cultivars are the same and they all have (sometimes very) different directions. I recommend basmati rice if you’re so inclined. The brown variation is fragrant and nutty, with a pleasant chewiness that white basmati lacks. Goes well with both red and white meats and is an excellent rice for a hearty pilaf.

If you’re interested in literal food for thought, in addition to the books that Yehuda recommends, might I also suggest Ruhlman’s Elements of Cooking where he discusses both why professional chef’s do what they do and how they do it, and Jacques Pépin’s Complete Techniques, which is an essential primer for learning to do simple things better, and making hard things easier.

Text editing for fun and profit

I’ve begun attempting to streamline the process of maintaining the scripts and config files that I have to touch day to day as part of both my job and my hobby. I’ve basically used TextMate for everything, which I’ve previously discussed (particularly it’s use in conjunction with CSSEdit, which we’ll come back to). But this has sort of spiraled out of control as I’ve spent more time working with PHP scripts (such as WordPress themes) and I’ve started to wonder about the newer generation of all-in-one editors.

First things first, I should probably talk about TextMate. Textmate 2 feels like vaporware.

Is it? Probably not. And in the interest of full disclosure, I wrote this post in TextMate using the not-utterly-terrible Blogging bundle.

However, it’s been a few years since there was anything especially novel about TextMate, and this doesn’t help the fact that the editor is getting a little long in the tooth visually. This isn’t really a problem, as a good editor can outlast almost anything else in the environment surrounding it. Many, many cranky people still use vi and emacs, which have both outlasted the operating systems they were built for.

I’ve just grown weary of having to sort-of finagle and finesse TextMate into usable shape. Admittedly, the Green Moleskin mod helps substantially (good bye project drawers!), and the use of updatable bundles has kept this editor viable in these rough and tumble times. I just can’t help hating the fact that I have to keep CyberDuck open if I’m editing something remotely. Lack of SFTP/SSH support really is all I’m wistful about. Finicky bundle extensions (the Blogging bundle specifically is what I’m thinking of) are annoying but not deal breakers.

The Challengers

Since I am a geek, and therefore always looking for a better tool, I began testing Coda ($99) and Espresso (49.95€ with existing CSSEdit License, or about $68.86 at todays exchange rate). Both offer a generous, fully functional, trial period. Both offer promises of kitchen-sink editing (defined as being able to handle all of my editing needs without leaving the app, including CSS editing, script editing, and remote filesystem editing over SFTP/SSH).

Panic is one of the top old-school Macintosh software companies. Their webpage is slick, and their applications are polished like a granite mirror. Coda is their relatively seasoned (released in April of 2007) web development application. MacRabbit, also an extremely slick (in the lick-able sense) Macintosh software development company, then released Espresso (in March of 2009) into the same kitchen-sink web development market that Coda was fighting for. If you work with HTML and CSS, or work in a language like PHP or perl but you hate Dreamweaver, Panic and MacRabbit want your dollars.

Espresso

Espresso, editing a ruby script

Espresso, editing a ruby script

I started with Espresso, as I am a regular CSSEdit user. As mentioned earlier I have had nothing but good things to say about CSSEdit, especially since they rolled in the live preview/x-ray and local override features. Espresso is extensible through the use of small plugins called Sugars. Unfortunately, this means that as of today it also has poor language support (the Coffee House aggregator shows that Sugars are relatively immature and that there is no best-practice or general standards for them yet.). Of note is that there is no real support for Ruby yet, which is annoying as all hell since most of my back-end scripts are in Ruby. You’ll see in the included screenshot that Ruby documents are just plain text documents, with no syntax highlighting. However, HTMl, PHP, and Python support and highlighting were all excellent.

Interestingly, Espresso has none of the CSSEdit guts worked into it from what I could find. It’s very much a web programmers editor, not a web designer editor. While it wasn’t uncomfortable to work with CSS in Espresso, I found myself switching over to CSSEdit more often than not. I imagine that in time MacRabbit will probably roll CSSEdit and Espresso into a single application. For now though, it’s more context switching, with no gain in productivity to show for it.

Espresso shows promise (it is a beautifully designed application), and the concept of workspaces is novel. I appreciated the ability to work on something locally while automatically publishing it remotely, and Sugars have the potential to be as awesome as Bundles, if not more so. But much as every child has the potential to be president someday, only time will determine if Espresso’s Sugars are making me coffee for $6.00 an hour in a few years.

Coda

Panic’s challenger for my hard-earned editor dollars is Coda. Coda does a few interesting things, like integrating the SubEthaEdit engine for collaborative editing and incorporating the Transmit core for remote file operations. As of late it also supports plugins, though I’ve been unable to really find much in the way of usable plugins, since they’re a relatively new feature.

The kitchen-sink approach that Panic took with Coda also extends to having a built-in terminal, which can connect to a local machine or a remote machine, for code debugging, remote operations, or whatever you’d normally keep a terminal open for while developing. Coda is a very, very complex application, and that’s ultimately the problem I had with using it.

Coda's weird autocomplete suggestions

Coda's weird autocomplete suggestions

Coda wants to be everything at once, and it’s very good at most things that it does. The text editor never feels like it’s holding me back, but one of the big quirks I found was that the constant language-unaware auto-complete suggestions are much, much more aggravating than helpful.

I also found little utility in the included HTML reference, but that’s only because I know HTML and CSS very well (not that my blog layout implies this, but I do. Honest.), and for a developer who only uses HTML to present manipulated data, I can see it being a helpful reference. Panic has recently (as of version 1.5) added the ability to point Coda towards other websites as reference guides, and that’s much more useful long-term.

Conclusion

At the end of the day the only real utility Coda and Espresso offer me is remote editing. They don’t support any configuration file formats and their support for anything except “web languages” (ASP, PHP, perl, Python, ActionScript, HTML, CSS and kinda-sorta Ruby) is poor at best. TextMate has bundles for Apache, nginx, and SSH, as well as general support for any of a variety of key-value pair style config files. it also supports Bash and these are ultimately the make-or-break features for me.

However, I recognize that Espresso and Coda aren’t trying to be the programmers swiss army knife that applications like Vim or TextMate already are. They’re editors geared towards web developers. Unfortunately, while that is a sizable 20% of my needs, the other 80% of my work is dealing with configuration files every single day I am on the clock.

For the time being, it looks like I’m sticking with TextMate.

Follow-up questions

You might ask now “Why not MacVim or BBEdit? What’s wrong with TextWrangler?”
Well, BBEdit is an excellent editor that just took too long to have its visual appearance overhauled. It used to look exactly like a Classic Mac OS application running inside a Cocoa OS X frame. They’ve just released a new version that I’m told would be worth my time to test and no longer looks like a very powerful editor hidden inside a child’s toy. I may revisit it soon and see if it’s shaping up into something that doesn’t make me want to punch my monitor in frustration. TextWrangler feels almost like borderline abandonware at this point and it’s an extremely watered down programmers editor for the languages I’m working in and for the amount of work I have to do. MacVim is an excellent port of Vim to Mac OS X, but at the end of the day it is Vim, and Vim gives you AIDS. Worse still, if you use Aquamacs then your genitals will spontaneously combust.

A broken upgrade? NO! NEVER! (hardly ever…)

HELLO TO THE GOOGLERS DROPPING IN REGARDING WP-CONTENT!

If you’ve stopped in, this pertains mostly to the use of automatic updates over SSH2 not working for me in WordPress 2.8. If you’re not experiencing this problem, I don’t think this write-up will be of much help. But feel free to stick around a while. We’ve got snacks.


After upgrading to WordPress 2.8 I discovered that this update has broken automatic core and plugin updates for me. I use SSH2/SFTP as I don’t trust/like/need/support FTP, and the SSH log only shows that the PECL module is opening a connection and then closing it, with WordPress returning only the following to to the browser window.

Unable to locate WordPress Content directory (wp-content).

I dug through how WordPress handles upgrades, and tracked this all down to the /wp-admin/includes/class-wp-filesystem-ssh2.php file. Replacing the version in 2.8 with the one from 2.7.1 restores full functionality but this is obviously NOT optimal, because that rewrite happened for a reason. I’ve got a diff file and some debug logs, and I’m sitting down to out which function is failing if I can (FYI, I probably can’t). I look forward to filing my first real bug report and then having it closed with my first instance of “Will not fix”, “Works for me”, or “Cannot duplicate”.

UPDATE 6/13/2009 @4:40PM EST

The rewrite happened because use of the ssh2.sftp wrapper was introduced, replacing the older version of the function which copied contents into temp files and pushed the data around. It was a drastic speed increase, but it doesn’t bloody work on my system for one reason or another.

UPDATE 6/13/2009 @7:16PM EST

I’ve officially cried “uncle!” and turned to the most wretched hive of scum and villainy in blogging, the WordPress forums (as well as their bug reporting and ticketing system). I also identified the patch which introduced the code which caused SSH2 support to go flying off the rails for me.

UPDATE 6/18/2009 @4:17PM EST

The WordPress team has marked this bug as belonging to milestone 2.9. There is a slim chance that maybe I’ll see some relief in 2.8.1, but more than likely they’re going to yet again refactor how SSH2 works for automatic upgrades. If this changes, I will update this post accordingly. For now, I believe I may have to simply let it be broken.


Other than that, this round of upgrades has been mostly painless, and the hyped speed increases are not just hyperbole. WordPress 2.8 feels only slight underbaked beyond SSH2 hiccups. I confess that I haven’t had a chance to play with the redesigned sidebar widget administration yet though, as I haven’t even figured out how I want to implement support for sidebar widgets into this theme.

The bug that deletes some custom fields if you update posts that have them is still there. No idea how to begin tracking that one down, but I can state authoritatively that it’s theme and plugin independent. Why am I linking to some dudes blog, and not the official WordPress bug tracker? because I don’t even know where WordPress keeps its bug tracker.

I also had to reset WordPress Blog stats because WordPress was tracking the wrong subdomain for all of my stats. The numbers tallied up with Google Analytics and the AWFFull log grinder, but the URLs were all effed up. I fixed the problem on the WordPress.com backend, and in the process lost months of aggregated history.

The upshot to this loss is that I hope to have a new round of search hit inspired commentary ready to go in a week or two.