June 07, 2019

The programming library in the computer history


Most today's programmers may belief that programming has to do with software and operating systems. The reality is that not a certain programming language is important but the availability of a programming library. It is possible to trace back it's origin back to the early 1980s. In that time, no library or only minimalistic one were available. With the advent of the first programming languages like QuickC and Turbo Pascal also the preinstalled libraries have become important.
The concept of library is often documented in context to an existing programming language. If a customer has bought a Microsoft Compiler he will find in the documentation a so called API reference. The same is true for Borland customers and Unix programmers. All the major computersystems have a certain type of programming library. Sometimes it is combined with the operating system and sometimes it is located within a programming language. The concept is remarkable stable over the years. Today's programming works with the same principle.
The choice for or against a certain programming can be explained with the availability of a library. A language which has only a small and poorly documented library is not able to become attractive for a larger audience. And the number one decision criteria for the Windows operating system which dominates the PC market is strongly connected to the availability of a large amount of programming libraries.
From the enduser perspective a system library improves the programming productivity. It becomes realistic to write a large scale application with a small team and even by a single programmer. A library is the most important tool a programmer has access to. And there is no doubt that all the major software companies are aware of the importance.
In contrast to a common misconception a programming language isn't defined by the compiler. In every language there is a compiler and linker available but their importance is low. The more demanding task is to create the standard library. The library is the core of each operating system or programming language. Creating a library from scratch is a demanding task. The funny thing is, that from a technical point of view, a library is not needed. A computer can be programmed without any kind of library. But in reality, nobody is doing so. The former add-on has changed their role into a must-have tool. The reason why is because the code in the library can be used many times. The same routine for printing a string to the screen is used in one program many times and most software has a need for such a routine.
An early example for a library is the BDS C library which was used in the CP/M operating system in 1982. The Turbo C environment which was relevant in 1987 was equipped with a dedicated graphics library. It was not explained in the main manual but in the appendix. The common feature of all the library was, that the amount of words and functions were huge. Many hundred of different words are the minimum, larger libraries are providing much more words. Another interesting point is, that the concept of library is equal for all programming language. No matter if the user prefers a BASIC like programming language, Pascal or C, in all cases he has access to a library which is working with the same principle.
Let us take a look how a normal programmer is creating a game or an application. He needs at foremost the manual which describes the existing programming library. In the manual he finds the keywords for activating the video display, paints pixel and puts text to the screen. With these basic functions he writes his individual game. The interesting point is, that in a modified programming game in which a library isn't available even an expert programmer will fail in realizing the software project. The chance is high, that the programmer is not able to draw a single line to the screen and if he is able to do so it will takes many weeks.
Another example for a powerful library from the past is the Borland C++ library from 1991 https://en.wikipedia.org/wiki/Object_Windows_Library It was used to create graphical GUI applications for the Windows operating system.
A modern microphython library
The development of programming languages never stand still. Former known languages like Fortran or Pascal have become obsolete. Instead the world is fascinated by Python. The newest iteration runs on microcontrollers and brings it's own powerful library with it, https://docs.micropython.org/en/latest/library/index.html What the user gets is a standard library which implements the most important features. He can read the command line parameters the python program was started with, it's possible to store values into an array, calculate the sinus of a number, he gets an SSL module, a json parser, multithreading support and last but not least network drivers. The list isn't complete, the Micropython framework provides much more features.
The library is the largest part of the repository, it contains of 130 MB in total. Most of the code is for the STFM32 board. The reason why Python in general and Micropython in detail is so attractive for customers is because of the library in the background. It gives them the opportunity to realize their own projects with a minimum in programming and computer knowledge. If somebody knows, that for opening a network socket and transmitting an encrypted file a dedicated library function is available, he can muster such a complicated task very easy. Either he programs the code by itself, or he is searching in the internet for sourcecode wirtten by others. The funny thing is, that the explanation who this can be realized is made on an abstract level. What the user will explain to others is not how to program in Assembly language an interrupt, but he is referencing to the words in the library.