Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 11, NO. 3 / MARCH 1985 / PAGE 127

Who needs a robot? Doing your household chores with a computer. (evaluation) George Blank.

Many homes today are already equipped with peripherals that will walk the dog, wash and dry the dishes, clean the bedrooms and bathrooms, take out the trash, and wash the car. If you have these devices, all you need to do is interface them to your computer system. If you have a computer and a printer, the interface can be done entirely in software, with no wiring, soldering, or additional parts required.

My own home is equipped with two such computer peripherals: my sons Bill and Rob. I call them computer peripherals because, without the computer, they do not function properly. They forget their chores, argue over whose turn it is to do each job, and are hard to supervise. However, with a version of the computer program presented here, they always know what they are supposed to do and whose turn it is to do each chore. Supervising their chores used to be a hopeless task; now it only takes five minutes a month with the computer and an occasional glance at the chart prepared by this program.

The program prepares a chart, determining which tasks are to be done that day and whose turn it is to do them. The chart is posted in our kitchen. As each task is done, the boys draw a line through their initials on the chart under that task. Every time I pass the chart, I can see exactly which chores have been done and which need to be done. Most important, from my viewpoint, I don't have to listen to stereo renditions of "It's his turn; I did it yesterday!"

For the published version of the program, I have arbitrarily assumed five children: Alice, Brian, Chuck, Diane, and Edith. Five should meet the needs of most households, and it is easy to add more by changing only the first two procedures, GetKey and PrintInitials. If you have fewer children, all you need to change is the line that says: if Child > 5 then Child: = 1 in the PrintInitials procedure. Change the five to any appropriate smaller number. Leave the extra lines in the program in case you ever expand your supply of household chore peripherals. You will also want to change the initials in the same routine to the appropriate initials for your own children. (If you do not want to change the program, you can go down to your county courthouse and have the children's names changed to Alice, Brian, Chuck, etc.)

The program provides for four types of chores:

* Daily chores that are rotated among all the children.

* Daily chores that are the responsibility of one child.

* Chores for selected days that are rotated.

* Chores for selected days that are not rotated.

If a chore is to be rotated, you need to set the variable Rotate to TRUE and initialize the variable Child to the number of the child who has the job first this month. If the chore is not to be rotated, you need to set Rotate to FALSE and initialize the variable Child to the number of the child who is to do that chore.

The string Days tells the program on which day of the week each task must be done. The seven characters in the string correspond to the seven days of the week, starting with Sunday. If the program finds a period in any position in that string, it will skip that chore on the corresponding day. I use the first letter of the remaining days of the week to identify days when the chore needs to be done, but any character other than a period will do.

The program uses a separate procedure for each chore. I have provided enough examples so that it should be easy to add new chores.

The program is written entirely in Standard Pascal and will run in most versions of Pascal on most computers. I used New Classics Pascal 80 on a Radio Shack TRS-80 Model 4. The following changes may have to be made for other versions of Pascal:

* If your compiler does not allow curly braces, you can use (* and *) or leave out the comments.

* Some compilers will not allow lowercase or mixed case in variable names. Use all uppercase instead.

* Some compilers do not allow variable or procedure names longer than six or eight characters.

* Pascal 80 does not crash if a character variable is read into a numeric variable. It simply asks Redo? and waits for another input. If you have a lesser version of Pascal, you will want to write a routine to process the month as characters in the TopLine procedure.

* The program was prepared for a printer having at least 110 print columns. If you have an 80-column printer, change PrintInitials to print only the first character of the child's name and one space, eliminate the first space in the write statement in NotToday and change the Count:3 near the end of TopLine to Count:2.

* Pascal 80 uses the built in file LP to print the current line to the Line Printer. Other versions of Pascal use different conventions for writing to a printer.

I originally had many other features in the program including automatic calculation of the day of the week and keeping track of whose turn it was for each chore from month to month in a disk file. Before you write in with such "improvements," let me say that I found the bells and whistles to be inappropriate; the present version of the program is easy to modify when vacations, sickness, and other problems change the schedule, which happens often. The most frequent modification is to change the starting date, which can be done by changing the counting loops in the procedures TopLine and PrintChores, and answering the question "What is the first day of the month?" with the day of the week for the first day of the printout.