Skip to content

Pragmatic Studios Finds My Review Of It’s Ruby Course

Recently, The Pragmatic Studio found and tweeted a link to my blog post reviewing their Programming Ruby course.  I haven’t been actively blogging since last October due to some changes with my job at that time.  However, things have changed with my job situation and I plan to begin blogging more regularly.

Stay tuned for what’s next.


Textmate and RSpec

Part of this course I’m taking through the Pragmatic Studio has us learning about TDD (Test Driven Development). Rather than using the built in Ruby testing library (Unit Test), they have us using RSpec. A large part of the course has us running code both in Textmate and on the command line. However, when I tried to run the RSpec test files from Textmate, I wasn’t getting any results.  I didn’t get any errors, but I got no results either.

I did some researching and I found this site referenced by Jason Seifer that fixed my issues.

Textmate, Rspec, and Dot Spec Party

I hope you find this helpful.

Code Examples Based On Principles Learned From The Pragmatic Studio

One of my good friends is a professional Ruby/Rails developer, and he challenged me to apply the principles from what I’m learning by posting some code examples.  So, in response to that friendly challenge, I’m posting a sample class I wrote on the fly.  As I shared with my good friend, I wrote this code all on my own, without any help from any other source.  Here is a link to the code gist:

Sample Ruby Class

Please feel free to leave questions, comments, or feedback regarding this code.


Update: The Pragmatic Studio Ruby Course

I can’t say enough good things about The Pragmatic Studio Ruby Course.  Seriously, forget trying to learn Ruby by piecing together bits from a variety of sources.  If you want to learn Ruby, and I mean REALLY learn Ruby, then take this course.  I promise you that it’s a $200 investment that you won’t regret.  Purchasing this course has launched me in two days further than I’ve been able to get in months of trying to learn on my own.

As of this moment, I can, without using any notes for reference, write my own Ruby classes and instantiate them flawlessly.  I understand instance variables and how they are used in Ruby apps.  I understand object attributes, their significance, and how to use them.  I understand why/how to use the “initialize” method in a Ruby class as well as when and how to use the “attr” (Ruby’s getter and setter) class methods.

It’s amazing how quickly the fog in my mind is clearing.  I’m absolutely thrilled with my progress.  The next lessons will deal with how objects interact with other objects.  That’s where the rubber really meets the road in Ruby development.

In order to be fair to the Pragmatic Studio, I’m not going to post any samples/examples from the course.  However, I’m going to write my own little Ruby app after the course is finished using the principles that I’ve learned, and I’ll push that app to my Github account.  I’ll post the URL once it’s ready.  Until next time.

Rails App For My Church

Last night I started writing an announcements application for my church.  We’re a fairly new church plant without a permanent building.  This app is very raw, but at least it’s started.  About all it has at this point is a .rvmrc file with Twitter Bootstrap installed.  I’ve posted the source code on Github.  I’m hoping to have it posted to Heroku very soon.

I’m trying to get a good amount of the work done over the next couple of weeks so that our church leadership team can do an initial review of the app.  I’ll post my progress here on the blog as well as any progress with my studies.

The Pragmatic Studio Ruby Course

Just to have a little bit of a change of pace, I’m going to put the Programming Ruby book down for just a little bit.  I don’t know about anyone else, but I learn best by looking at the same thing from different perspectives.  The Programming Ruby book is fantastic, but I need a break from reading and I’d like to use some videos for a season.

What caused me to consider this is that I had to take a SQL Server DBA course last week for work (our DBA resigned and we needed to get something/someone in place quickly).  I learned so much by sitting in class and being able to actually work through the material.

So, I’m going to purchase the course and work through the material.  The details of the course can be found here: The Pragmatic Studio Ruby Course.  Until next time.

The Goodness Of Regular Expressions

This morning I have continued to work my way through the Programming Ruby book. Once again, I find myself learning about concepts that I’ve only grazed in the past.

According to Programming Ruby, on page 24, here is the definition of a regular expression:

A regular expression is simply a way of specifying a pattern of characters to be matched in a string. In Ruby, you typically create a regular expression by writing a pattern between slash characters(/pattern/). And, Ruby being Ruby, regular expressions are objects and can be manipulated as such.

This concept was awesome to discover. I remember watching Ryan Bates one time in a particular Railscasts episode, and I was totally confused when he used all of these special characters to validate a form to ensure that the user was typing a valid email address in a particular field. I remember thinking, “How in the world could someone just know that pattern and be able to remember it?” It honestly looked like Greek to me.

Well, now I see that he was using character classes (space, tab, newline, etc) stored in a regular expression to match against what was entered in the form by the user. If the format of what the user entered matched the regular expression stored in the model, then the form input was accepted. If it didn’t match, then a validation error was thrown.

I felt like such a noob as I was working through this today. I mean, I’ve been working in Rails off and on for about two years now. How could I not know this? Once again, this is an example of jumping in feet first into a powerful (but complicated) framework without having a solid foundation in the language of that framework. I heard Michael Hartl say in a video once that you don’t have to be strong in Ruby to write Rails applications. I really respect Michael Hartl and I love his tutorials, but I have to strongly disagree with him on this point. I can honestly tell you that the more I learn about Ruby, the more I have those “Aha!” moments about Rails.

I think competent Ruby programmers take Rails for granted sometimes when they are dealing with beginners. What I mean is that Rails is such an opinionated framework that it’s easy for Ruby programmers to dive in, accept the convention over configuration nature of Rails, and produce some great applications without the headache of managing a lot of overhead. However, someone new to programming won’t have the tools necessary to either understand or leverage the power of Rails. Sure, anyone can do what I did and Google away to figure out how accomplish certain tasks. However, I can say with confidence that if someone doesn’t have a strong foundation in Ruby, then they won’t have the ability to create great applications on their own in Rails. There will always be that “brick wall” that you can’t seem to get beyond as you develop your application.

I’m so glad that I’m putting in the time and effort to go back and really learn Ruby. I’m already so much further along in my understanding of Rails than I was even a couple of weeks ago when I started this blog.

That’s all for now. Until next time.