Skip to content

Instantly share code, notes, and snippets.

View davinceleecode's full-sized avatar
Focusing

Vincent Lee davinceleecode

Focusing
View GitHub Profile
@delbetu
delbetu / function_structure.md
Last active February 11, 2024 17:28
Uncle Bob best practices function structure

Intro

  • function signature should be small- the fewer the arguments the better
  • what types should be passed into those arguments
  • why switch and if cost such harm in the software structure ? -> how to get rid of them ?
  • why assign operator is consider harmful ?
  • Many software problems can be avoided by constraining state changing operators, and side effects.
  • How to structure our functions making error handling clean and maintainable fashion ?

Function arguments