[chef-dev] Re: Re: Re: Re: Dialect support and loading enhancements


Chronological Thread 
  • From: Adam Jacob < >
  • To: Noah Kantrowitz < >
  • Cc: Chef Dev < >
  • Subject: [chef-dev] Re: Re: Re: Re: Dialect support and loading enhancements
  • Date: Thu, 19 Sep 2013 17:16:17 -0700

I don't know; what little I understand about language learning says it only holds for dialects you know. If you struggle to learn English, I don't propose you switch to French as a simpler glide path.

If you know of French, you may well find places where expressing yourself that way makes everything easier. What I'm most not sold on here is that we are better off doing dialects than really tuning the dsl,  and dropping other cognitive barriers.

I know it's not zero sum - we can do both.  But as soon as the recipe dialects ship in chef, it's going to need to feel first class: if it doesn't,  it will never gain traction.

If you come in alone,  starting with YAML for recipe syntax is a mistake - you need your baby language skills to grow with you, and the complexity of the holy trinity is not high in chef.  How much of your simplification do you really think comes from dialects, and how much from cookbook structure simplification?

Adam

On Sep 19, 2013 5:03 PM, "Noah Kantrowitz" < "> > wrote:

On Sep 19, 2013, at 4:43 PM, Noah Kantrowitz < "> > wrote:

>
> On Sep 19, 2013, at 3:54 PM, Adam Jacob < "> > wrote:
>
>> First off, thanks for thinking this through so well, and having the patch to match. Awesome.
>>
>> I have a couple of questions/statements/observations:
>>
>> 1) Do other people actually think the directory structure of a cookbook is the biggest barrier to learning? This confuses the crap out of me - but I'm the one that inflicted the directory structure on you, so perhaps I'm an awful judge.
>
> Not the biggest by far, but every time we can avoid explaining why "default.rb" is a special filename I think that saves a little bit of cognitive overhead and ditto on "just put it in default/" on file/templates.
>
>> 2) It feels like this could be accepted in pieces, depending on how we all feel about it. For example, 3 and 4/5 are to separate features, and how I feel about them is totally not influenced by how I feel about dialects. It makes sense to me that 4/5 should be adopted - we cause more confusion with the single copy pattern than we do delight, and nobody looses out - it's easy enough to implement it if it turns out you need it.
>
> Definitely, the different bits were just implemented sequentially, would be pretty straightforward to break the patch up more if people feel there is need.
>
>> 3) My concern about dialects is really that, in the end, you wind up hitting a wall. In the grand tradition of manipulexity and whipuptude, we know there is a path that can provide both (the ruby dsl), but that we think there are some barriers to it's full whipuptidunal potential (too many directories, etc.) Is it really simpler to learn the syntax from yaml, and all the gotchas that might be implied there, than to learn the basic syntax that you know scales moving forward? I think ansible and salt both provide a delightful experience of immediacy to the consumer, and that experience is a great one to mimic - but I'm not sure I think that path is because you're writing YAML rather than ruby. Is this simply because I know more than one programming language and have no inherent fear of learning another one anymore?
>
> My concern isn't fear of learning, but just reducing barriers to entry. Anyone that has talked to me about cookbooks for more than 15 minutes has heard my diatribe about writing everything as resources/providers etc etc, which are definitely not something that can be (easily) done in anything but Ruby, so 100% on board with "learn Ruby" being a core goal if someone is going to stick around the Chef community for a while. The counter to this is that the amount  you need to learn to get started with Chef if you aren't a Ruby dev is pretty high and I think the dialects system can provide more intermediary stepping stones on a power/complexity slope.

Just to expand on this a bit further, I think we will have to have some care to make sure the dialects "line up". By that I mean that we shouldn't (only) go and implement all of Salt or Puppet as a dialect, we want to make sure that skills and knowledge in one dialect carry over as you move up the curve.

As an example, most cookbooks have pretty simple, declarative attributes files with just a few default values. For these the yaml format works very nicely and cuts down on syntax to learn. When the day comes that you want to add an if/else or a call to value_for_platform to your attributes you do have learn some new syntax as you transcribe to Ruby, but all the core knowledge about attributes, precedence levels, etc all transfers over smoothly. As long as we can find these same kind of mappings, I think the dialects system has value as an intermediary learning tool.

I'm sure that other kinds of dialects will exist, and in fact I think a dialect that can directly consume puppet manifests and just calls the puppet gem internally would be both hilarious and probably useful to people doing migrations, and thats fine as long as thats not how we start people off in the community.

--Noah




Archive powered by MHonArc 2.6.16.

§