Skip to content
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

coding standard gold #3

Open
Tracked by #99
wilzbach opened this issue Aug 28, 2014 · 8 comments
Open
Tracked by #99

coding standard gold #3

wilzbach opened this issue Aug 28, 2014 · 8 comments
Assignees
Milestone

Comments

@wilzbach
Copy link
Member

npm run browser-build
npm test
inline doc -> README.md
tests
compatibility
jsdoc3
snippets

@wilzbach wilzbach added this to the biojs 2.0 milestone Aug 28, 2014
@wilzbach wilzbach assigned wilzbach and daviddao and unassigned wilzbach and daviddao Aug 28, 2014
@wilzbach
Copy link
Member Author

wilzbach commented Sep 7, 2014

@mhelvens
Copy link

mhelvens commented Sep 8, 2014

I'm now looking at the current 'gold standard' list. I'm surprised that it prescribes so many specific tools. For example, could the gold ribbon not be earned by a project that uses:

  • Grunt rather than Gulp, or
  • Jasmine rather than Mocha, or
  • Drone rather than Travis, or
  • JsLint rather than JsHint, or
  • HTML or ThreeJS rather than D3?

These specific choices do not seem, to me, marks of quality, but of personal preference or convenience. What do I think should be part of the gold standard? I'll name a few things that come to mind:

  • user documentation,
  • API documentation (extra points if it is generated from the code itself),
  • usage examples,
  • automated unit tests with high code coverage,
  • automated integration tests,
  • tool-enforced code-consistency (e.g. jslint/hint/etc.),
  • publicly visible continuous integration,
  • an npm presence.

These seem, to me, objective standards of quality. Note that my only concession to a specific tool is npm. That's just because having every BioJS component in the same system helps interoperability, and does not preclude the package from also being listed in, e.g., Bower.

@timruffles
Copy link

👍

@wilzbach
Copy link
Member Author

wilzbach commented Sep 9, 2014

You are absolutely right. The idea of the "gold(en) standard" was to state important aspects like "having a good documentation" and not use jsdoc.
However some people had the concern that new comers would be very unfamiliar and that we should give recommendation for each of these points.

Thank you very much @mhelvens, @jmvillaveces, @ljgarcia and @timruffles for stating this problem.

The current version isn't perfect - so feel free to comment here with your feedback or edit it directly ;-)

@mhelvens
Copy link

mhelvens commented Sep 9, 2014

That looks like a good starting point.

I was also meaning to ask you about the BioJS (Node) coding style guide. Same story as the specific tools, really: do we want to encourage specific coding styles, e.g., tabs versus spacing? I would say no. Such style-guides are only practical within large projects with many people working on the same code.

A consistent style within a project could be seen as a plus, though. I guess this falls under the heading of code consistency (even though it is broader than jslint/hint). I'm sure there are open-source tools that can reformat code based on a manual configuration, i.e., prettifiers, though I can't name any off the top of my head. (I use the WebStorm IDE for this myself, but it's paid software with a much broader scope.)

@wilzbach
Copy link
Member Author

wilzbach commented Sep 9, 2014

the BioJS (Node) coding style guide

I agree - "tool-enforced code consistency" is the right term. My opinion is that if people don't know which coding style they should use (>60%), we recommend them to use the same. So the style guide acts as convenience like the biojs-events package.

I'm sure there are open-source tools that can reformat code based on a manual configuration

jsbeautifier looks very promising. Here we could (same as above) also provide a config for people who don't have a special taste.

@mhelvens
Copy link

mhelvens commented Sep 9, 2014

Agreed.

It seems that these fixes all come down to the clear separation of:

  1. requirements and recommendations, and
  2. tips about specific tools and techniques for developers who do not yet have a preference.

I believe this separation should be maintained in all our documentation.

@wilzbach
Copy link
Member Author

Status update: I restructured this into "conventions" where we show violations (e. g. documentation or tests) with the help of io-ratings and gold standards like continuous integration which are only a recommendation.

See http://edu.biojs.net/details/conventions/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants