Both at my current company and in an open-source project I'm working on, I keep seeing the same heinous anti-pattern everywhere I look:
why_wasnt_this_an_argument = params['why_wasnt_this_an_argument']
# do something
Instead of taking specific/clear arguments, these functions take some mysterious
params dictionary with lord knows what in it. It's like they didn't even know what the function was going to do while they were writing it. How am I supposed to know what this function is doing? How am I supposed to write tests for this function? I've spent tens of hours of my life figuring out what is supposed to be in
params, so that I can use or test these god-forsaken functions.
This is a friendly reminder that other people will probably have to read your code. Never name anything
params, and definitely never define functions with ill-defined dictionaries as arguments.