Friday, October 09, 2009

How to hose a Rubygems in one simple step.

So, I had the unfortunate mispleasure of having to quickly solve The Mystery of the Hosed Rubygems Installation after installing 1 gem.

Apparently, the problem was with that gem's .gemspec file, in which the following line:

s.require_paths = %q{"lib"}

was the culprit. That one little caused the entire rubygems system to fail -- require failed, the `gem` command failed; basically everything related to Rubygems failed in one spectacular burst of flame.

The solution of course was to change it to

s.require_paths = ["lib"]

The problem being, Rubygems expects Gem::Specification#require_paths to always be an array, and, not bothering to check otherwise, tries to call Array#join. Apparently exceptions raised when parsing a gem's specification aren't caught anywhere in the system, so it hoses the whole thing top to bottom.

Saturday, August 29, 2009

jQuery.Form and its AJAX file upload gotchas.

Hit a few "gotcha, motherfucker!" moments with jQuery.Form while doing AJAX file uploads:

  • If you return an HTTP error, don't return any text (such as error details) -- it'll be interpreted as a successful call and won't handle your error callback.
  • If you return an HTTP error, don't reply on xhr.status from the error callback -- it'll be an unhelpful 0 for some reason.

Alternatives suck: returning an error code and checking to see what kind of data got returned from the call (is it an 'error' object or a model object?).

Wednesday, June 10, 2009

Argh, ShareThis!

Despite it's importance, this problem with ShareThis is almost totally undocumented: if you run your webserver locally and access it via "localhost"then the ShareThis widget won't work. You have to access it by an IP instead (127.0.0.1).

So if you get "SHARETHIS is null," "SHARETHIS is undefined," or "SHARETHIS is not defined," instead of spending an hour and a half pulling your hair out, just breathe deep and remember, there are still people out there who put all their code in a monotholic try/catch and fail silently.

Thursday, April 23, 2009

Arron on...

Arron Washington on Twitter.

Arron Washington on a mostly abandoned identi.ca account.

Arron Washington on a definitely abandoned Plurk account.

I seem to be turning into one of those people that collect social networks like rare Indian coins.

Friday, April 03, 2009

Busy busy!

Good Lord, I've been busy all month long and it's only getting worse.

Hell, I totally forgot that I had yet to do my taxes until I got some kind of automated email reminder today.

Have. Got. To. Keep. Going!

Wednesday, April 01, 2009

How much did I make from oDesk in 2008?

I recently tweeted that I made most of last year's income from oDesk.com.

Well, according to my accounting, from oDesk alone I made just shy of $40,000 last year.

That's pretty good, considering I took a short break, and when I got back into the swing of things I decided to only work about 20/hrs a week (sometimes more, depending on client need). It helps that I get more things done in 20hrs/wk than some people do for 40hrs/wk, though. :)

Obviously I could have made way more.

But besides being a valuable income stream, oDesk has given me something much more valuable than that: freedom. Freedom to work my own hours, sure, but more importantly, freedom to do what I want. And what I've always wanted to do is be an author. Yes, that's right, Mr. Computer Programmer wants to be Mr. Writer.

Since I started freelancing, I've never really had the time until recently to unlock all the thoughts bouncing around in my head and unleash them on the world. When I was in college, there were huge gaps between classes that I filled with anime, video games, writing and code. But when I started freelancing, an incessant nagging in the back of my head ('money! money! money!') kept driving me to spend all my free time thinking about work, working on work.

My free time became a narrow slot that I could only fill with one thing. Should I play a video game? Read a book, watch an anime, rent a DVD or write? My free time was so thin I felt like I'd cut myself if I wasn't careful with how I used it.

When a long term contract on oDesk ended in 2008, I was between jobs with nothing much to do. So I wrote a little as I browsed for jobs; I had enough in my savings account to skate by for months without work, if I wanted. I went back and revisited old works, frowned at how bad they were and toyed with them in my spare time. I kept peeking at job openings, but my A-game was absent when trying to land a few big, "easy" jobs.

Then I realized something: with my skills and expertises, I didn't have to spend every waking moment working. After all, people always need something done. 

So I said to myself, "Why not split my time between writing and work?"

So I did.

Because with oDesk, I could, and with oDesk, it was simple: apply to jobs that would take less than 20 hours a week. That's it. There are thousands of those jobs on oDesk -- maybe even tens of thousands. When one job ended, there was no mad scramble looking for new work. The market place there is huge. If you have talent then you've got a job waiting there for you. And me? I've got it up to HERE, baby. I made a hand symbol just now; you know, the hand at the neck thing to convey how much of IT I've got.

So, thanks to oDesk I can continue to spend time making kick-ass web stuff for clients, and use the rest to pull out my hair out over my insecurities about my writing or smashing my head against the wall because of writer's block or whatever weird thing it is that week that makes me think that every word spilled from my fingertips is crap.

But hey, that's freedom for you.

Thursday, March 26, 2009

Legal retainers: you never know how valuable they are until you have to use them.

To quote the title, "Legal retainers: you never know how valuable they are until you have to use them."

Seriously. For an LLC, it's much more cheaper and efficient then lugging around an attorney who just chills out all day until he has to write up a contract of some kind.