- Always reuse. Split identical functions, turn magic number/string to named
const - Clean redundant or fallback code
- Update references e.g. sync frontend fetch urls after editing backend
- Preserve existing code comments, don't clutter by adding more
Variable & function naming:
- Generic 1-2 words. Example:
- Do: onSubmit, listVideos //
onprefix is shorter - Don't: handleSubmitButton, listVideosWithTitle
- Short but don't abbreviate terms: Use
eventnote</syntax-rules>