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


Chronological Thread 
  • From: "Eric G. Wolfe" < >
  • To:
  • Subject: [chef] Re: FC001, attributes as strings vs symbols
  • Date: Tue, 16 Oct 2012 16:18:47 -0400

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: 


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.

§