Note: if you just happen to be interested in knowing possible causes for the ‘no id given’ error message in Ruby, go to the last paragraph of this post.
I don’t have reason to do a lot of Ruby metaprogramming myself, although being a Rails user, I surely receive a lot of benefit from it. Metaprgramming is used extensively in Rails, the most visible example I can think of is the ActiveRecord Dynamic Finders.
Working on my current pet project, I had occasion to do a little metaprogramming in a similar vein to the ActiveRecord Dynamic Finders. I have a model with two sets of paperclip attachments. One is for when an attachment is first uploaded to my server and the other is for when the attachment is subsequently moved to Amazon S3 for permanent storage. The file stored on my server is deleted after successful transfer to Amazon S3. Read more...
A couple of weeks ago, I read a post by Brandon Hays called ‘“Why I still don’t contribute to open source":http://brandonhays.com/blog/2011/05/03/why-i-still-dont-contribute-to-open-source/’ wherein Brandon lays out his reasons for not yet having contributed to any OSS projects. To reiterate Brandon’s points:
- There’s no certification, ceremony, or merit badge that says, ’you’re ready to contribute to OSS’.
- It’s not obvious where to start.
- Guidelines often make a maintainer’s life easier, and mine harder.
- Open source is for people who are better at this than me.
- Trying to contribute and failing makes me feel stupid.
- There’s no time.
- It’s pretty lonely.
I found Brandon’s article interesting because I can definitely relate to a lot of what he says.
How do I know I’m ready to hack on an open source project? And if I’m not ready but jump in anyway, won’t I potentially just be broadcasting my stupidity across the Interwebs for all to see? How do I know where to start? The code base seems so intimidating and I know nothing about it. Are any hazing rituals involved? Those guys are so much better at hacking code than I’d be after ten lifetimes, how the fuck did they get so smart? Or am I just really retarded? I’ve got my own stuff I want to work on. All these sentiments I’ve felt at one time or another.
But recently, I’ve started contributing to open source projects anyway. Read more...
I remember when I first heard of Google’s new browser, dubbed Chrome. I was sitting at my desk at work, reading the news and for a moment I thought I could almost hear the wailing and gnashing of teeth emanating from clear across the other side of the world at Redmond.
I’ve never created a Ruby gem before, although I use other people’s gems a lot. So I decided recently that I might have a go at making one myself. I needed to find something nice and small to start off with. Read more...
Continuing on from my previous post on compiling Nginx with Phusion Passenger, some configuration is now in order.
To give credit where due, I’d like to mention that I found much help on the Slicehost articles and tutorials site and adapted some of their instructions for parts of this post. Thanks Slicehost! Read more...
After compiling Ruby 1.9.2 on my Debian Lenny web server, the next thing I wanted to do was get an actual web server going for serving up Rails apps. I’ve been an Apache user for a long time but I’d been hearing about Nginx and how it’s kicking ass and taking names, so I thought I might give it a go. I also needed some way to hook Rails up with Nginx. Read more...