Mar-15-2021, 04:55 PM
(Mar-15-2021, 01:31 AM)Skaperen Wrote: there definitely is "too much". but having all that code duplicated in 15 places makes it "way too much". but when i reduce it, i want each of the 15 places to be real simple like
perform_all_the_profile_checks_and_return_if_needed()
Maybe wrap those variables/functions up into a class? That way you don't need to pass 20 variables, you can just do
the_thing.perform_checks_and_notify_if_needed()
, and the function can just reference whatever it needs via self
.