• 22 Posts
  • 456 Comments
Joined 3 years ago
cake
Cake day: June 10th, 2023

help-circle
  • I agree with many of these, but not the “if statement” one.

    Sure, if it’s just one place where an object’s behavior differs slightly it makes sense but as soon as the logic has to be applied in a few different methods what you’ve done is spread out the implementation across the codebase.

    Then you get methods like def CheckUserRole(is_test_mode, is_oauth, is_local, impersonate_mode, override_admin = false)

    Much of the tech debt we deal with comes from ignorance or failure to understand the lessons of the past 50 years of software engineering. Classes and Types were invented to keep code manageable and maintainable. When it’s just one dev working locally, fine - store everything in one big dict, you’re only hurting yourself. But complex software projects need to be maintained by teams. All that “boilerplate” you’re complaining about is part of the communication that makes it easier for others to understand what you’ve written.