Hacker News new | ask | show | jobs
by GFK_of_xmaspast 4172 days ago
I get paid to program c, c++, java, python, and r (not necessarily in that order, with other languages as needed) and there's nothing inherently wrong with a 500 line method if that's what the problem calls for.

It's grounds for getting the stink-eye in code review, but to reject it out of hand is pure ideology.

2 comments

"there's nothing inherently wrong with a 500 line method if that's what the problem calls for"

Yeah, "if", but that's rarely the case :) Care to show me an open-source example of a function 500 lines long where you don't think one could find proper seams to split the code along? Ideally in https://github.com/shurcooL/Conception-go/blob/master/main.g...

I don't make it a habit of reading through open source code unless I'm trying to fix a bug (or, more often, get it to compile).
Better to have 500 lines all in one place, so it's tidy like, than 500 lines spread about everywhere making a mess, that's what I say...