Coding Tips

Coding first, then read a good book about it.

一、写出优雅代码的三大法则

  1. 别嵌入太深
  2. 良好的变量命名
  3. 少写重复代码

二、Naming Things

Don't abbreviate names Don't put types in variable names Add units to variables unless the type tells you Don't put types in your types (eg. Abstract, BaseX) Refactor if you find yourself naming code "Utils"

三、避免陷入 tutorial &

vibe coding hell Vibe coding 与观看 tutorial 学习 Coding 一样,会产生眼睛会了脑子却不会的错觉,没有深入思考!所以,learn coding:
  1. 关闭 tutorial 学习视频
  2. 关闭 vibe-coding
一旦完成了 tutorial,则可以观看 tutorial、开启 vibe-coding查漏补缺!

四、SOLID principles

see [React] Tips

五、Curl Cheatsheet


Date:
Words:
249
Time to read:
1 min