Build a Tool

Over the past few months I’ve become quite a tool builder.

The project I’m currently on involves a lot of really repetative code changes and analysis … basically I’ve been externalizing as much of the text in the product as I can (to message files).  There are a LOT of display files to be analyzed … and this particular task looked like it was going to be very very very boring.

However … rather than trying to analyze each and every display file for text that can be externalized, I wrote a set of programs that would automate the process for me.

The first program read through each display file source member in a source file, parse the DDS, and write a file that contained the source member information; line number; text; length; and other useful bits.  Obviously this program had to be aware of DDS continuation characters.

The next program would read through the file created in the first program and automatically generate messages in a message file that contained the text extracted from the DDS and recorded the generated messages id.

The final program in the set re-processed the source members … commenting out the lines where the hard coded text existed, and adding a duplicate line that replaced the text with a dummy field and the MSGID keyword (with the message id assigned to the text).

So now you’re thinking: Yeah, so?  What’s your point?

Read more »

Technorati Tags: , , , ,