home *** CD-ROM | disk | FTP | other *** search
- Tracking Time Spent Programming
-
- Chuck Gaston
- Poughkeepsie IBM Microcomputer Club
-
- If you would like to know how much
- time you REALLY spend using your
- computer, working on a particular
- project or playing Pac-Man, here is a
- way to do it.
-
- While using an IBM PC to write a
- book, I wanted to know both how much
- time I was devoting to the effort and
- how long it took me per page of
- output. A system disk used only for
- this project contains all the
- components of DOS that I need;
- Personal Editor, and the various
- utility files, including the programs
- shown here. The book sections are
- stored on a separate disk in drive B.
-
- The AUTOEXEC file on the system disk
- sets up everything exactly as I want
- it for a writing session, and
- automatically records the starting
- time on the system disk. If I exit
- Personal Editor when finished
- (instead of just switching off the
- power), ending time also is recorded,
- and there is the option of adding a
- comment about the session.
-
- There are several interesting
- features about this AUTOEXEC file,
- but at this time I will provide only
- brief comments about most of them,
- which may give you some ideas. The
- focus of this article is on the BASIC
- programs for recording session time.
-
- AUTOEXEC.BAT Comments
- ------------ --------
- simdisk 10 Creates 38K RAM-
- disk for fast
- operations
- date Until I can afford
- a battery-operated
- time clock-calendar,
- these are
- necessary
- basica start * Automatically
- records starting
- time
- copy pe.pro c: PE profile must be
- on default drive
- copy *.mac c: Transfer "macros"
- to default drive
- sp 5 SP is an excellent
- print spooler
- c: Make the virtual
- disk the default
- drive
- a:pe b:contents.bb Invoke PE; get
- Contents page of
- book
- a: Upon exit, return
- to A: drive
- default
- basica end * Record ending time
- and comment
-
- * THESE STEPS IN THE AUTOEXEC FILE
- automatically log my times.
-
- The START and END programs I use
- actually are written as "oneliners",
- but below they are spread out and
- commented for ease of understanding.
- It can be useful to preserve
- fully-commented versions of programs
- for review and revision, while saving
- space with compressed versions
- wherever you actually use them.
-
- 10 '========== START ==========
- 20 OPEN "a:times" FOR APPEND AS #1
- 'Accumulate all times
- 30 PRINT #1, "Start: ";DATE$;" ";
- TIME$ 'This does the recording
- 40 CLOSE #1 : SYSTEM
- 'Wrap-up; return to DOS
-
- 10 '=========== END ===========
- 20 OPEN "a:times" FOR APPEND AS #1
- 'Keep adding to "times"
- 30 PRINT #1, "End: ";DATE$;" ";
- TIME$; 'Don't end this line yet
- 32 INPUT "Comment about session: ",
- X$ 'Get optional comment
- 34 PRINT #1, " ";X$ : PRINT #1,
- 'Add comment & skip line
- 40 CLOSE #1 : SYSTEM
- 'Wrap-up; return to DOS
-
- Here is an example of the TIMES file:
-
- Start: 01-07-1984 08:59:39
- End: 01-07-1984 08:59:45
- Begin demonstration series.
-
- Start: 01-07-1984 09:00:14
- End: 01-07-1984 09:00:21
- Second test.
-
- Start: 01-07-1984 09:00:34
- Start: 01-07-1984 09:00:40
- Final test!
-
- If you eliminate lines 32 and 34 and
- the semicolon at the end of line 30,
- the operation of END becomes as
- relatively unobtrusive as that of
- START. Thus, if you are satisfied
- with uncommented time-recording, you
- can ignore the slight delays and
- extra disk noises.
-
- Note that if you are working with a
- BASIC application, START and END can
- be renumbered to fit within the main
- program, or you can CHAIN from one
- BASIC program to the next. The
- AUTOEXEC file can call START, which
- can be modified to CHAIN to the main
- program instead of returning to
- SYSTEM. Then that main program can be
- modified to CHAIN to END.
-
- There you have it. Do you really want
- to know how much time you will spend
- developing that program to select the
- winners at Monticello or working on
- the newsletter? How about adding
- these programs to the game disk to
- find out how much time the kids spend
- on Pac-Man when they should be doing
- their homework?