Skip to content

niceandserious/nice-guides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nice Guides

These guides are for keeping track of how we write code. We're aiming for both consistency and best practice, so that we can create clean and sustainable code. With everyone working towards the same style and structure, it makes working together that little bit easier! 👯

General principles

  • Consistency of coding style is more important than adhering to any coding standard. If you’re working with an existing project or framework, use its existing style.
  • Comment everything non-trivial (and even trivial things, if you like).
    • Be clear, and as verbose as you like.
    • Over-commenting is better than under-commenting.
    • Write for your future self as much as anyone else.
  • Go for readability over compression.
    • Plenty of whitespace!
    • If a longer variable name makes the code more readable, do it!
    • Let the build tools do the compression.

Editor preferences

Install the EditorConfig plugin for your text editor and try to use an .editorconfig file when you're starting a new project.

To avoid inconsistencies and confusing diffs, try to stick to the following:

  • Use soft tabs with 2 spaces.
  • Trim trailing white space on save.
  • Set encoding to UTF-8.
  • Add new line at the end of files.

The guides

  1. HTML
  2. CSS
  3. JavaScript [WIP]
  4. Ruby [WIP]
  5. PHP
  6. Git [WIP]
  7. Trello [WIP]

Credits

These guides are influenced by lots of great work that's already out there, including:

About

For keeping track of how we write clean, sustainable code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published