This is not always a sin. Suppose you implement a specification that says that if x is A, do it, otherwise if x is Y. It is better for your code to look like a specification. Artificially cut it into small pieces and place it in difference sources, it is not only ambitious, but also difficult, unsafe, difficult to understand and difficult to maintain.
Programming problems are multidimensional. Programming languages are one-dimensional, at least for now. This is the art of how to closely relate related issues. Do not buy in the dogma that problems should be decomposed according to classes, then the problem can in most cases refer to one class and should be inside this class.
In the last century, this is a great taboo in the field of software development, according to experts who knew how to write the best software products, that is, code changes should be avoided at all costs. If you are going to change some source code that you wrote earlier, the universe can crash into peanuts at any time. Thus, you better design the ideal architecture from the very beginning, and then any change in the requirement can be made by adding a new / clean class without touching the existing code base.
That is, let me be very precise in the wording here, complete stupidity, even then.
Today we have much better tools, and changing the code is not only safe, but even encouraged. The best way to make sure that code changes have become easy due to unforeseen reasons is to keep the code as simple as possible today. Write the code so that you can understand even with a comma.
irreputable
source share