Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 1.16 KB

STYLE.md

File metadata and controls

17 lines (15 loc) · 1.16 KB

Style Guide

This documents states almost a dozen rules that I worked with when coding for this project.
The rules helped me creating 'cleaner' files, codewise, but were also a reminder for consistency in coding and it's conventions.

Rules:

  1. In Javascript, always name things in camelCase.
  2. In HTML, always name things in kebab-case.
  3. In Pyhton, always name things in snake_case.
  4. A tab has the size of 4 spacebars for every language.
  5. In Javascript normal functions have a newline after the first { and before the last }. Local functions do not necessarily have these, only if the function is too long.
  6. For the repository: use a folder for all the data, a folder for all the scripts and a folder for the images. The .md-files will directly be placed in the repository without subfolder.
  7. In the folder for scripts, make a distinction between different languages.
  8. Use multiline comments on top of every file and one-line comments in the script itself.
  9. Name sources in the script in the multiline comment (direct link).
  10. Create one file per visualization and one that connects them all.
  11. Do everything in English (also all comments and .md-files).