Sam Soffes

How To Learn Rails

Posted in development, rails, ruby, and tutorial

A lot of people ask me how to learn Ruby on Rails. I usually forward this email I wrote awhile back to a friend. I figured it would probably be better to post it on my blog so more people can benefit from it.

Here's the email:

Hey man,

Rails is awesome. If you're not familiar with Ruby, I'd recommend getting acquainted with it first. I spend 2 hours reading a PDF online and then jumped in. The more you understand Ruby, the less magical Rails seems. The Ruby Programming Language is a great book. Matz (the creator of Ruby) is one of the authors. A lot of it is like "this is they way it is because when I designed it I though this". I liked it a lot.

The Poignant Guide is another really popular way to learn Ruby. There's a bit of history to it, but nevermind that for now.

Once you feel semi comfortable with Ruby (i.e. you can make a class that has methods, inheritance, control structures, etc), watch this 15 minute video. It will blow your mind. My next step was going back through it and trying to build it myself. This was really hard at first cause I had no idea what I was doing and didn't understand the syntax yet. Don't worry.

Try to write something simple in Rails. Maybe a blog or to do manager, etc. I learn by doing. This was the best for me. I've rewritten my blog at least 20 times. (By the way, it's open source on GitHub.)

The best resource I've found is Railscasts.com. They are really well done. Pretty much anything you could want to do, he has already covered. After I got several under my belt, I sorta "got it" and started really understanding what I was writing. #carlhuda on freenode (IRC channel) was also super helpful. @wycats (he's on the core team of Rails and jQuery) is in there and he's really great about helping new comers and teaching you stuff.

Ruby5 is also really great. It's a biweekly 5 minute podcast about news in the Ruby and Rails community. I've found lots of great stuff there.

Let me know if you need any help or have questions. I'd be happy to help.

Sam

More Stuff

I have several open source projects on my GitHub profile. My blog and Markdownr.com are two fairly straight forward Rails 3 projects.

I highly recommend learning Git. The Git documentation page will help a lot if you're trying to learn.

Two Videos You Need to Watch

Posted in development, inspiration, rails, and video

Here are two talks from RailsConf 2010. You can see all of the keynotes on YouTube. I haven't ever gone to a RailsConf, but I hope to sometime.

Even if you aren't a developer, these videos are totally worth your time.

Yehuda Katz

This is a short 26 minute talk by Yehuda Katz (@wycats) on development in general. This is so inspiring. He talks about doing the impossible and just getting stuff done. Really worth your time.

Gary Vaynerchuck

This is an hour talk by Gary Vaynerchuk (@garyvee). He talks about business to a group of developers and his views in general on social media and our culture. Really interesting and inspiring. It's long, but worth it. (He cusses a lot, just fyi.)

Homepage Albums

Posted in blog, development, lastfm, memcached, music, rails, and rake

I recently added an albums I've been enjoying this week section to my homepage. It's still a major work in progress. For some reason, tons of people have commented about it on Twitter asking how I made it, so I thought I'd write a quick post about the tech behind it.

The first thing your probably noticed is the sexy vinyl look. I got this from Komodo Media (all of their stuff is awesome, you should check it out). Some simple CSS plus their images and it looks dang sexy.

I'm using the Last.fm API to get my listening history. The call to get your top albums for the week doesn't return the album art for that album, so I have to get all of the albums and then get the art for each one. This whole process is pretty slow (source here) so I shove it in memcached on Heroku using the memcached gem so rendering is fast on my homepage.

I setup a cron to nightly rerun the lastfm:update rake task from above and update the cache with the new data. Pretty simple.

Anyway, I was proud. Nothing complex, just cool. Feel free to rip off anything I wrote. It's all on GitHub.