Mikel Lindsaar
2008-Dec-03 11:50 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
On Thu, Nov 27, 2008 at 4:28 PM, Aslak Helles?y <aslak.hellesoy at gmail.com>wrote:> When (if) this thread ends, let''s start a discussion about indentation > conventions! >Oh... let the pleasure be mine!... and why wait? _EVERYONE_ knows that the only way to indent ruby code is 2 plain spaces. Tabs are known to be the source of all evil and 4 spaces obviously wastes space and bandwidth... Anyone else who says otherwise is obviously and irrefutably misguided :D Mikel <tongue firmly in cheek> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081203/395cb495/attachment.html>
Andrew Premdas
2008-Dec-03 14:27 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
Oh but cucumber features so want to be idented on the I Scenario: Anonymous user can not duplicate a un-activated account Given I am an anonymous user And a registered user Fred exists When I signup as Fred Then I should see an error Really need to view above with a monspaced font - if its not coming out that way in your mail reader. Andrew 2008/12/3 Mikel Lindsaar <raasdnil at gmail.com>:> On Thu, Nov 27, 2008 at 4:28 PM, Aslak Helles?y <aslak.hellesoy at gmail.com> > wrote: >> >> When (if) this thread ends, let''s start a discussion about indentation >> conventions! > > Oh... let the pleasure be mine!... and why wait? > _EVERYONE_ knows that the only way to indent ruby code is 2 plain spaces. > Tabs are known to be the source of all evil and 4 spaces obviously wastes > space and bandwidth... > Anyone else who says otherwise is obviously and irrefutably misguided :D > > Mikel > <tongue firmly in cheek> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081203/2e9b3606/attachment.html>
Fernando GarcĂa Samblas
2008-Dec-04 17:01 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
Andrew Premdas escribi?:> Oh but cucumber features so want to be idented on the I > > Scenario: Anonymous user can not duplicate a un-activated account > Given I am an anonymous user > And a registered user Fred exists > When I signup as Fred > Then I should see an error > > Really need to view above with a monspaced font - if its not coming > out that way in your mail reader.+0.66 :) I like to indent this way, but within a given, when or then block: Scenario: Anonymous user can not duplicate a un-activated account Given I am an anonymous user And a registered user Fred exists When I signup as Fred Then I should see an error Great idea, I love conventions!!! Nando> > Andrew > > 2008/12/3 Mikel Lindsaar <raasdnil at gmail.com <mailto:raasdnil at gmail.com>>: > > On Thu, Nov 27, 2008 at 4:28 PM, Aslak Helles?y > <aslak.hellesoy at gmail.com <mailto:aslak.hellesoy at gmail.com>> > > wrote: > >> > >> When (if) this thread ends, let''s start a discussion about indentation > >> conventions! > > > > Oh... let the pleasure be mine!... and why wait? > > _EVERYONE_ knows that the only way to indent ruby code is 2 plain > spaces. > > Tabs are known to be the source of all evil and 4 spaces obviously > wastes > > space and bandwidth... > > Anyone else who says otherwise is obviously and irrefutably misguided :D > > > > Mikel > > <tongue firmly in cheek> > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org <mailto:rspec-users at rubyforge.org> > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > ------------------------------------------------------------------------ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users-- Fernando Garc?a Samblas fernando.garcia at the-cocktail.com http://nando.lacoctelera.com The Cocktail C/ Salamanca 17 28020 Madrid +34 91 567 06 05 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081204/26f4dd07/attachment-0001.html>
Peter Jaros
2008-Dec-04 19:14 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
On Wed, Dec 3, 2008 at 9:27 AM, Andrew Premdas <apremdas at gmail.com> wrote:> Oh but cucumber features so want to be idented on the I > > Scenario: Anonymous user can not duplicate a un-activated account > Given I am an anonymous user > And a registered user Fred exists > When I signup as Fred > Then I should see an errorI have to disagree. I find the jagged margin looks messy. I would never indent other prose this way, so why would I indent my features this way? They''re not code, they''re prose. They''re not written to be parsed, they''re written to be read like a story. Peter
Andrew Premdas
2008-Dec-04 21:33 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
Definitely a matter of taste. A few things 1) syntax highlighting seems to make aligning on the I more preferable 2) And''s feel like there nested 3) Maybe its my programmers eye reading and looking for matches rather than reading the scenario as a whole Is a feature prose? Seems closer to poetry in layout at least 2008/12/4 Peter Jaros <peter.a.jaros at gmail.com>> On Wed, Dec 3, 2008 at 9:27 AM, Andrew Premdas <apremdas at gmail.com> wrote: > > Oh but cucumber features so want to be idented on the I > > > > Scenario: Anonymous user can not duplicate a un-activated account > > Given I am an anonymous user > > And a registered user Fred exists > > When I signup as Fred > > Then I should see an error > > I have to disagree. I find the jagged margin looks messy. I would > never indent other prose this way, so why would I indent my features > this way? They''re not code, they''re prose. They''re not written to be > parsed, they''re written to be read like a story. > > Peter > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081204/e4d8711e/attachment-0001.html>
Zach Dennis
2008-Dec-04 21:43 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
On Thu, Dec 4, 2008 at 2:14 PM, Peter Jaros <peter.a.jaros at gmail.com> wrote:> On Wed, Dec 3, 2008 at 9:27 AM, Andrew Premdas <apremdas at gmail.com> wrote: >> Oh but cucumber features so want to be idented on the I >> >> Scenario: Anonymous user can not duplicate a un-activated account >> Given I am an anonymous user >> And a registered user Fred exists >> When I signup as Fred >> Then I should see an error > > I have to disagree. I find the jagged margin looks messy. I would > never indent other prose this way, so why would I indent my features > this way? They''re not code, they''re prose. They''re not written to be > parsed, they''re written to be read like a story.+1 to what Peter said, -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com
Mikel Lindsaar
2008-Dec-06 12:25 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
On Thu, Dec 4, 2008 at 1:27 AM, Andrew Premdas <apremdas at gmail.com> wrote:> Oh but cucumber features so want to be idented on the I > > Scenario: Anonymous user can not duplicate a un-activated account > Given I am an anonymous user > And a registered user Fred exists > When I signup as Fred > Then I should see an error > > Really need to view above with a monspaced font - if its not coming out > that way in your mail reader. >The problem with that however is that it is not compliant with Internationalization standards... Not to mention it would then naturally bias someone toward using an enforced I. What if I didn''t want to use an "I", but an "it" say, in terms of an API that is being talked to by another system... -- http://lindsaar.net/ Rails, RSpec and Life blog.... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081206/fd6a671a/attachment-0001.html>
Andrew Premdas
2008-Dec-07 07:30 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
Original post was somewhat flippant :) To be more precise. This style is "aligning on the first letter of the second word" and basically is treating the first word as a label and the rest as content, and using indentation to differentiate (hopefully clearly) Andrew 2008/12/6 Mikel Lindsaar <raasdnil at gmail.com>> On Thu, Dec 4, 2008 at 1:27 AM, Andrew Premdas <apremdas at gmail.com> wrote: > >> Oh but cucumber features so want to be idented on the I >> >> Scenario: Anonymous user can not duplicate a un-activated account >> Given I am an anonymous user >> And a registered user Fred exists >> When I signup as Fred >> Then I should see an error >> >> Really need to view above with a monspaced font - if its not coming out >> that way in your mail reader. >> > > The problem with that however is that it is not compliant with > Internationalization standards... > > Not to mention it would then naturally bias someone toward using an > enforced I. > > What if I didn''t want to use an "I", but an "it" say, in terms of an API > that is being talked to by another system... > > -- > http://lindsaar.net/ > Rails, RSpec and Life blog.... > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081207/0d918a14/attachment.html>
Pat Maddox
2008-Dec-08 20:31 UTC
[rspec-users] Indentation Conventions for Ruby and Cucumber
I think that''s ugly. Better to use syntax highlighting in an editor, imo. Pat "Andrew Premdas" <apremdas at gmail.com> writes:> Original post was somewhat flippant :) > > To be more precise. This style is > > "aligning on the first letter of the second word" > > and basically is treating the first word as a label and the rest as content, and using indentation to differentiate (hopefully clearly) > > Andrew > > 2008/12/6 Mikel Lindsaar <raasdnil at gmail.com> > > On Thu, Dec 4, 2008 at 1:27 AM, Andrew Premdas <apremdas at gmail.com> wrote: > > Oh but cucumber features so want to be idented on the I > > Scenario: Anonymous user can not duplicate a un-activated account > Given I am an anonymous user > And a registered user Fred exists > When I signup as Fred > Then I should see an error > > Really need to view above with a monspaced font - if its not coming out that way in your mail reader. > > The problem with that however is that it is not compliant with Internationalization standards... > > Not to mention it would then naturally bias someone toward using an enforced I. > > What if I didn''t want to use an "I", but an "it" say, in terms of an API that is being talked to by another system... > > -- > http://lindsaar.net/ > Rails, RSpec and Life blog.... > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users