billroper: (Default)
billroper ([personal profile] billroper) wrote2019-03-26 10:23 pm

Refactoring

So I'm working on a project at work where I'm porting some more C++ code to Java. I looked at the original code and said, "Well, let's see if we can streamline that." And I wrote a set of classes to support the behaviors that I wanted and which would generate the XML that I needed that C++ had been handling by writing exquisitely hand-crafted XML.

And I looked at the classes and said, "That could be simpler." And so I refactored the class structure I had written.

And I looked at the classes and said, "That could really be simpler." And I refactored the class structure into a set of Java enums.

It's a lot simpler now. :)

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org