February 28, 2009

ow my eyez II

Very common in the world of Ruby on Rails is the 40 character content block. My favorite is the last snippet where the whole middle of the text is off the right edge. What was it that Linus said about indentation levels? At any rate, I'm pretty sure this came about from people testing their layouts only on a 12" laptop in a coffee shop somewhere. "Perfectamundo," they say to themselves.

February 26, 2009

ow my eyez

Gray text on pink, always a favorite.

February 21, 2009

brokontrollers

Here's a nice one. Do try to include the controllers you're calling from your app. All of them, even the important ones.

I know it's fun to get all NIH and to write your own everything, but there's no pride in workmanship when the thing you are presumably basing your career on (or at least hobby) is so flimsy. But then again, I wouldn't have anything to rant about if people paid attention to this concept.

I guess what I'm saying is that if you don't give a crap, update your robots.txt to keep Google away.

February 17, 2009

calendar_date_select

It's tried and true, light and airy, funky and fresh, and somewhat poorly documented. This may be a consequence of my n00bie-ness, or that my history is with the admirably-documented FreeBSD and Perl worlds. I'll chalk it up to noobage, though, since many many people seem to be happy with this state of affairs.

The "calendar_date_select" plugin is a nice little widget for generating dates and times for your forms. It pretty much drops in and spits whatever date and time you click on back at your server. I've used it plenty, I've been happy with it, and I think it looks decent out of the box. The problem, so to speak, is illustrated best by the project's own author.

Rather than, you know, actually write docs, the author drops the ball until some clown makes an entire app that does...something. I don't know, because perhaps unlike a lot of people I read faster than I can download and run something like this. I mean, it may indeed be the best form of documentation ever conceived, but I'm skeptical. What happened to just describing the plugin's behavior? It seems like so many Ruby on Rails people are starving for some kind of validation, recognition...something. Crappy screencasts ("...uh...function goes here, and...uhm...tap tap tap...see?") vie for SEO manhood, and everybody and their baby brother takes it upon themselves to package link un-underliners as plugins that are AWSUM and A TOTAL TIMESAVER. Really guys, just drum up some freelance gigs already. Not everyone gets to be Ryan Bates (who, contrary to your apparent perception, obviously edits and, yes, "produces" his 'casts). Posting your demo app on github might let you loosen your ethics enough to call yourself a Rails "contributor," but anybody with a clue should know better.

But I digress. An additional downside of the attitude that a name has to be associated with every bit of help offered is that there is a proliferation of "demo apps" that are supposed to substitute for documentation. At the above URL you will read the words, "The DEMO is the largest source for documentation." Hilarious, right? WTF kind of info-balkanization are we heading toward? Is Rails 2.3 going to do this for itself? "Want to know what has changed in 2.3? Install and run this thingy here!" That the given docs on that page look like something scrawled out somewhere back around v0.0.0.1 only adds to the insult. Couldn't be bothered!

No, I just want to see a file called CHANGELOG.

FYI, if you're looking for bits and bobs and details on CDS, there is a page that has helped me. Some comments indicate that this in fact may be the demo app I've been railing against, but who knows. I always find it through some random comment link because every one of the "official" CHECK OUT DA DEMO links on project pages are always dead. Heck, the electronicnicholas link may be dead by the time you find this page, but it's what I have to click and backtrack to find whenever I'm looking for details. Why? Because the plugin's docs suck.

February 13, 2009

acts_as_state_machine

Everybody loves restful_authentication, right? RIGHT? Well, along with having plenty of tutorials to get your users registering and logging in, if you want activation you need the acts_as_state_machine plugin. The secret to installing this is to ignore The Google, or else you may get something like:

$ script\plugin install acts_as_state_machine
svn: Connection closed unexpectedly
svn: Can't connect to host 'errtheblog.com': No connection could be made because the target machine actively refused it.
svn: Connection closed unexpectedly
svn: Connection closed unexpectedly
svn: Connection closed unexpectedly
svn: Connection closed unexpectedly
svn: Connection closed unexpectedly
svn: Connection closed unexpectedly
Plugin not found: ["acts_as_state_machine"]
$

Another Google-recommended technique is to install from any number of alternate sites that have hosted this seemingly-hobo plugin over the past couplefew years. They have all been mentioned at one time or another.

However, the secret is to read the output of the plugin install for restful_authentication. Here (as of 2/2009) you will find that the right way to install acts_as_state_machine is (currently):

$ svn export http://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk vendor/plugins/acts_as_state_machine

That's all one line, BTW (Blogger sux). Why we have to do an svn ex for something like this is beyond me, but I figure the (typically lazy OSNAP) developers have a good reason. Live and learn!

At least this didn't end in the typical heartbreak of a rails site returning code 500 errors, or a plugin that was abandoned two years ago. Huzzah!