Over at Railscasts, they’re holding a contest, and the way to enter is to submit 5 tips for othe Rails developers. I’ve put together two simple Rails-based sites so far, and I consider myself to be a beginner moving into intermediate levels. I’ve relied on tips from countless other developers to make my first two sites happen, and I think this contest is good motivation for me to start giving back.
Here are my tips:
- Use raise @variable_name.to_yaml all over the place. It helps you figure out what you’ve got in your variables. I use it my controllers all the time. You can also use the .inspect method.
- Use Subversion + Capistrano. I didn’t use this combination for my first site, but I’m running it for my second and loving it. It makes deploying changes to my site ridiculously simple.
- Use Slicehost. My first site is adequately hosted at TextDrive (or is it Joyent now?), but I wanted more control in my second site. Slicehost sets up a virtual machine called a slice, allows you to set up your own Linux distro, and let’s you take it from there. I learned a ton about Linux and the true ins-and-outs of hosting a rails app.
- Use Textmate. Honestly, I was using a PC when I first got interested in Rails, but I saw screencasts using Textmate and I knew I had to switch. Best decision I’ve ever made (computer-wise).
- Use the API documentation. When I first started, I was intimidated by that document, but once you get comfortable, you really see what can be done with Rails. Sometimes I go to find syntax for one method and find another I never knew existed, but works even better.
This giant Lego man was found floating to shore near a Dutch resort.
Happy American Independence Day!