|
|
|
|
|
by dr_zoidberg
2227 days ago
|
|
I understand your experience, and based on mine I can tell you this: I absolutely hated the time I had an intern to whom I taught python, showed him the guide style and he insisted in writing things like this: def some_function(arg1, arg2, arg3):
temp=arg1*arg2;temp=numpy.some_function(temp, arg3);return temp
Those innecessary oneliners where a mess. And the arguments names? Not shortening for the example, they guy did that. In the end whatever work he did, we had to dedicate one of our programmers who had an idea of what those functions where supposed to do to "translate them back".I was almost useless work. Worse yet, we couldn't fire him because we were mandated by higher ups to keep him in the team for the duration of the internship he had to do to comply with some scholarship requirement with an institution we're related. Again, the style guide we've written works for our team and the #1 rule is: code must be clear. There are a few other rules (variables and functions are snake_case, classes are CamelCase and so on), but those are derived from #1 and habits/experience the team has developed over years of work. I also understand they situation you say: putting style/beauty/the linters as an objective and forgetting about what the code has to do in the first place. Can't really help you there, I am aware (and happy) that my team and I are in sync. |
|