Is there such a thing as having too many private functions/methods?
- by shovonr
I understand the importance of well documented code. But I also understand the importance of self-documenting code. The easier it is to visually read a particular function, the faster we can move on during software maintenance.
With that said, I like to separate big functions into other smaller ones. But I do so to a point where a class can have upwards of five of them just to serve one public method. Now multiply five private methods by five public ones, and you get around twenty-five hidden methods that are probably going to be called only once by those public ones.
Sure, it's now easier to read those public methods, but I can't help but think that having too many functions is bad practice.