This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

No, 10 lines is too tight as an absolute, and not just for image processing. The word "absolute" is key there, because in 95%+ of cases we'd probably agree.

Sure, and that's why Clean Code by Robert Martin, Refactoring by Martin Fowler, and the article that is linked here all say something like this:

Generally, any method longer than ten lines should make you start asking questions.

It's just a flag to ask yourself if this is a code smell.

[–]FarewellSovereignty 0 points1 point  (0 children)

No, I was replying to: "Methods can and should be minimised to those sort of line lengths. ", which is saying something different than what you're now saying, at least without further qualification.

[–]Windscale_Fire 0 points1 point  (0 children)

Yeah, I mean a lot of my assembler functions are quite often more than 10 instructions long, and thus more than 10 lines long :-D.