Often times programmers focus on the details, losing track of the big picture. The big picture is what is ultimately going to make a program successful of not. In many cases, the real problems come with the structural management of the program itself, and if you can’t manage the program as a whole, then the details will never come together. In this lesson, we’re going to go over how to manage a successful program – a program that promotes intuition, expands in size and complexity easily and autonomously, and, most importantly GETS THE JOB DONE.
Architecture
The most important components of a solid program are consistency and structure. It is deeply important that this structure is organized and easy to read, because it will need to expand. Even the smallest, simplest programs, if written well, are able to expand into large, complex architectures – spanning to never ending lengths. The key to this is building a solid, open base kernel and expanding externally by creating supporting accessory commands. For example:
@ECHO OFF
SET /P function= What would you like to do?
IF %function%==INTERNET (INTERNET.BAT)
IF %function%==TYPE (WORD.BAT)
IF %function%==CLEAN (CLEAN.BAT)
Note that the function that each command line sets out to execute is highly complex, thereby increasing the opportunity for bugging or crashing. Commands like these would regularly take up a great deal of space within a program as well, but the way in which they’re organized allows each one to become it’s own process, accentuating the simplicity of the root program andcompartmentalizing potential bugs. If we were to ever need to add another extension of the menu, it would be as simple as typing IF %function%==NEW (start NEW.BAT) , whereas adding the same process to the root file would take considerably longer -with the worry of the variables in each process interacting with one another.
Accessory Processes
It’s important to realize that each of the accessory processes that we start must have the opportunity to find home. We can do this by restarting the root program from within the accessory itself. A successful program accessory will look something like this:
@ECHO OFF
:JUNK
start firefox.exe “http://www.google.com”
ECHO There you are, Matthew!
ECHO Matthew visited Google today! gt; log.txt
ROOT.BAT
Integrating this individual process with our root program will complicate things in big ways. Now, instead of executing a simple command line like this:
IF %function%==INTERNET (INTERNET.BAT)
we will muddle our program coding with a bulky line like this:
IF %function%==INTERNET ((start firefox.exe “http://www.google.com”) amp; (ECHO There you are, Matthew!) amp; (ECHO Matthew visited Google today! gt; log.txt))
Get the picture? In this way, we can reduce our root program to just a few lines of code, and instead let the accessory do the bulk of the work.
Keeping Important Processes In the Root Program
There are occasions when an important process, must always be on call (ie. EXIT). Make sure to include these processes within the root program, so that they may open according to their priority. For instance, to avoid opening a hundred windows when we start to accessorize, we can add the EXIT command to the last module of the root program. This will guarantee that no more windows open than we can handle. For example:
@ECHO OFF
:MENU
SET /P function= What would you like to do?
IF %function%==INTERNET (INTERNET.BAT)
IF %function%==TYPE (WORD.BAT)
IF %function%==CLEAN (CLEAN.BAT)
:EXIT
EXIT
The EXIT command will execute upon the completion of the menu module, simplifying our configuration even further. A model of the low code conduct will be available at https://www.wavemaker.com/rapid-application-development-model/ site. The information will be available at the site to provide knowledge to the person.
Make sure to outline the roots of your program before getting started, and have a good idea of what it is that you would like your program to do. This will decrease the time that you spend, debugging by tenfold. A good template for a program outline may begin with a note of intent, to always remind yourself ofwhere you need to be (instead of farting around all of the time) as opposed to where you are.
It’s all about simplicity. Managing a powerful and successful program all boils down to a program’s ability to expand and simplify. Executing file accessories in this manner will clear the way for more important processes in the root program, and ultimate keep you happy. Make sure to really practice this material, and it will all come together. And as always, keep experimenting, have fun and happy programming!
Thanks for reading, and don’t forget to continue on to learn more about command-line and batch process programming by referring to The Principles of Batch Process Program Development series.