Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial93 Change History
There are countless ways a change history can be managed in a script. The framework proposed here comes from work in AppleScript, which are almost invariable single-file scripts like Scripter’s. In the template example is the following in the Script Information section:
History:
Change 21_10_23_01_00_00: Started script
21_10_23_01_01_00: Added NoteOn and NoteOff capturing
The change history acts like a diary of the script. There are three things being captured in the change history:
The date of the change.
The complexity of the change.
What actually was changed.
The date is in a straightforward YY_MM_DD
format. Using
a date to begin the entry in the change history will make finding back
up versions easier when managing scripts with backup software like Time
Machine or git
.
The complexity of the change is captured with version numbers. There are three levels to the version numbers:
Major changes are for significant rewrites of the script: multiple functions are affected, or there is an almost complete rewrite of the script, where the functionality undergoes an obvious change.
Minor changes are generally for bug fixes, or small enhancements; functionality changed in smaller, highly specific scopes.
Maintenance is updating comments, cleaning up syntax, fixing typos.
The exact specific differences between major, minor, and maintenance changes can get blurry, but what’s most important is to record what was changed when.