So in [the last post]{@/Computers/basics_of_computer_programming_introduction.md} I tried to guide through the type of programs that are normally visible to the user.

This may be unsurprising, but there are many more types of programs that are less known to most people. The most popular of the more obscure programs are

  • The Batch program
  • The Daemon program

The batch program

The batch program is probably the oldest type of program in existence and despite quite considerable advances in computers has not changed much in is general appearance. A batch program normally runs on something like a supercomputer. Batch jobs usually do some heavy mathematical or data intensive task that requires fairly vast amount of resources over an extended period of time. The files that are read in can be terrabytes in size and the program will use the entire available processing power for hours if not days on end. Batch programs also do not really communicate to the user. They will report errors when they are encoutered, but otherwise will not produce any sort of 'interactive' interface. Batch programs are often programs that are written for a single task (a lot like scrpits) and are often executed only a few times during actual use (that means without the intention of finding and fixing errors). The type of program I am referring to is a program that takes some input and produces some output from it. That's A typical example of a batch program (this one is an exception to the rule that they are only run a few times for their actually intended purpose) is a program to predict the weather. The input can be the weather reports of tens of thousands of weather stations and the results are weather maps for a range of times in the future. Even if they do complicated work, conceptually they are among the most simple programs. Input goes in, and after some time the programs spits out the result of it's work, which of course depends on the input it has been provided with. Batch programs do not require user interaction after they have been started. They may report errors, or (if told to do so) provide some sort of progress report, but after they have been set in motion they do their work until the output has been produced. In that sense they are something like a washing machine. Dirty laundry in and cleaned laundry out. Simple and straight forward.

The Daemon program

The last type of program that I think should be mentioned is the 'service' or 'daemon' program. Daemon programs are programs that are started along with the computer and run as long as the computer does. They provide some sort of service to either a single or multiple other programs that may run on the computer. An example for a daemon is the daemon that provides notification services on a modern smartphone. If a program wants to show you a notification, it calls upon the daemon, gives it the content of the notification message and then lets the daemon take care of alerting you. This has the benefit, that the app/program that called upon the daemon does not need to know your notification settings or if you are in 'do not disturb' mode or not. Web servers and essentially all the networked services depend upon programs that essentially sit there and wait for something external to happen before they jump into action. This type of behaviour along with the abstraction this kind of behaviour provides is the basis for a lot of very large computer networks coordinating to accomplish otherwise insurmountable tasks.


Now that the basic and more obscure program types have been described, We can now turn our focus on how computers are programmed.