Thinking About Starting A Grails 3 Tutorial

I was at the Austin Groovy and Grails User Group this past week. The speaker was Ken Kousen. I am seeing a pattern with the No Fluff Just Stuff Speakers: they are all really smart guys who tell the same jokes year after year.

Ken Kousen said that he has run into some gotchas with Grails 3, and that the docs are not up to date. He said Grails 3 needs a book, and he doesn’t see one coming out any time soon. A lot of the Groovy and Grails authors either have just finished books and don’t want to go through the grinder again right away.

I have been thinking for a couple of years of making a Grails tutorial, sort of like a Hartl tutorial for Grails. Perhaps it is time to get it started. If I did this, it would only exist online.

I have also thought about making a quick Ratpack tutorial. It would be nice if there was a linear set of steps to make a CRUD app. It’s nice to know some theory, but sometimes I wish projects would make it easier to help newbies get through a “Hello, World”.

I have to think about it. I might be biting off more than I can chew.

You’re welcome.

Image from an 11th-century manuscript housed at the Bamberg State Library (Wikipedia page here), manuscript description here, citation link here, image assumed allowed under Fair Use.

Ruby Tip: Instances

So I was working on a Rails project, helping someone upgrade from Rails 2 on Ruby 1.8.7 to Rails 3 on Ruby 1.9. There have been a few changes in the APIs. At one point, I was getting some exceptions. I needed to see what variables were available to an object. There were ifs and mixins and supers, so it was not always clear what I could call in a “puts” statement and what I could not.

So here is how you print out a list of the instance variables, and get a value:

puts "@article.instance_variable_names: #{@article.instance_variable_names.sort}"
puts "@article.instance_variable_get(@title): #{@article.instance_variable_get("@title")}"