Instrumentino/Smart Terminal Challenge
Contents
What[edit]
I am an outsider to Instrumentino but the author of the Python Smart Terminal. I suspect that neither program has been used by much of a community outside the sphere of the authors. Why do I think this? Because neither is documented either internally or externally for an outsider to come along and use it. Both are just big tangles of code with no clear doorway in. I am going to try to fix this hopefully with the author of Instrumentino. I am going to try to do this for both projects ( except for the internals of Instrumentino which will be up to its author )
The process is going to revolve around an attempt to adapt SmartTerminal to Controlino and to adapt Instrumentino for my GreenHouse Monitor Program. That work and its results will be documented here.
One way to navigate all these pages is to look at the category SmartTerminal www.opencircuits.com/Category:SmartTerminal Category SmartTerminal
Key pages might include:
So what would be the ideal ( which I will not achieve in a finite amount of time ).
External Docs[edit]
This is perhaps an ideal, we do not expect to actually achieve the ideal.
Program Architecture[edit]
A 10K foot ( or meter ) view of the program this supplements the internal documentmentation and helps those unfamiliar with the code dig in. It might include:
- Design patterns used.
- Threading decisions and components
- Major components
- For current documentation of the SmartTerminal see: tbc
- For current documentation of Instrumentino see: tbc
Guide to Modifications[edit]
This documents how to modify the program to adapt it to a specific peripheral. This may or may not be blended into the Program Architecture documentation or the Example of Modification documentation.
- For current documentation of the SmartTerminal see: tbc
- For current documentation of Instrumentino see: tbc
Example of Modification for a Specific Peripheral Microcontroller[edit]
An example program is great, also great is a document that takes you through the process of writing such a program. I am going to try this to adapt Instrumentino for my Green House Monitor and to adapt the Smart Terminal to run with Controlino. ( see: Controlino Notes ) SmartTerminal for Controlino , Instrumentino for GreenHouse Monitor
Internal Docs[edit]
Coding Standards[edit]
So the most important is to have some written standards, the second is that they be good standards.
What are some good things
- Good names, consistent names
- Mangling of names to show how private/public the are.
- Docstrings
- Reasonable use of white space
- Comment with respect to: intent, directions for modification if appropriate.
See for each program:
Docstrings[edit]
Programs should have docstrings to guide its use. I have seen little indications that most open source programs actually have this. Lets see what we can do. The A documentations should have a guide to how the respective programs try to implement this.
DocTests seem a bridge too far, but unit tests should be considered.
Unit Tests[edit]
Unit test are great. They are a pain to implement, is it worth it to make the program actually run. When it does not run, it does seem worthwhile. The unit tests also serve to document the api which is very valuable. Again the A.. document should state the degree to which they are part of the plan.
Comparison of the Two Programs[edit]
This is just the beginning.
- The SmartTerminal is an terminal program that has evolved into being easily programmable and interfaced into micro controller programs. It is meant to be tweaked via either a parameter file or Python programming.
- Instrumentino is a data collection program that is first targeted at talking to Controlino an arduino program that is configurable ( through the Instrumentino Gui ) to talk to a variety of data collection devices. It can be reprogrammed to talk directly to peripheral devices, it is not yet clear how.
What | Terminal | Instrumentino |
Terminal show send recieve | Yes | ? |
Program logging | Yes using Python Logging | ? |
Simple parameter/configuration settings. | Yes via a single python file. | |
Data Logging to DataBase | Yes | No |
Data Logging to CSV | Yes | Yes |
Graphing of Data | Yes, but in a companion program. | Yes |
Configurable via GUI | No, requires parameters or Python | Yes
|