Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.42 KB

CONTRIBUTING.md

File metadata and controls

31 lines (24 loc) · 1.42 KB

Contributing

The following highlight some guidelines for contributing to .NET Hypermedia Toolkit and submitting pull requests.

Guidelines

.NET Hypermedia Toolkit aspires follow ideas set out by Bob Martin in Clean Code. As such, the following are some guidelines to think about as you code:

Code should follow S.O.L.I.D principles

Every file should be easy to read.

  • Use pronounceable, meaningful names that reveal intentions.
  • Code should read like a top-down narrative starting with required modules to make things easy to find.
  • Use three or less method arguments.
  • Stay DRY and keep methods, classes and modules sizes small.

Only add comments that actually add clarification.

  • If you are explaining bad code, fix the code.
  • Aspire to self-documenting variable and method names.

Only do one thing.

  • Methods should call other methods vs. writing larger methods that violate SRP.
  • Every method should be followed by any methods it calls (as the next level of abstraction).

Unit Tests and Specs should be F.I.R.S.T.

  • Fast - run quickly.
  • Independent - not rely on previous tests.
  • Repeatable - work in any environment.
  • Self-validating - examples are written to document what passes.
  • Timely - Follow TDD/BDD principles.