-
Notifications
You must be signed in to change notification settings - Fork 302
Establish recipe style guide #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've got a stub document here that we can use for collaborating. |
I find myself slightly daunted when trying to put my thoughts into a well structured form like in the dropbox paper. So I'll try to make some (possibly incremental) braindumps here and we will se where we get from there. So here we go :) What makes a good cookbook entry?This is highly subjective but for me the key qualities would be: Code samples
Textual description
What is the standard form we expect?In terms of text, I might not be a best judge but I remember that @dtolnay In terms of the code, then one of the guideline to follow is our not on error handling.
|
So I believe there is a style guide that is established. It is here Contributing. I propose adding to it, and breaking it into sections to make it digestible. I also think it is missing what should be in the 1-4 sentence description. The paragraph that describes comments switches narrative to the description, and fails to express what is desired from a contribution. When this paragraph was written, basic must have been in a different state, because today looking at basic for examples is overwhelming. I propose a rewrite of the example guideline, but keep it as the style guide. I suggest removing the duplicated information, and organizing it into sections, with an embedded example. At the end of the breakdown with example, outline the desire to have examples use quality, approved crates. As for details of what makes a quality example, I think @budziq did a great job outlining specifics, and I think they should be included in the Contributing.md file. I think we should remove subjective points, and simply include code standards. I think we should exclude calling out examples except for the embedded example. I would love to hear feedback if inline comments should be removed or included. In surveying the comments that are currently included, I really see @budziq 's point about removing them. I don't see it relevant to include spelling and grammar points, we can assume that contributions should know this. Instead of 'avoid using phrases' I suggest we recommend 'using 3rd person narrative to describe the execution path, including links to the crate's API documentation'. TL;DR |
We need to firm up a consistent style for all of the examples to follow.
The text was updated successfully, but these errors were encountered: