[chef] Re: Re: FC001, attributes as strings vs symbols


Chronological Thread 
  • From: Jeremy Voorhis < >
  • To:
  • Subject: [chef] Re: Re: FC001, attributes as strings vs symbols
  • Date: Tue, 16 Oct 2012 13:21:10 -0700

FC019 catches exactly that. And thanks for pointing out that we're bikeshedding ;) I think I've exhausted my opinions on the matter..

On Tue, Oct 16, 2012 at 1:18 PM, Eric G. Wolfe < " target="_blank"> > wrote:
I think string should be two options. Should interpolated string attributes be encouraged if the situation does not call for it?  I think it is a fuzzy definition as it stands for FC001.  Sorry in advance, for harping over a bikeshed.

* As an interpolated string (node["my_attribute"]).
* As a literal string (node['my_attribute']).

Missing option:

* Don't really care as long as the style is consistent.

Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems
--------------------------------------
Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.942.3970
Email: " target="_blank">

You will be recognized and honored as a community leader.


On 10/16/2012 02:28 PM, Joshua Timberman wrote:
Ohai, Chefs!

We want to hear from you: which way of using node attributes do you prefer? Please take this single question survey:

http://www.surveygizmo.com/s3/1059291/FC001-Use-strings-in-preference-to-symbols-to-access-node-attributes

This is in response to a longer twitter discussion today on the subject. The survey will be left open for awhile, letting as many people as possible answer. We *really* value this feedback.

If you want an explanation of why this rule came about the way it did, and our rationale for preferring strings to symbols, see this issue in the Foodcritic project:

https://github.com/acrmp/foodcritic/issues/1

If you're going to be at the Chef summit next week, I'm happy to discuss this in greater detail, too :-).





Archive powered by MHonArc 2.6.16.

§