mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 09:18:59 +00:00
![Gabriel Arazas](/assets/img/avatar_default.png)
Apparently, the convention (at least starting from 2018) is to make the keywords and block names to be in lowercase as stated from one of the following discussions at https://orgmode.org/list/87tuuw3n15.fsf@nicolasgoaziou.fr/. The files was updated with a one liner of shell. However, this is Emacs and org-mode does have an API to let you do stuff in your config and interact with the documents internally so it is not an elegant solution in any way.
1022 B
1022 B
Writing clean code
Code should be readable, simple, and concise. There are a few things to consider when writing code.
- When naming stuff like variables and functions, be clear and concise.
Furthermore, if applicable, imply its type.
For example, when the variable holds an array, you can append
_list
to its name (e.g.,grade_list
vsgrades
). If it's a boolean, you can prepend the name withis_
orhas_
. - Use whitespace properly and consistently. For example, in Python, spaces are preferred to tabs and a "tab" is made up of 4 spaces following PEP 8 standard which is a style guide for Python.
This could be inapplicable if you're worrying about how to create the code that works so be sure to apply it when refactoring.