Month: January 2011

Rails

Rails for Zombies

Rails for ZombiesOn Thursday of this past week, Chris and I did a brown bag “lunch and learn” at work. Our original plans fell through, so we decided to hit up Rails for Zombies and see what it is about.

I really like the format of the tutorial and the way that the labs are constructed. If you follow the process exactly, you create an account so that they can track your progress so you can return at any time and pick up right where you left off. Then you watch several 5-10 minute videos and then complete an interactive session in your browser after each one.

Here is a screenshot of the first video’s title screen. It definitely helps you get a feel for how *in* to this the good folks at Envy Labs are.

Lab One Video

The goal of the project is that we are building a “Twitter for Zombies” so that they can be all social and stuff. All of the code that is written is around that goal. Here’s what it looks like when you get into the lab.

Lab One Exercise

You can see that after I write my code and submit it, I get instant actual IRB-like feedback. If I were to have made a syntax error, I’d get that back, as well. It seems to be doing true evaluation, as Chris entered some alternative, more advanced ways of performing the labs and it was all evaluated correctly, too.

Lab One Exercise Solved

There is definitely a benefit to not having to set up Ruby and Rails on your machine before you get some exposure to Rails. Just like if I was trying to pick this up by pairing with someone, you don’t start at the beginning with this project. There is no project creation, scaffold generation, database setup, etc. You start in on a project that is kind of already underway.

Several things you do are never really explained and some things you do are explained at the very end (like generating links in the view based on named routes). I supposed I could have suspended belief a little until I got to lab five to learn it, but I ended up asking Chris a lot of questions as we went along.

As I said, I really like this format for teaching and conveying new programming topics to people. I’m really impressed at the work that Envy Labs put in. At the same time, you could complete this entire lab and not know how to even begin your own Rails project. However, if you couple this training with all of the existing Rails tutorials that try to get you up and running in 10 minutes and I think that you could have the knowledge you need to get pretty far into making your own Rails app from your own concepts.

Git

Git Immersion

Got GitI’ve begun tackling my 2011 technology resolutions. It was as if the good folks at EdgeCase read my blog and deigned to help a brotha out. They’ve recently launched Git Immersion, which does for Git what their Koans did for the masses. That is, it offers a simple, step-by-step way for someone to learn a technology.

I already learned something. Doing Lab 3, it says to issue this command

git commit -m 'First Commit'

When I do, I get this error

error: pathspec 'Commit'' did not match any file(s) known to git.

A little of my Google-Fu and I find that my windows command prompt is anti me using the ‘ here. I change the command to

git commit -m "First Commit"

and I get the right result

[master (root-commit) d23d927] First Commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 hello.rb

Another thing I learned. When I typed “git commit” with no -m (Lab 8), it brought up VIM. Guess what? I’m such a n00b that I couldn’t figure out how to save my freaking file. Thank goodness for StackOverflow here to tell me to hit Esc then type :wq and then the enter key.

That’s it of my revelations so far. As I’m writing this, I am through the first 10 labs and will do some more after I post this. I’m really looking forward to learning Git because I like the way that it encourages you to work. On to some more learning…