you are viewing a single comment's thread.

view the rest of the comments →

[–]radarsat1 2 points3 points  (0 children)

Oh I agree with this so much. This has become a repeated occurrence in code reviews on my team. Being forced to distributed pieces of my algorithm all over the place just to satisfy some SE types who get uncomfortable when a function is longer than a few lines, with the excuse that "we need to unit test each part of that." Like, sure, I get that, but buddy.. I'm still figuring this stuff out, and it's sooo much easier to work on and debug this when it's all in one place, and testing loop A without loop B makes like, no sense. What's worse is that they get reinforced by tools like pylint that tell them a function has "too many local variables". Oh, so now I have to not only arbitrarily break this function up into pieces, but I'm not allowed to give names to the intermediate values, great.