You're talking about something different now though: initially you were mentioning functions that are 1-3 lines in size, but now you're describing functions which do one thing, without talking about the size at all. I was very specifically criticizing tiny functions. There are two big issues with such functions:
* the overhead in LoC of declaring and defining the function is between 30-100% of the function body!
* like I previously said following even simple logic becomes an exercise in jumping around the code. Never mind the whole house, even a simple loop barely fits into a 1-3 lines function.
I had literally said "that do only one thing" in the section that you'd quoted.
I've always been talking about that.
LoC aren't a metric. We're not getting paid per line and we're not playing code golf either. It works, it passes tests and most importantly, it's easy to change.
As for the comment about loops, both the languages I mentioned have powerful map functions. The goal of keeping the functions small is to avoid nesting loops and heavy amounts of indentation.
You said you broke your code in functions of 1-3 lines, I offered an explanation why that may have not been well received in your interview. I understand that you don't agree with that and that's fine with me.
* the overhead in LoC of declaring and defining the function is between 30-100% of the function body!
* like I previously said following even simple logic becomes an exercise in jumping around the code. Never mind the whole house, even a simple loop barely fits into a 1-3 lines function.