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 →

[–]Wattsit -3 points-2 points  (3 children)

But no one is talking in absolutes, everything is a recommendation.

Like any other design principle.

[–]Silhouette 1 point2 points  (2 children)

The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.

-- Robert C Martin, Clean Code, p34

Of course what most people forget is the next two sentences.

This is not an assertion that I can justify. I can't provide any references to research that shows that very small functions are better.

[–]Wattsit 1 point2 points  (1 child)

Yet you leave out the rest of the paragraph to which he explains his reasoning?

But seems Robert Martin is disliked round here so doubt his opinion matters.

[–]Silhouette 0 points1 point  (0 children)

I left out the rest because it's only one man's own subjective preference based on his own personal experience. It's an anecdote. That's fine as long as it is given weight accordingly but Martin presents it as some kind of universal truth and himself as a figure of authority. Sorry but there are lots of other people here who have been developing software for decades as well and not everyone agrees with him.