
Giving away my Rails 3.0 book. Code examples also available on Github. - bryanbibat
https://github.com/bryanbibat/rails-3_0-tutorial
======
molecule
"You are free to distribute this book to anyone you want, so long as... it is
not altered..."

That doesn't seem consistent w/ the intended usage patterns of git and github,
e.g. github's 'Fork' button is displayed prominently on every src page, for
the purpose of alteration and distribution of src.

~~~
bryanbibat
Noted. Any suggestions on a good license to use for this document to allow
non-commercial derivative works?

~~~
noahc
You're looking for this: <http://creativecommons.org/licenses/by-nc/3.0/>

Although, there is one that prevents modification as well if that's what
you're looking for.

~~~
zedshaw
No, that license allows remixing and adapting the work. That would let people
butcher the book and leave broken copies that frustrate students.

~~~
noahc
Zed, that's what he wanted. As I suggested there are alternatives to prevent
someone from changing even one word.

~~~
bryanbibat
Yup. While it is true that allowing others to modify my work will probably
bite me in the ass in the future, there are also some arguments for allowing
this.

For one, the book is targeted to Filipino students - teachers may want to
modify the names/scenarios to better suit their country. Sure, gives them a
low-hanging trolling fruit (e.g. putting vulgar words in the i18n section),
but I really don't have the time to review these forks.

------
danneu
Even though I consider myself an intermediate Rails programmer, I read through
every beginner guide I can find to pick up the small nuances that differ from
programmer to programmer.

Thanks!

~~~
auxbuss
You're in good company. Mikhail Botvinnik, many times world chess champion,
was known to watch tv programmes about chess. The theory being that you can
never reinforce the fundamentals enough. I concur, in any field of study.

------
angryasian
thanks for taking the time with this.

1\. Any plans to update for 3.1 ?

2\. I think its strange to address the dsl rspec for testing vs the standard
rails unit test and not address other dsl like haml, sass, coffeescript (3.1).
I think if you're going to go by rails community conventions vs rails
framework convention then haml and sass should of been introduced.

~~~
ryanbigg
While I can't answer #1, I can give a reason for #2. When you're teaching
people Ruby on Rails you would/should be teaching them what exists in the
framework by default. The default templating language for views happens to be
ERB-powered HTML, and so that should be taught.

Teaching haml and Rails at the same time would only confuse people as they
will need to learn Rails AND haml at the same time. If anything, it would be
better to introduce this as a "bonus chapter" or an appendix and let people
choose for themselves rather than forcing them to learn something excessive.

Now, you may think that I would argue the same point for SCSS too. But now
that SCSS is the default within Rails 3.1, it is "right" to teach it at the
same time as Rails. The "leap" from CSS to SCSS is not as large as the one
from HTML to haml, either.

~~~
angryasian
>When you're teaching people Ruby on Rails you would/should be teaching them
what exists in the framework by default.

this was exactly my point. You introduce RSpec rather than rails unit testing.

~~~
ryanbigg
I would do the same thing, as Test::Unit's syntax is more confusing to a
newbie than RSpec. For instance: assert_equal 2, @thing.method vs
@thing.method.should == 2.

RSpec is also used by the majority of Rails developers (based on a random stat
I pulled out of the air and due to my experience on many, many Rails projects)
and it _should_ be treated as the default, even though it is not.

~~~
awj
> For instance: assert_equal 2, @thing.method vs @thing.method.should == 2.

...what makes you think this is less confusing? Test::Unit is blindingly
simple, your assertions are plain old functions that take plain old arguments.
I can build new assertions through simple function definition.

Rspec, on the other hand, adds methods to everything to let you structure your
code so it reads like English. The goal here is _not_ to be less confusing,
but to be _easier to read_. RSpec is a lot harder to learn, and writing custom
matchers is a lot more work than gluing together assertions.

Seriously, watch somebody new trying to figure out RSpec ... it's a bit of an
ugly sight. Their first experience with automatic predicate matchers typically
is a true wtf moment.

------
hwf829
<a href="[http://railscasts.com/episodes/282-upgrading-to-
rails-3-1?au...](http://railscasts.com/episodes/282-upgrading-to-
rails-3-1?autoplay=true>upgrade) that app to 3.1 with this screen cast</a>

------
danest
Byran why don't you sell the book to your own students? I know a lot of my
professors sell their own books through the book store (with no real
publisher) they just print it out and put a cover on it.

~~~
bryanbibat
Ethics, I guess? LOL. Not really keen on selling a typo-filled book on a non-
current version of a software.

------
scottshea
Thank you. This is coming at a very opportune time for me.

------
pkrefta
THANK YOU - sorry for caps but thanks are big.

------
shimonamit
Off topic: what is the font you used in the PDF book?

UPDATE: ...and thank you much for the materials!

~~~
bryanbibat
Inconsolata (<http://www.levien.com/type/myfonts/inconsolata.html>) for code
and Ubuntu (<http://font.ubuntu.com/>) for everything else

------
g-garron
Thank you very much.

------
punman
this book is a gem! (pun intended)

------
rrpp
how do you download the book?

~~~
qx24b
[https://github.com/bryanbibat/rails-3_0-tutorial/blob/master...](https://github.com/bryanbibat/rails-3_0-tutorial/blob/master/student_manual.pdf?raw=true)

------
pduan
Thanks!

