wer340 / trick

0 stars 0 forks source link

summary book ai at 5 note #3

Open wer340 opened 4 months ago

wer340 commented 4 months ago

https://bookpecker.com/ image

  1. Names: Use clear, searchable, and pronounceable names for variables, functions, etc. to make code easier to understand and maintain.

  2. Functions: Keep functions small, focused on one task, with few arguments and no side effects. Use descriptive names and separate commands from queries.

  3. Comments: Avoid relying on comments to clarify unclear code. Instead, strive for clean, understandable code.

  4. Error Handling: Treat error handling separately from regular code. Use exceptions instead of return codes and provide context with exceptions.

  5. Formatting: Maintain consistent code formatting for readability. Teams should agree on a single style.