Prog Assistants
Volume Number: | | 7
|
Issue Number: | | 4
|
Column Tag: | | Tools of the Trade
|
Programmer's Assistants
By Dave Kelly, MacTutor Editorial Board
Programmers Assistants Provides Six Developer Utilities
The next time youre planning a development project dont forget to include debugging tools. A debugger doesnt need to be complicated to get the job done either. Most of the time, you just want to see what your program is doing while it is running. This is a lot harder once you compile the application. This requires you to have a knowledge of your favorite debuggers capabilities. It helps to understand how the Macintosh works too.
Aladdin Systems, Inc., the StuffIt company provides a set of six desk accessory utilities to help you in your development effort. The Programmers Assistants isnt a substitute for a good debugger, but can provide some features that are worth mentioning here. These utilities were written at the time Raymond Lau was developing StuffIt. Ron Kashden wrote the set of routines as an aid to help in-house development. Raymond Lau needed tools to help see what was going on with his program. Eventually, someone suggested that these tools be made available to everyone.
The package has a notebook of documentation and an 800K disk. There are six chapters in the documentation, one for each utility. Each section has its own separate table of contents. The documentation doesnt have master table of contents or an index. Every chapter has been design to teach the theory and practice upon which each utility is based. Some people use this package strictly to learn the theory presented in the documentation. To find something you must find the chapters individual table of contents and look it up from there. Basic On-Line help information is available for each Assistants on-screen. Each window provides a button that accesses the help information.
As mentioned above, there are six DA utilities. Depending on the stage of development that you are in, some of them will be more valuable to you than others. Each utility fills a niche not covered by another. You can decide for yourself which utility you want to use. The Programmers Assistants names sound like they come from a mystery movie: The Professor, The Bystander, The Detective, The Witness, Continuity and Bean Counter. A description of each follows.
The Professor Numerical Analyzer performs 23 different integer functions. To use the Professor is straight forward. First set the base to binary, decimal, hex, or octal using the pop-up menus. Next the you select the function from a list dialog by clicking the function button. You may select an 8, 16, or 32 bit value for the value fields. Finally, you click on the Do It button to calculate. The 2nd value field acts as a mask for several functions.
The documentation contains a lot of information on numbers. The documentation explains conversion theory for base 2 (binary), decimal, hex, and octal. Its more than just a base conversion calculator. Since the Professors 23 functions are available, you can predict the outcome of your code at the time you write it. This will help you get it right the first time.
The functions supported are: Add, And, Arith.Shr, ClearBit, Divide, Hi, HiWord, Lo, LoWord, Logshr, Mod, Multiply, Not, Or, RotateR, RotateL, SetBit, Shl, Subtract, Swap, SwapWord, TestBit, and Xor. You will find that the Professor will be a handy DA to have around.
The Bystander Event Watcher allows you to observe what the Mac is doing. The display shows the status of the mouse, memory, and events as they occur. You can see from the sample Bystander window that the Bystander caught my F-Key press when I dumped the Bystander window to a PICT file. It shows that I pressed the 5 key with cmd and shift modifier keys pressed. The mouse location is specified for both global and local coordinates.
Next, the window displays memory information for the current heap block used. The block of memory can be the Application, or the System, or DA Handler if you are running under Multifinder. You also can specify which events you want to have displayed. You can ignore keydown events if you want to, and the Bystander will display whatever the last specified event was.
Bystander is not without problems though. Although it appears to work as documented, there are bombs that occur occasionally when switching from one application to another in MultiFinder.
The Detective is an interactive debugging tool that displays variables related to your program in their proper types. The documentation gives a complete list of over 150 system global variables. These variables can be selected from a list window and actively displayed in a second window. As the variables change the display is updated. The Detective provides a great way to see whats happening while your program is running.
The Witness is similar to the Bystander, except that this desk accessory records events in the background and logs them in a generic text file named Event Log. You can review the log later to figure out exactly what happened if any bugs occur in your program. The Witness allows you to select exactly which events you want recorded. The header of the Event Log data file displays information about the Macintosh you are using. Version 1.0 (reviewed here) does not know about the Macintosh IIci, but is still a very useful tool.
Continuity Document Historian is a DA that helps you keep track of revisions made in multiple documents. The Continuity DA updates the version resource for each file you select in your project. Until the latest versions of ResEdit were release it was still somewhat awkward to update the revision number. Continuity helps you do that. Of course with the latest ResEdit you can use the ResEdit template to update the version resource and save it to several files. This DA was of more use a year or so ago, but can still be used to keep the current version information up to date.
Bean Counter Optimizer is primarily useful to assembly language programmers. This DA allows you to check the code you have written and examine the number of clock cycles. You may then optimize your code by adjusting lines of code for the best performance. Its a time consuming process to optimize code and the Bean Counter can really help.
There are many complaints about the increasing size of applications today now that memory is easier to afford. If you are programming assembly language, you should pay attention to the size of your application. Bean Counter was used extensively in streamlining StuffIt Deluxe. It should be noted that Bean Counter is the number one reason that developers buy Programmers Assistants.
The documentation for Bean Counter includes a summary of the syntax allowed. Bean Counter was designed for use with syntax from a variety of assemblers.
Programmers Assistants retails for $99.95, though the street price (via mail order) is about $65. Although the entire set of DAs may not be useful to everyone, these utilities can truly help you in debugging your development project.
Aladdin Systems, Inc.
Deer Park Center Suite 23A-171
Aptos, CA. 95003
408-685-9175
FAX: 408-662-8418
AppleLink: ALADDIN
America OnLine: ALADDIN
Connect: ALADDIN
GEnie: ALADDINSYS
CompuServe: 75016,325
Internet: aladdin@well.sfca.us
Retail Price: $99.95 (street price $65)
New Stuff
Although it seems Microsoft is not supporting QuickBASIC there have been some maintenance releases that youll want to know about. The latest version of version 1.0 supports all Macs and systems through 6.0.7. That doesnt mean that the problems are completely fixed though. At MacWorld Expo in January, Microsoft hinted that QuickBASIC would not remain ignored for long, but there was no more information on what that means.
ZBasic is still alive and well too. Again there are hints of a new version 6.0 of ZBasic later this year. Well just wait and see. There was no sign of True Basic at MacWorld and the latest version I have will not run anymore. Thats either because it doesnt support the latest system (6.0.7) or because it doesnt support the IIci. At any rate it appears that there are only two BASIC products left.