I'm maintaining a Java class that's 40K lines long.. problem?

后端 未结 12 1627
北海茫月
北海茫月 2021-02-04 01:02

This may be a subjective question leading to deletion but I would really like some feedback.

Recently, I moved to another very large enterprise project where I work as a

12条回答
  •  忘了有多久
    2021-02-04 01:44

    I know some section of code needs breaking up when I have problems trying figure out what it does and how. Or if its larger than a screen-shot.

    Typically I refactor it if it makes me feel bad. I don't like feeling bad :-(

    I suspect the code got out of control because the management just wanted bugfixes/features done and nothing else, and bit by bit it slowly got worse.

    Refactoring the code to make the programmers job easier was probably not very high on their list of priorities. The management always want their bugfixes/features yesterday :-(

    Also a working program is obviously better than one thats broke, and breaking up code that large without unit-tests would end in disaster. So all the tests would have to be made before touching the code. Yet another reason management wouldn't allow it.

提交回复
热议问题