Commentary of Modern C

Working with the C programming language has changed quite a bit over the last few decades. Many of us fondly remember working with PCs and Mini Computers in the 80’s and look back with nostalgia about how things were somehow better then.

This is a short list of then and now comparisons for a younger generation to enjoy.

Modern operating systems will not allow a program to overwrite data of kernel or other users. This makes programming in C much easier. Often new C programmers lament the “Segmentation Fault” errors that occur when a pointer has gone astray. Machines running incorrect C programs would often need to be rebooted frequently because of memory corruption. A segfault should be viewed with relief rather than disdain.

Compile time for programs almost instantaneous compared to machines of the past.

Programs were often compiled infrequently, even written in completion on paper before being run. Programmers knew the hardware better than today because it was simpler. Programmers spent quite a bit of time thinking about how the program would work before writing any code at all. Often programmers kept notebooks filled with sketches and notes about each program written. These served as the first form of documentation. (And often the only form of documentation).

The C standard did not exist at first: the only standard was K&R. Many features of the language were undefined and caused quite a few problems by exploiting this behavior. This caused widespread compatibility problems moving code from one system to another. This challenge lives with us even today.

Debugging was often done with printf() statements placed in strategic locations. Professional developers often created a small library to simplify debugging.

Programmers intuitively understood the concepts of stack and heap. These are more obvious in C than in many more modern languages.

Often C was optimized with assembly routines to take advantage of modern processor features. Today’s compilers make use of heavy optimization for released code. Rarely will assembly be needed to optimize code generated by a C compiler.

The first versions of the UNIX operating system were very simple. Not much more than a collection of C libraries that could be called by programs when needed. UNIX did not have the ability to run more than one program at a time, nor did the hardware it ran on. Moreover, C programmers were very familiar with the function calls to UNIX as this was the only way to make use of the operating system.

Compiler performance was often measured in “lines per minute”. This was especially true of commercial compilers such as Borland.

Commercial development software for the language was expensive and often well out of reach for many students. For example, Byte Magazine lists a C compiler suite named “C86” developed by “Computer Innovations” for $395.00 per seat[1]. Often computer labs at colleges and universities were filled with students making use of the schools computers as a result.

Time on a mainframe was often charged by the amount of processing performed by the computer. This led to huge bills from service providers that taught a lesson about how precious computer resources were.

Bibliography

  1. Byte Magazine Vol 08-08, 1986, p. 16.

  2. Byte Magazine Vol 08-08, 1986, p. 86.