To my project page

To my main page

Borys Bradel's WordChanger

This page contains information regarding my WordChanger program. WordChanger reads in a set of java files and changes all of the method and variable names so as to make the files hard to read once they are compiled. This page contains a post mortem and a set of javadoc pages. These pages are missing the User API documentation. The link was added in by the javadoc engine that I used but the item was never created.

Javadoc Documentation for Wordchanger

Main WordChanger package documentation.

Files in this directory

Post Mortem

Purpose:

WordChanger reads in a set of java files and changes all of the method and variable names so as to make the files hard to read once they are compiled.

Journal:

Day 1 (December 30, 2001):
Set up the basic object structure and outline of the main methods. Wrote up a lot of code for the infrastructure and basic data storage and manipulation.

Day 2 (December 31, 2001):
Parsed each line (including the design of a state machine), read in the config file, and pretty much did everything except read in the list of files that I have to modify.

Day 3 (January 1, 2002):
Did the final bit of file I/O, added the feature to save a conversion file and a flag that states whether the file should be reverse-converted (so that I can test that my program is indeed correct).

Day 4 (January 2, 2002):
Added extra code to conserve empty lines. (Version 1.0)

Day 5 (January 7, 2002):

I re-fixed the making of directory bug and some comments. (Version 1.0.1)

Post Mortem:

Interesting to note how making a test suite for each object would have been.

Definitely learn about atomic sets of operations and catch exceptions only where it counts. This code has way too many if statements. The code should throw an exception and go to a point at the end of an atomic operation. Also, doing this would cause a large number of parameters to be passed around, and I don't particularly like the idea of having function calls with 20 parameters that are object handles which I need to pass from one function to another. On the other hand, having all of these as global (to a function) variables is not too good either. So I just have a rather big main mehtod.

Overall, I'm very happy with the code and the way everything went, except for not using the atomic sets of operations. Making the test suite wasn't that important because the code is very straighforward, although it would be nice to perform a test that executes at least every line of code at least once. The work went especially fast considering that only the first day was a full day of work.

I also have to be careful when I cut and paste to make sure that I change everything that I really want to change before proceeding onto the next task.

Lines of Java:

Mistakes:

This web page is maintained by Borys Bradel. Last update:  Jan. 7, 2002
Address: http://www.eecg.utoronto.ca/~bradel/projects/wordchanger/index.html