Can anyone recommend a book on test-driven development ? Suspect a book with Rails specifics is a bit of a pipe-dream at the moment, but anything you''ve found particularly applicable in a Rails environment would be useful. BTW ... I''m assuming TDD is the way to go with Rails ... but any thoughts or observations anyone has on the topic (pro or con) would be welcome ... Cheers, Andy -- Posted via http://www.ruby-forum.com/.
Christer Nilsson
2005-Dec-01 12:30 UTC
Re: Test Driven Development - Book recommendations ?
Kent Beck: Test-Driven Development is very good. Java and Python. and study rubyonrails code, for example this http://rforum.andreas-s.net/trac/browser/trunk/test/ cheers Christer -- Posted via http://www.ruby-forum.com/.
Kent Beck''s "Test Driven Development" is fantastic, as well as his eXtreme Programming Explained book. Of course Pragmatic Unit Testing by Hunt/Thomas is a winner as well. Erik On 1 Dec 2005, at 07:16, rails nut wrote:> Can anyone recommend a book on test-driven development ? > > Suspect a book with Rails specifics is a bit of a pipe-dream at the > moment, but anything you''ve found particularly applicable in a Rails > environment would be useful. > > BTW ... I''m assuming TDD is the way to go with Rails ... but any > thoughts or observations anyone has on the topic (pro or con) would be > welcome ... > > Cheers, Andy > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hmmm ... is the Pragamtic book applicable to RoR ? It looks to me like it might be specific to Java. BTW, Erik, did you work for ''PP'' in the past ? Andy erik wrote:> Kent Beck''s "Test Driven Development" is fantastic, as well as his > eXtreme Programming Explained book. Of course Pragmatic Unit Testing > by Hunt/Thomas is a winner as well. > > Erik-- Posted via http://www.ruby-forum.com/.
Erik Hatcher
2005-Dec-01 14:56 UTC
Re: Re: Test Driven Development - Book recommendations ?
On 1 Dec 2005, at 09:48, rails nut wrote:> Hmmm ... is the Pragamtic book applicable to RoR ? It looks to me like > it might be specific to Java.True... but the same techniques and, most importantly, philosophy apply. You''ll just have to type less curly brackets when switching to Ruby. The Beck book has Python in it, so its getting warmer language-wise. The Pickaxe book has coverage of unit testing in Ruby. So, Beck for the philosophy and some specifics, Pragmatic Unit Testing for the quick how-to, and Pickaxe for the translation to Ruby.> BTW, Erik, did you work for ''PP'' in the past ?No, not in the past. Though I am a pragmatic programmer, and was floored the first time I read the book by the same name. A couple of years later I sat down at a table beside Dave Thomas to speak on an expert panel at a No Fluff Just Stuff symposium. He''s been a friend ever since. One of these days soon I''ll work for ''PP'' though ;) Erik
Scott Barron
2005-Dec-01 15:32 UTC
Re: Re: Test Driven Development - Book recommendations ?
On Dec 1, 2005, at 9:48 AM, rails nut wrote:> Hmmm ... is the Pragamtic book applicable to RoR ? It looks to me like > it might be specific to Java.There are Java and C# versions of this book available, which sort of indicates how language neutral it really is. I bought the C# book and found that only a small portion of the book is specific to the platform it covers (e.g. using NUnit). Sure the code samples will be in C#/Java, but they''re just samples. The most valuable material is in the text. It is worth the read even if you''ll never touch C#/Java (and here''s hoping you won''t!). -- Scott Barron Lunchbox Software http://lunchboxsoftware.com http://lunchroom.lunchboxsoftware.com http://rubyi.st
erik wrote:> On 1 Dec 2005, at 09:48, rails nut wrote: >> BTW, Erik, did you work for ''PP'' in the past ? > > No, not in the past. Though I am a pragmatic programmer, and was > floored the first time I read the book by the same name. A couple of > years later I sat down at a table beside Dave Thomas to speak on an > expert panel at a No Fluff Just Stuff symposium. He''s been a friend > ever since. > > One of these days soon I''ll work for ''PP'' though ;) > > Erikahhh ... I wasn''t thinking Pragmatic Programmer when I typed ''PP'' :) Andy -- Posted via http://www.ruby-forum.com/.
While you''re waiting for your Amazon parcel, you can look at those articles: http://www.xprogramming.com/xpmag/refactoringisntrework.htm http://www.xprogramming.com/xpmag/recordmap.htm Alain R.
Steven R. Baker
2005-Dec-01 21:48 UTC
Re: Test Driven Development - Book recommendations ?
> Can anyone recommend a book on test-driven development ?Test-Drive Development: A Practical Guide, by Dave Astels.> Suspect a book with Rails specifics is a bit of a pipe-dream at the > moment, but anything you''ve found particularly applicable in a Rails > environment would be useful.There aren''t any yet. But I''m giving a work shop that will cover Test-Driven Development of Rails apps in the new year. See http://www.canadaonrails.com/ for more information.> BTW ... I''m assuming TDD is the way to go with Rails ... but any > thoughts or observations anyone has on the topic (pro or con) would be > welcome ...Yes it is the way to go. When you stop using your web browser for development, you stop wasting time tweaking little visual bits that are the job of the designer. It''s nice to get rid of the code->browser->refresh context switch. And manual testing is *so* 1970s. -Steven
On Dec 1, 2005, at 2:19 PM, rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org wrote:> Message: 3 > Date: Thu, 1 Dec 2005 13:48:46 -0800 > From: "Steven R. Baker" <srbaker-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org> > Subject: Re: [Rails] Test Driven Development - Book recommendations ? > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Message-ID: > <b8356eb30512011348s536ed2c0m3c4f66e3f3d5883d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> > Content-Type: text/plain; charset=ISO-8859-1 > >> Can anyone recommend a book on test-driven development ? > > Test-Drive Development: A Practical Guide, by Dave Astels. > >> Suspect a book with Rails specifics is a bit of a pipe-dream at the >> moment, but anything you''ve found particularly applicable in a Rails >> environment would be useful. > > There aren''t any yet. But I''m giving a work shop that will cover > Test-Driven Development of Rails apps in the new year. See > http://www.canadaonrails.com/ for more information. > >> BTW ... I''m assuming TDD is the way to go with Rails ... but any >> thoughts or observations anyone has on the topic (pro or con) >> would be >> welcome ... > > Yes it is the way to go. When you stop using your web browser for > development, you stop wasting time tweaking little visual bits that > are the job of the designer. It''s nice to get rid of the > code->browser->refresh context switch. And manual testing is *so* > 1970s.Ryan Davis and I built rubyholic.com purely TDD. We have a brief recap of our experience here: http://blog.zenspider.com/archives/2005/11/rubyholic_v10_i.html -- Eric Hodel - drbrain-48TerJ1FxhPk1uMJSBkQmQ@public.gmane.org - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com
at the top of my models I have modelName < ActiveRecord::Base I understand the "<" but what is this "::" and "Base." It has started to drive me bonkers every time I see it. (for those of you who don''t like character deficient personalities, I shall rephrase "I drive myself bonkers every time I see it using it as the stimulus to my going bonkers pattern that I have installed as a behaviour). bruce
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruce, That''s a (from Pickaxe) "scope resolution" operator. It says ''ActiveRecord'' is the namespace and ''Base'' is the (in this case) class within that namespace. - --Jeff On Dec 1, 2005, at 5:06 PM, Bruce Balmer wrote:> at the top of my models I have > > modelName < ActiveRecord::Base > > I understand the "<" but what is this "::" and "Base." > > It has started to drive me bonkers every time I see it. (for those > of you who don''t like character deficient personalities, I shall > rephrase "I drive myself bonkers every time I see it using it as > the stimulus to my going bonkers pattern that I have installed as a > behaviour). > > bruce > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDj6RIG9xIoXK+giARAtrgAKCWrLKyO7F3+fo2j6CeQ3+nJRK/4QCcDRAf C/xlNRiPcMmu1PBhr/0gXhA=KY5G -----END PGP SIGNATURE-----
Base is the name of the class and it resides in the ActiveRecord module. It''s similar to a namespace in Java or.NET, but modules offer other functionality as well. Hope this helps. --Ryan On 12/1/05, Bruce Balmer <brucebalmer-ee4meeAH724@public.gmane.org> wrote:> at the top of my models I have > > modelName < ActiveRecord::Base > > I understand the "<" but what is this "::" and "Base." > > It has started to drive me bonkers every time I see it. (for those > of you who don''t like character deficient personalities, I shall > rephrase "I drive myself bonkers every time I see it using it as the > stimulus to my going bonkers pattern that I have installed as a > behaviour). > > bruce > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
This means that modelName inherits from the Base class inside the ActiveRecord module. :: is the scope operator Base is the class name. Pat On 12/1/05, Bruce Balmer <brucebalmer-ee4meeAH724@public.gmane.org> wrote:> at the top of my models I have > > modelName < ActiveRecord::Base > > I understand the "<" but what is this "::" and "Base." > > It has started to drive me bonkers every time I see it. (for those > of you who don''t like character deficient personalities, I shall > rephrase "I drive myself bonkers every time I see it using it as the > stimulus to my going bonkers pattern that I have installed as a > behaviour). > > bruce > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >