So here's what I've been up to today:
RAILS TUTORIALS
I like doing tutorials and I always learn something new from each one, but there are some annoying factors. For one thing, since Rails has been around for a while now, a lot of the tutorials I find that I want to create are for older versions of Rails. I'm still interested in doing these, but figuring out what the new syntax is for older examples is tricky. I found an updated version for the recipe application and finished that up last night. Now I'm trying to find a new version for a to-do list.
I tried a couple of video tutorials, but the problem with those is I like to code along with the tutorial, and it's a pain in the ass to constantly pause and restart a video. Still, railscasts is a great resource and it would be worthwhile just to watch, even if I'm not coding along with the video.
One final gripe: a lot of Rails tutorials are geared towards beginners, so every one walks me through what Rails is, a brief history of Rails, how to install Rails and so on. I get it, and it's useful, but it gets tedious. I'd like to see more tutorials geared for slightly more experienced users. Do such things exist? I don't know!
Still, doing just a fucking ton of tutorials is a good idea. I'm learning new things and reinforcing what I already know to the point that I can do some things automatically.
One useful thing I learned today: setting up a Project with TextMate, because I saw a video where a guy was using it and thought "Oh man, why am I still browsing back and forth through a series of folders? That seems MUCH better!" So sometimes it's not a matter of learning new things, it's a matter of learning new ways to use familiar tools.
My name is Tyler. I'm learning Ruby on Rails. This is a blog for me to talk about what I've learned. I'm no longer completely new to Ruby and while I don't feel comfortable calling myself a coder or programmer yet, I am absolutely a Ruby Enthusiast and a Rails Fancier. I've been working with Ruby on Rails since February 1, 2011. You know that song about "lovin' every minute of it?" Bingo.
Showing posts with label tutorials. Show all posts
Showing posts with label tutorials. Show all posts
Sunday, May 22, 2011
Saturday, May 21, 2011
A little late-night coding
I wish I didn't have to get up at 7 am during the week. I've always felt most productive and focused when working on projects late at night.
I've been reading the archives at railstips.org lately. I'm using some liberty when I say "reading the archives," because I really only got to this article on good Rails tutorials.
On a side note: I've linked to a 5 year old article which is a link to another article which is a collection of Rails tutorials. Is that ridiculous?
ANYWAY! My friend Eli encouraged me to try out some of these tutorials, despite their age. Most of them use bizarre, antiquated syntax. Luckily, I found an updated version of the first tutorial, which walks you through creating a recipe database. It's a simple application, allowing a user to create recipes and categories, then assign recipes to categories. I can think of several ways to expand functionality for this application: allowing users to search by ingredients, sorting recipes by categories, allowing users to create meals consisting of multiple recipes and so on.
I try to think of these things when I'm doing a tutorial or working on a personal project. I always ask "What else could be done? Where else could this go?" Luckily, Rails not only makes it easy to build something functional very quickly, it also makes adding functionality easy. I'm not sure if this is true for most other languages, but I highly doubt I'd have gotten interested in Rails if it wasn't so simple to pick up the basics.
Not that I think I'm an expert, or even knowledgable! I still get discouraged, especially when I can't figure out how to do something that SHOULD be easy, but I'm getting better every day. I'm planning to work through some of the tutorials on that list, hoping to learn some techniques that I can apply to Manticore and other projects.
A couple of interesting things I learned tonight:
Linking back to the main page of an application:
I got on irc and asked about this. It turns out the trick is this:
<%= link_to 'Home', :root %>
I'd tried linking to various forms of home, index, homes_path and index_path with no luck. This nice little trick saves a bit of time when navigating, though in a real application I'd want to use breadcrumbs instead. I'm assuming that would be built in much the same way?
Pulling information from one model and displaying it in the form of a second model:
In this application, I have two models: Recipe and Category. Each Recipe will belong to a Category, and to build this information in the form for a new Recipe, here's the code:
<div class="field">
<%= f.label :category %><br />
<%= select "recipe", "category_id", Category.find(:all).collect {|p| [ p.name, p.id ] }, {:include_blank => true} %>
</div>
It feels good to make progress, and I think I should be talking more specifically about what I've learned. I feel like my learning has been all over the board, but maybe that's how everyone learns to code.
I've been reading the archives at railstips.org lately. I'm using some liberty when I say "reading the archives," because I really only got to this article on good Rails tutorials.
On a side note: I've linked to a 5 year old article which is a link to another article which is a collection of Rails tutorials. Is that ridiculous?
ANYWAY! My friend Eli encouraged me to try out some of these tutorials, despite their age. Most of them use bizarre, antiquated syntax. Luckily, I found an updated version of the first tutorial, which walks you through creating a recipe database. It's a simple application, allowing a user to create recipes and categories, then assign recipes to categories. I can think of several ways to expand functionality for this application: allowing users to search by ingredients, sorting recipes by categories, allowing users to create meals consisting of multiple recipes and so on.
I try to think of these things when I'm doing a tutorial or working on a personal project. I always ask "What else could be done? Where else could this go?" Luckily, Rails not only makes it easy to build something functional very quickly, it also makes adding functionality easy. I'm not sure if this is true for most other languages, but I highly doubt I'd have gotten interested in Rails if it wasn't so simple to pick up the basics.
Not that I think I'm an expert, or even knowledgable! I still get discouraged, especially when I can't figure out how to do something that SHOULD be easy, but I'm getting better every day. I'm planning to work through some of the tutorials on that list, hoping to learn some techniques that I can apply to Manticore and other projects.
A couple of interesting things I learned tonight:
Linking back to the main page of an application:
I got on irc and asked about this. It turns out the trick is this:
<%= link_to 'Home', :root %>
I'd tried linking to various forms of home, index, homes_path and index_path with no luck. This nice little trick saves a bit of time when navigating, though in a real application I'd want to use breadcrumbs instead. I'm assuming that would be built in much the same way?
Pulling information from one model and displaying it in the form of a second model:
In this application, I have two models: Recipe and Category. Each Recipe will belong to a Category, and to build this information in the form for a new Recipe, here's the code:
<div class="field">
<%= f.label :category %><br />
<%= select "recipe", "category_id", Category.find(:all).collect {|p| [ p.name, p.id ] }, {:include_blank => true} %>
</div>
It feels good to make progress, and I think I should be talking more specifically about what I've learned. I feel like my learning has been all over the board, but maybe that's how everyone learns to code.
Subscribe to:
Posts (Atom)