Dazed and Confused: I Did the Same Work Twice
Contents
Today I was completely out of it — I actually did yesterday’s work all over again.
It’s a general-management feature. Yesterday I wrote a CHeroCenter, basically finished. Today I wrote another one called CHeroTender. Apart from the class name, everything is identical: the functions, the member variables, even the function parameters. When I was writing the code to dismiss a general I needed to return an error code, and I was going to have the designers add it to string.xml — then it turned out string.xml already had it. Surprised, I searched the code, and there it was, that exact same class. Depressing.
Good thing the class isn’t big. A hundred-odd lines of code.