I’m available immediately for ColdFusion or Ruby on Rails work. I just got done doing a lot of project related travel, so I prefer if the work is local or telecommute with minimal travel. If you have something, or know of something, feel free to contact me.
First Rails App Shipped
Today I launched a project I’ve been working on pretty intensely for the past week and a half. I took a perfectly good (arguably) ColdFusion application and rebuilt it from the ground up in Ruby on Rails. My goal was to match features exactly, but I couldn’t help but toss in some subtle Ajax improvements as well as clean up all the URLs for the app (more after the jump).
I’m super pleased with the outcome, and the entire process of the rebuild.
Loving Textmate
I’ve been using Textmate as my editor of choice for a few months now, and today I figured out something that I’m very pleased with.
I use subversion now for version control, but I don’t like any of the GUI apps for OS X. The command line version of svn always does exactly what you need it to, and nothing more or less, which is great. Except I’m not a huge fan of command line stuff even if I am proficient in the command line.
In Textmate, if I’m editing a project that I’ve checked out from subversion, I can do the most commonly used svn commands right from within Textmate. If I have files that have uncommitted changes, I can go to Automation > Subversion > Commit and a dialog will open asking for me to note the changes I made in those files.
I also hooked up a key command do make it even quicker. Shift-Alt-B (basically picked at random) works, and now working with svn is super easy.
Good Idea. Horrible Implementation
As I write this I’m on hold with the fifth technical support representative at Vonage I’ve been passed to in a single phone call as they try to figure out why when people call my Oregon phone number they end up talking to a particularly disgruntled guy in LA who’s tired of taking my calls. This alone is a bad problem, but it gets worse.
The first person I spoke to at Vonage tech support was in India, and knew enough English to tell me they couldn’t help me and needed to transfer me to tech support (which I was diligent in picking from the automated menu in the first place). That person was obviously American, from the deep south. She knew enough English to tell me she couldn’t help me and said she needed to transfer me to tech support. The next person who answered the phone was in India. The pattern is getting pretty clear; I’m a buck that’s being passed across the planet because I have an atypical problem (I would assume, heaven help Vonage if I’m incorrect).
It’s really a shame, because I like Vonage for a lot of reasons. The price can’t be beat. They make use of an industry that I like to support in one way or another. They totally snub major phone companies that charge insane prices for something that is now a relatively simple operation (and for the most part, use the same technology as Vonage).
And then they go screw it all up by having terrible customer support that. As I finish this blog entry, I’m waiting for a call back from Vonage customer support, and I fear it’ll never happen for a particularly aggravating reason: he said “Can I have you cell phone number so I can call you back in a moment, my connection is bad”, though it was likely mine. I gave him my cell phone number, and he said “I’ll call you back at 502 740 9432” and immediately hung up, even though the number he repeated back to me had the wrong area code, and 3 of the remaining seven numbers were completely incorrect.
I will probably cancel Vonage tomorrow if I can’t think of any compelling reasons not to.
Five Modern Uses of the Armpit
1. Surrogate Avian or Reptilian Nest
Gently place an egg in each open armpit. Close armpit by lowering arm. For avian eggs, open armpit and rotate egg every six hours for 3 weeks. Reptilian eggs need not be rotated. Hatch animal, feed liberally, eat.
2. Braiding Practice
Many common braids can be mastered using an armpit. Extend arm towards the ceiling. Start with the most common three grouping braid, and continue on to advanced braids such as the Indonesian Tribal Wedding braid practiced in Portugal. When finished practicing, lower arm to cover armpit. Consider selling braids at the swap meet.
3. Shammy
When washing fine automobiles and racing motorcycles, water spots will occur if after the final rinse of an eight step process the water droplets are not buffed away with a shammy. To use your armpit as a shammy, lift one arm and place armpit on the subject vehicle. Using wide circular motions, buff the water droplets away. To extend the life of your armpit, allow to dry over night before the next use.
4. Mobile Phone Holder
Take a modern mobile phone and position it in the middle of the open armpit. Close armpit to neatly stow mobile phone until ready for use. Placing your phone in silent mode is effective, as the human armpit is sensitive to tactile stimulus.
5. Turn Signals
This exercise requires armpit modification. Be warned that only the dedicated user of the armpit should attempt using their armpits as turn signals. Start by extending arms towards the ceiling. Spray armpits with a solution of lemon juice and common Hydrogen Peroxide. Do not drink. Let solution soak into your armpits for nine hours. Do not lower arms.
Once dry you may begin to use your armpits as turn signals. To do so, ride a bicycle to the mall. On your way, signal your desire to change lanes or make turns by repeatedly lifting your arm towards the ceiling and using rapid motion to simulate the blinking of a light. For left turns, use your left armpit. For right turns, use your right armpit. Repeat as needed.
Take This Important Survey
Are you a weblog author. Excellent – take this survey. If you need convincing, here are several well crafted marketing calls to action that should motivate you:
For the intellectual types:
“Taking this survey will further the development of an authoritative guide on communication surrounding weblogs.”
For frat boys:
“The results of this survey will be used to teach you how to earn Abercrombie and Fitch gift certificates, free hair product for the long and messy but smelling nice and clean look, perfect abs and huge pecs, and the most important of all, how to attract all the ladies.”
For parents of estranged teenage children:
“By taking this survey, you’ll help build a guide on how to better communicate with your troubled teen by opening up channels of discussion guided by love and understanding. The results will also help you understand the new Goth attire your child is wearing, and will help you learn to embrace defeatism as a means of survival. With the facts learned, your child will have no choice but to always agree with everything you say, because you will be right 100% of the time.”
For people who don’t care:
“Take this survey.”
For people who care about privacy and are scared of big business:
“This survey stabs a dagger right into the heart of corporate America and their mind controlling marketing departments and gives you a one more reason to grow a crazy ass beard!”
For people with peg legs:
“This survey will chase the phantom pains away.”
For people who make Lemon Pie:
“Taking this survey will encourage people to buy lemon pie more often on Thursday nights. Statistically speaking, Thursday night is the night of the week where lemon pie sales, specifically, are the slowest.”
For goats:
“End the oppression. Take back your rightful place in the animal kingdom. Stop being forced into the mountains where you’re left no choice but to give birth to your kids on rocky faces. Take this survey and every last human on the planet will be forced into your servitude.”
For bus drivers with eye patches:
“This survey will teach people to respect you, and not be subconsciously motivated to tell you pirate jokes. And you’ll lose the leg cramps you get while sleeping.”
That should cover everyone. Cameron is so going to graduate now!
Privacy (or Lack Thereof)
While filling a prescription for antibiotics this morning at Walgreen’s, the clerk handed me a clip board with the printed names and signatures of 56 people and the medicines they were picking up. I scanned the list out of curiosity and saw some names I thought I recognized with fancy drug names scratched out. Some people had written things like “birth control” or “prozac”. The quick scan revealed no “viagra”, which I suppose is comforting in a way.
She asked that I fill out the form on line 57, and said “this is to show that you’ve accepted our privacy policy”. Having become utterly dumbfounded at the lack of privacy this privacy acceptance form presented, I became a bit surly and rebelled in my own way (albeit childish and not very clever). For my name I printed “George Walker Bush” and “cocaine” under drug (it was literally the first thing I thought – I don’t have a huge axe to grind over that, but like I said, childish and not very clever).
She took the clip board back and didn’t even look at what I’d written. I planned to play it off with a smile and explain that I wasn’t comfortable signing something so obviously not private. I figured she wouldn’t care anyhow. I didn’t have to do any of that as it turns out.
Now I can’t stop thinking about what other clever names I could have come with and something within the fog of my cold medicine filled head is crying out about how completely messed up their privacy policy acceptance form is. But those voices are gone, and I sort of wish I’d been less political and put “Bob Marley”, “Hash Hish” or something peaceful, and smile inducing.
RoR Salted Hash Login Generator
I’ve been playing around with Tobias Luetke’s Salted Hash Login Generator (not food!) today for Ruby on Rails apps and I’m impressed (which is admittedly easy, but take into account that I’m expecting things to be easy now in Ruby on Rails, so it balances out).
The Salted Hash Login Generator does a whole lot more than what the title suggests. It does indeed create a hashed password, but also: builds controllers, models, and views for user signup, user login, and “forgot password”. It also generates code that emails the user and asks them to verify their email address upon signup and emails them new passwords. And finally, you have some authentication routines that can run before controllers that you want to have a username/password challenge.
It’s well worth the price of $0.00, and does things nearly exactly as I’d expect them to.
I did run into some issues on building the scaffolding for my trial run, and that was mostly my fault. I followed a tutorial that encouraged you to add some localization code in as well. I haven’t tried it out without, but it was easy to strip the localization stuff.
Here’s how to add it your RoR app:
Don't Yelp at Hobos!
I’ve heard a lot of people recently tout a new and 100% effective way of quitting smoking or any other undesirable habit. In the case of smoking, the most sure and effective way of quitting is to stop putting lit cigarettes into your mouth and inhaling. No sarcasm whatsoever, there is no other way to quit other than to simply stop. No amount of slaps in the face, hypnotherapy, gum, or bitter vegetables will actually amount to stopping entirely (unless the veggies or gum are blocking passage to your lungs).
The converse is also true. If you have a specific goal in mind, the most effective way of reaching that goal is to simply do it. This might require some planning or none at all, but no matter what the goal; it can be met. Consider something as simple as “I’m thirsty, I’d like a cold Iced Tea.” Pretty easy goal. It might simply require walking to the fridge. Or it might be at the grocery story, which means the tasks required to get your Iced Tea have increased. And rather than a simple drive, you might need to get gas before you can get to the grocery store. Then you might rear end someone, and spend all the bothersome time sorting it out and feeling embarrassed and getting honked at by people who are sick of driving and would like a heaping portion of french fries from the McDonalds not 100 feet away from the traffic snarl you’re contributing to. And then, despite your thinking you’ll get there and get your Iced Tea, you get a flat tire, and you’ll have to change your tire before reach your goal.
An Iced Tea can get complicated, but even still, as long as you know what to do next to get you closer to your Iced Tea, you’ll eventually get there. You might even give up, or get taken to jail or something because you flipped out after getting a flat tire and started giving people the big middle finger where you get two arms involved, throwing in some rude hip gyrations for emphasis. And that’s where some people get discouraged and give up, and think “man, Iced Tea is just not for me, I give up. Never again shall I taste the sweet yet not sweet taste of Iced Tea on my parched tongue, oh the drama!”
In my case, I would make a note for myself that said “never do the cart wheel style middle finger displays ever again, and don’t tell police men that they’re the same kind of people in junior high who simply loved orderly fire drills and Anthrax’s rapping album.”
And no, none of the above happened to me. But I was just thinking about how in life that making mistakes adds up to valuable experiences, and that every mistake I’ve made in life has motivated me to make notes similar to the one described above (though mine might only say “one hand on the beverage at all times during high turbulence” or “no need to shriek if you see a hobo climbing out of a manhole in San Francisco”). Stay in school!
Weird Ruby on Rails Issue
Update: I wrote a guide on troubleshooting this issue related to the dreaded “Rails application failed to start” for issues far more routine than the obvious bug I describe below.
I was chugging right along making sweet Ruby on Rails code when I hit a weird snag. I had a column in my database table simply named y, data type of int. The standard Rails scaffolding would show me an empty list when there was no data in the table and allow me to create a new record, but the second I tried to display the record back, I’d get a “Rails application failed to start properly.”
It took me a while to figure this out – first I made sure that the code was working as expected by launching the rails console and creating an object based on my model, adding data to the object, then saving it. Worked fine. Then I retrieved the same data and displayed it. Worked fine. I hit the controller directly from the command line, and saw there were no syntax errors in the Rails generated code.
Because all of my other tables, models, and controllers seemed to be working fine, I began tweaking the offending table. On a whim, I removed the ‘y’ column and everything worked flawlessly. Adding it back produced the same error.
So it seems there’s something with how Active Record interacts with the controller that’s causing tables with columns named ‘y’ to barf.