Specs: the Short way
When I was writing my FORTH editor (a rite-de-passage for FORTH programmers) I decided against extending the editor so it could hold words longer than the 40-character by 25-line surface of the Commodore 64 screen. It would have been trivial enough to do, and I decided that what I liked most about FORTH, the immediate testability (because each FORTH word gets its data from the stack, which is immediately accessible from the command prompt) of each FORTH word, was enhanced by being able to see all of the FORTH "word" at once. Scrolling or paging was a good feature for those blessed with wonderful memories, and knowing my limitations ("a man has to know his limitations"), I decided against that feature.
I have the same perspective on specifications: each specification should be visible on one screen, without scrolling. From a content perspective, I like specifications to have 3 parts: the Problem/Challenge being address; a description of the Solution (this is the actually specification); and a set of Tests which will determine whether the Solution has been implemented. Notice there is nothing about implementation in the specification (although I will leave technical notes in there, as idea-starters, very subject to change at implementation). Below is a spec I wrote recently. What about large challenges? Think a Tree structure, with nested specs.
***************
Problem: we have to babysit the updates because if it craps out, it is not restoring and letting us know.
Solution: make the update restore everything to where it was, and let us know, if it craps out.
Elements of the solution:
- Collection and notification of warnings and errors, by email, or if that fails, notifying the user to notify support.
- Seamless rollback after errors: think "crash"
- Lots of messaging during the updates, informing and entertaining the user.
- Remove all worrisome messaging to the user
Testing:
- Warnings will be emailed.
- Errors will be emailed; if unable, will ask user to contact support.
- After errors, system will rollback to prior state.
- After a crash, next usage will rollback to prior state.
- The user will see message changes or other visual stuff happening at least every 5 seconds. (This will be the last feature to be implemented, although it is an absolutely essential part of making the automatic update work with users.)
-- we should ship the fun stuff to be shown with the update, to keep it fresh.
Implementation Notes
Control attempts through main.ini, [UPDATER] section, with keys for LastVersionAttempted, LastTimeAttempted (timestamp), CurrentVersion, CurrentVersionInstalled (timestamp), LastInstallReport (timestamp)
