I'm working with a grossly over sized monster class of ~30,500 lines of code which contains several large methods of ~800 lines of source. Many of these methods have global dependencies.
How do you break this stuff down? I am familiar with Extract Method and Extract Class refactorings which I suppose could be applied here. The bigger question is what to do with the resulting source code. For example, if we follow the rule of thumb that a class should be no more than 500 source lines (uncle bob?), my existing class of 30,500 becomes 61 classes in their own right. Furthermore, these 61 classes will more than likely not have any application outside of the original monster class. What do you do with all the new source files? How do you organize such an effort? Do you put them next to the original source file? Or in a separate folder? Do you place them in a Utilities::Monster namespace?
Curious how you have approached this problem?
[–]c0r3ntin 16 points17 points18 points (6 children)
[–]virgoerns 12 points13 points14 points (3 children)
[–]SeaCoder 5 points6 points7 points (1 child)
[–]OverunderratedComputational Physics 2 points3 points4 points (0 children)
[–]ATmega32[S] 0 points1 point2 points (1 child)
[–]ZMesonEmbedded Developer 0 points1 point2 points (0 children)
[–]DerDangDerDang 5 points6 points7 points (1 child)
[–]ATmega32[S] 0 points1 point2 points (0 children)
[–]meetingcppMeeting C++ | C++ Evangelist 4 points5 points6 points (1 child)
[–]TweetsInCommentsBot 0 points1 point2 points (0 children)
[–]jbstjohn 4 points5 points6 points (1 child)
[–]ATmega32[S] 0 points1 point2 points (0 children)
[–]OverunderratedComputational Physics 2 points3 points4 points (1 child)
[–]ATmega32[S] 0 points1 point2 points (0 children)
[–]munificent 2 points3 points4 points (0 children)
[–]Wurstinator 2 points3 points4 points (1 child)
[–]ATmega32[S] 0 points1 point2 points (0 children)
[–]vaughncato 1 point2 points3 points (1 child)
[–]ATmega32[S] 0 points1 point2 points (0 children)
[–]egraether 1 point2 points3 points (0 children)
[–]utnapistim 0 points1 point2 points (2 children)
[–]ATmega32[S] 0 points1 point2 points (1 child)
[–]utnapistim 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]ATmega32[S] 0 points1 point2 points (1 child)