Monday, September 1, 2014

Simple cut and paste modular programming

I frequently cut and paste code snippets and modules into new programs I'm writing.  I keep an "excluded variables" list with the code library that these snippets and modules come from.  When new code is added to the library it can not contain variable names or any line numbers that have been used in other library code. (Alternatively, instead of an "excluded variables list," you can search the code library for any variable name or line number that you are wanting to use.) Gluing together modules while writing a new program consists mostly of adding lines of code that equate the (local) variables between modules.

No comments:

Post a Comment