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:
- In Javascript, always name things in camelCase.
- In HTML, always name things in kebab-case.
- In Pyhton, always name things in snake_case.
- A tab has the size of 4 spacebars for every language.
- 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.
- 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.
- In the folder for scripts, make a distinction between different languages.
- Use multiline comments on top of every file and one-line comments in the script itself.
- Name sources in the script in the multiline comment (direct link).
- Create one file per visualization and one that connects them all.
- Do everything in English (also all comments and .md-files).