Code Concepts
The following details are about the Mentality / line of thoughts / way of thoughts / way of thinking / way of working that I follow, that aims / tries to balance / combine the easiest and efficient and reliable way of working.
So when creating a common /shared functions, components, features that combine both and more, even non-common for everyday code:
Aim for the following
-
Simplicity: Aim to make it so when it is used: you write the least code possible in the least amount of places (lines or files possible), so it is so SIMPLE TO USE
-
Clarity: Aim so any:
- any function or vairable or component... name is understandable by just the name and the context it is used in, its hard so thats why we will also combine TSDoc comments to them too!
so it is so CLEAR TO UNDERSTAND. Sometimes this takes effort and time and depends on the piece of code you writing, so you ask yourself is it worth it, the answer is usually yes.
-
Flexibility: Aim so any piece of code is easier to change any later time, so it is so FLEXIBLE TO CHANGE. Sometimes this takes effor and time and depends on the piece of code you writing, so you ask yourself is it worth it, the answer is usually yes.