re: What programming best practice do you disagree with? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I question anything too religious around small files and tiny methods. Sometimes the better choice is to toss another method in the class so it’s e...
 

I would add that the weird stigma against having one really long function doesn't make much sense to me. It's totally fine to have a really long function if nothing else uses what is inside of that function (say something that gets run once on launch to setup all of your Analytics trackers).

 

Great example! Code that abstracts away "TrackerInitializers" and then lets an array of trackers attach themselves and initialize and ... suddenly we've got code that's theoretically pure for no good reason and requires a good bit of reading to figure out what it actually does. When it's time for something to change, it's a copy and paste 2 years down the road, and the new paste may not even fit into the interfaces we've built...

code of conduct - report abuse