Advanced Ruby Course in London with Dave Thomas

August 21, 2014 by Nicole Clark

On November 17-19, Dave Thomas will be teaching our Advanced Ruby course in London, UK through a partnership with Skills Matter. Dave is a cornerstone of the Ruby community, and is personally responsible for many of its innovative directions and initiatives. This is a great opportunity to learn directly from him!

This in-depth course will help you use Ruby more effectively and write code that's powerful, compact, and fun to work with. You'll have moved beyond the basic toolbox of the average Ruby developer. Spend three days with Dave, and you'll come away feeling like a Ruby Master!

Check out the full course description and register today. Sign up by September 18th for discounted pricing!

Happy Birthday, Rails!

July 25, 2014 by Mike Clark

It was 10 years ago today that David Heinemeier Hansson announced Rails. It seems like only yesterday, and at the same time it's hard to remember what web development (or even our lives!) was like before Rails.

I recall being fed up with all the make-work involved in building J2EE apps, and Rails felt like a breath of fresh air. Coincidentally, I had been playing around with Ruby and looking for a way to use it in earnest. Building web apps with Rails offered an ideal opportunity to really dig into Ruby. And so I quickly made the jump and never looked back.

A year or so later with two Rails apps in production, Dave Thomas and I thought it might be fun to teach a public course on Rails. Nicole volunteered to coordinate it and the good folks at FGM graciously offered us a great space to teach. We figured if the first course went well then we might have enough interest to do a couple more. Turns out that the first course sold out and The Pragmatic Studio was born. Fast-forward 9 years, and we're still happily teaching Ruby and Rails! It's been an amazing ride.

Many thanks to David and the entire Rails community for creating and evolving Rails all these years! And thanks to all the good folks who've supported us over the years through our courses. Honestly, we wouldn't be here today without you!

To see how far Rails has come since 2004, here's the original "How to build a blog in 15 minutes with Rails" video (affectionately known as the Wups! video) that started the revolution:

Wups — it worked! :-)

Using Scopes to Write Custom Queries in Rails

July 15, 2014 by Mike Clark

In our Rails Level I course we look at how to define custom queries by writing class methods in models. For example, to find all events that occurred in the past (versus upcoming events), we write a past method in the Event model and then query past events using Event.past.

We build on that foundation in our Rails Level II course by learning how to write custom queries using the declarative style offered by the scope method. A scope simply names a chunk of query code, and behind the scenes it dynamically defines a class method that encapsulates the query code.

One of the keys to writing a scope is to make the query code a callable Ruby object (also called a Proc object). It's at this point that many folks are first exposed to a Ruby lambda, or the more cryptic -> shortcut. As a quick introduction to how lambdas work, check out this 3-minute excerpt from the Scopes module in our Rails Level II course where we convert the past class method to a scope:

If you found that helpful, go ahead and watch the entire Scopes module, as well as other free modules in the Rails Level II course. You can also check out the course introduction video for an overview of the application features we build in this course. Or jump right in and purchase the entire course (with downloadable HD videos!). Our course is based on Rails 4, so you'll learn and apply the most up-to-date techniques!

"I know after completing your Rails I and II courses that I can build pretty much whatever I want to in Rails. These two courses are far and away the best value-for-money Rails courses out there."

— Jonathan Mundy

« Older Posts