WIP Coding for humans
This commit is contained in:
parent
76f3537a48
commit
d468f22f6f
1 changed files with 37 additions and 0 deletions
37
docs/programming/general/coding-for-humans.md
Normal file
37
docs/programming/general/coding-for-humans.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Coding for humans
|
||||
|
||||
- Code is instructions for machines.
|
||||
|
||||
BUT
|
||||
|
||||
- Code is read by humans.
|
||||
- Humans need to be able to understand code easily.
|
||||
- Not all humans think about code the same way
|
||||
|
||||
SO
|
||||
|
||||
- Write maintainable code
|
||||
- If design is about usability, coding is about maintainability
|
||||
- Write boring code that's easily modified and extended
|
||||
- Consistent patterns
|
||||
- Avoid obscure and fancy syntax
|
||||
- Aim for maximum readability
|
||||
- Use dev tools to make the job easier and less error-prone
|
||||
- Syntax highlighting
|
||||
- Code completion
|
||||
- Linters and formatters
|
||||
- Static analysis
|
||||
- Statically typed languages or type hinting
|
||||
- Write documentation to guide devs
|
||||
- Explain how programs work so devs don't have to reverse-engineer your
|
||||
team's work.
|
||||
- Explain the reasoning behind obscure solutions.
|
||||
- Document pitfalls you've fallen into so other devs don't do the same.
|
||||
- Write code that accommodates different kinds of devs. Devs can be:
|
||||
- Inexperienced:
|
||||
- New to the codebase
|
||||
- Opinionated
|
||||
- Impatient
|
||||
- Bored
|
||||
- Tired
|
||||
- Pressured
|
||||
Loading…
Add table
Add a link
Reference in a new issue