Archive for March, 2007

Extra, extra! The Mysterious Loretto Staircase




The Staircase

Originally uploaded by zcopley.

Congratulations to my friends at Wikitravel, the awesome community-written- and maintained online travel guide. They have just launched the public beta of a major social networking addition to their project, called Extra, which makes it easier for Wikitravellers to connect with each other and share their ideas, pictures, opinions and personal anecdotes about their travel adventures, among other things.

One cool piece of functionality Extra has is the ability for users to import posts from their blogs. So this post is partly to allow me to check that out and give it a whirl.

I haven’t been doing much traveling lately, so I’ll have to dig into my archives…

Here’s something

If you ever go to Santa Fe, New Mexico, and you like to visit to the offbeat or weird places when you travel like I do, don’t miss the Loretto Chapel, and its incredible spiral staircase. Many people consider it the result of a miracle. It has 33 steps and makes two complete 360-degree turns, without a center support. No nails were used. And the story behind its creation and creator is very odd.

The Chapel had been on my “Weird places to visit before I die” list for a long time, and I finally got to see it back in July of 2005, during a big summer road trip. You can’t walk on it these days, but I believe it was in daily use for many decades.

Definitely worth a look.

Magic Spoon




Spoon

Originally uploaded by zcopley.

It’s strange sometimes the things from your pre-parenting days that get repurposed as toddler toys…

Stereoview: Piaggio Vespa ET4 50 Special Edition




Piaggio Vespa ET4 50 Special Edition

Originally uploaded by zcopley.

This is my latest stereoview and DSEC entry.

You get a lot of attention laying down in the street photographing Barbie dolls. Some guy walked by and looked at me with an accusing look. “Why are you taking those photos?!!!” he said, in a manner that made me think he might report me for suspicious activity.

“Um…. er…. for fun?” I replied.

Then the neighbor lady across the street came out, and she thought it was hilarious. She happens to have a real ET4 she toots around on, or maybe something even cooler with a manual transmission.

Cars drove by slowly with their occupants rubbernecking at me. It was all kind of embarrassing.

Ah, how we must suffer for our art…

Notes from the March, 2007 East Bay Ruby Meetup

Last Tuesday I attended the East Bay Ruby Meetup. For some reason, I thought the meeting was going to be a project showcase in which local Rubyists would show off their pet Ruby projects, but instead we had a “RESTful Rails” live coding demo. Will Sobel, the organizer of the meeting, said something about one of the other speakers flaking.

Jimmy Kittiyachavalit was the speaker/presenter (everyone called him Jim). He works at a shop that uses Rails and has adopted the REST methodology and architecture for their applications. He’s an extremely smart and entertaining guy who can type at about one million miles per hour.

Like a lot of Rails people, Jim uses a Mac (looked like a MacBook Pro), but unlike many Mac people he seems very Unix-minded. I could tell he’s one of those guys who doesn’t like to take his hands off the keyboard to move a mouse cursor around. He uses Quicksilver to launch his apps, and minimizes the OS X dock almost completely out of existence. I’ve never seen anyone as efficient at using vim as Jim, he has mad vim skillz. Rails apps (like most Web apps) have boatloads of little files littered across a slew of directories, but he could dash through them using auto-completion and other vim tricks just as fast as I can move through them using TextMate’s GUI project management features.

In less than two hours, “in front of a live audience,” Jim built a small, RESTful social networking application, replete with users, groups, friends lists, and user auth. He coded and debugged–ocassionally with help from the peanut gallery–and answered questions along the way. Code flew by in blur, but I think I got about 80% of what he was doing.

REST

I’ve heard the term REST and glanced at a couple of articles about it, but I wasn’t really aware of its history, and that it’s a whole development methodology. The Ruby community is bigtime into REST.

REST stands for Representational State Transfer, a term coined by Roy Fielding, one of the designers of the HTTP protocol. In his dissertation he wrote about REST being the main principle behind the rapid expansion of the Web. He came up with this REST stuff back in 2000 (or maybe even earlier), so REST has been around for a long time in dog years. I feel a little unsettled and weird I don’t already have REST under my belt and fully internalized, considering I’ve been working on Web applications for the better part of a decade. On the other hand, I think it’s just relatively recently people have been focusing on it and rigorously trying to apply its principles to building Web applications and Web services.

Frankly, at this point I’m not sure I’m won over to the REST methodology, but I’m studying on it. The reasons why you should build your app the RESTful way are still a little sketchy in my head. I guess REST is supposed to be a better architecture. RESTfulness is supposed to make your application simpler, safer and more interoperable. Plus, is gives you that good feeling of being in harmony with the true magical spirit of the Web.

The main idea seems to be that database CRUD operations (Create, Retrieve, Update, Delete) are already built into the HTTP protocol; they map to the HTTP methods POST, GET, PUT, and DELETE respectively. Everything in a RESTful app should be as stateless as possible, and everything, including the logic for relationships between objects, should be a named resource REST operations can be applied to. So, adding a new record (for a User, say) should be accomplished with HTTP POST, updating the record would be done with HTTP PUT, etc., and when you want to relate a “User” object to a “Group” object there needs to be a relationship object (e.g.: GroupMembership) that can be manipulated RESTfully.

One nice thing about this strategy is there’s never any question about where to put the logic relating a User to a Group, for instance. Should it go in the User code or Group code? The REST way is to put it in its own object, probably linked to a special “group_membership” table in the database. I would have done it that way anyway, based on experience, but I guess the REST methodology formalizes and encapsulates that wisdom. Other benefits include an elegance and consistency to your architecture, and the fact that everyone working on your application will know where to go in the code to find things.

On the other hand, it seems like apps that require a lot of state saving, such as AJAX-oriented apps and stuff, do not really mesh too well with RESTfulness. User authentication was sort of a sticky point in Jim’s app, where he had to fudge a little on REST purity, because user auth is naturally stateful. As he put it, “user authentication and REST sort of butt heads.” Another possible downside is your application’s data model tends to get big and complex fast because there are so many objects/tables. (That tends to happen anyway with complicated applications.) I also wonder about security. Even though “security through obscurity” is probably not the best protection, if it’s obvious to everyone where key functionality lives in your application, it’s gotta be easier for bad haxors to zero in on it. But Jim didn’t seem to think that was a big issue when I asked.

There seems to be pretty good REST support in Rails, including special scaffolds, and special URL helper methods in the routing configuration (routes.rb). Support doesn’t seem 100% there yet. Jim said you have to constantly restart your Web server when you’re writing REST apps in development mode (which he did a lot during his presentation) because you’re constantly editing the configuration files. That kinda sucks. One of the great thing about Rails is you hardly ever need to restart your Web server to deploy new code and other functionality during development.

ActiveResource

One really cool thing brought up at the end of the presentation was ActiveResource, which is based on or inspired by the ActiveRecord ORM. The idea is that instead of only using REST for local database CRUD operations, your app can access remote resources over the Web with REST. In other words, it’s another lightweight form of Web services. The persistence for your application could be something accessed via HTTP, maybe something like Amazon S3, or your app could simply make REST calls to decoupled remote resources.

Useful links and references bandied about

Alex Jones: I want you to go INSANE!!!! ARGGHHHH!!!!

This is why I love Alex Jones.

His show has been getting better and better these days.

I had his show on in the background as I was doing housework when all of a sudden my attention was grabbed and I had to fixate on the radio. I made Wendy listen to it. She didn’t like it as much as me. She said, “I feel like I was just raped by Alex Jones!”

.mp3 sound clip: I WANT YOU TO GO INSANE!

Here’s the RSS feed for his show: http://xml.nfowars.net/Alex.rss

Cloth Diapers (Non-poo-poo- and pee-pee uses)

When Wyatt was born my grandparents gave us a gift of a large set of cloth diapers. We never used them for their intended purpose. Some people have the commitment and super-parent strength to use real cloth diapers… washing the big chunks out in the toilet and stuff and running the washing machine all day long. We did not have that fortitude. We did, however, try a cloth diaper service. Their diapers were of a completely different build, so we used them exclusively, and let our own cloth diapers sit on the shelf. Eventually, we switched to Earth-strangling paper diapers from Costco, mainly because they are a million times better. The cloth diapers were horribly uncomfortable for Wyatt, restricted his leg movements, and poop would shoot out of them during the night. We did not like them.

But in the meantime, we discovered many other excellent and wonderful uses for our own cloth diapers…

Washing laptop screens

I mix one tablespoon of rubbing alcohol and three tablespoons of water together, dip the diaper in it, and wash down our laptop screens, and sometimes the rest of the machines, too. The other half of the diaper remains unwet, so I use that to dry everything off. Your screen will be clean as a whistle. I think this should work fine on TVs and probably any glass or hard plastic thing.

Cleaning up spills

Instead of wasting paper towels or busting out a real towel, just throw a couple of diapers on the spill. They are far more absorbent.

Dusting

You can use a dry or wet diaper to do heavy-duty dusting. Dry for books, wet for the bookshelf.

Polishing stuff

Cloth diapers are great for shining up wine glasses or windows.

Improvised hand towels

All the towels in the laundry? No problem, just grab a cloth diaper and dry your hands.

Improvised bandages

Blood spurting out of you body? Grab a cloth diaper and apply pressure. Cloth diapers are made of soft cotton, and usually fairly sterile — at least in my house; I wash them in bleach.

Icepack buffers

If you have an injury, you might also need to ice it down to avoid swelling. I dump an ice cube tray into a Ziplock bag and then wrap it up in a diaper. The thin diaper cloth is porous and conductive enough to let the cold through, but it never gets too cold. A side benefit is that the diaper sucks up any moisture and condensation from the bag of ice, making for a very comfortable and effective ice pack.

Heating tortillas in the microwave

This is one the best diaper tricks I’ve ever learned. Set the microwave at 50% power, wrap you tortillas in a wet diaper, put the whole shebang in a unzipped Ziplock bag, and zap it for four minutes. You’ll have hot, steamy tortillas for tacos or whatever — almost as good as you’d get at a taqueria.

Potholders

Can’t find a potholder or oven mitt? Just grab a diaper or two.

Counter rags

Instead of wiping down your kitchen counters and table with a sponge or paper towel, you can use a wet diaper exactly like busboys use a filthy wet rag to wipe down tables and the bar at your favorite restaurant.

Scrub rags for washing your car

Some dish soap, a hose, and couple diapers for scrubbing are all you need to get your car sparkling clean. After your rinse and dry your car in the sun, grab a couple diapers to polish it up, and make the hubcaps shine.

I’m a problem without a solution

Wow, reading one of the dad’s mailing lists I’m on, I came across this gut-twistingly funny Stephen Colbert clip about Stay At Home Dads (SAHDS). Hey! we’re not SAHDS, we’re MAHDS (Maximum At Home Dads), and we kick it real good!

What’s not funny is this retarded Newsweek article (the cover story even!), which is practically the same exact report, only it seems to be considered real journalism.

My songs are getting old

I’m going to have to make a concerted effort to learn a bunch of new bedtime songs and lullabies. My repertoire is getting super stale. My songs still seem to work for putting Wyatt to sleep, but the problem is that I’m putting myself to sleep too. I’ve taken to jazzing them up and changing them by over-emphasizing certain verses or singing in strange voices. I shudder to think what the neighbors must think (our windows are always open). They probably shut their windows and put on noise-canceling headphones. I’m always afraid I’ll walk out the door in the morning to get the paper or something and get pelted with rocks and garbage.

The songs are actually real good, I’m just sick of them. If you need a new song for “nighnigh,” try one of these. Here, for the record, are the songs I sing to Wyatt each night. Not all of them every night. I usually try to get away with only singing three or four.

  • The Ballad of Jed Clampet” (The Beverly Hillbillies song), by Paul Henning
  • Highwayman,” by The Highwaymen
  • My Little Buckaroo,” Doc Watson version
  • Tennessee Stud,” Doc Watson version
  • Shenandoah,” my own version
  • And sometimes: “Take Me Home Country Roads,” by John Denver. Wyatt doesn’t always let me sing this one because he says it’s a “Mommy song.” He thinks the line that goes, “West Virginia, Mountain mama” is about Mama coming home. And when she’s at work or something it makes him cry.

So there you have it. Suggestions for new songs welcome.

Textmate

I posted this blog entry from Textmate, my new workhorse text editor! I was late finding this program, I guess. But it really is excellent and exceeds all my expectations. The blogging bundle works great. I can’t say I’m missing much of anything about Emacs. Except it cross-platformness, maybe.

Rincon Fairy “Hawk Hill”




Rincon Fairy "Hawk Hill"

Originally uploaded by zcopley.

Since moving into a smaller house I’ve gotten rid of most of my big orchids and only grow miniatures indoors now. But I know big cymbidiums grow really well here outdoors, so I thought I’d give one a try, and I’ve been looking for the right one for our front porch for awhile now.

I had hoped to pick up a cool one at the Pacific Orchid Exposition this year, but unfortunately I was too lame and lazy to go. But there’s a fantastic orchid purveyor at the El Cerrito Plaza farmers market that goes on every Tuesday. This big crazy pink cym just seemed like The Right One, so I snagged it.

It’s official name is, Rincon Fairy “Hawk Hill.” It has billions of flowers on it. I think it must be like ten years old. It’s also ready for repotting into a two-gallon container as soon as it’s done flowering. Maybe some time after May.

As soon as I got it home I had to do a photo shoot on it. Here’s one of the pictures.

I really can ride a unicycle

I can’t believe some guy on Jyte claims that I can’t ride the unicycle!

Here is a picture of me… Now, I hesitated to post this, because this is one of the most horrible pictures of me that I’ve ever seen! I’m bloated and I must have been hungover or something… a complete dumpy dog in this picture. But what ya gonna do?

Me riding the unicycle

Next Page »