Comments

Every programming language I’ve worked with allowed the programmer to add comments to the program. Comments are essentially programmer notes which the compiler ignores. In the small programs I’ve had here so far comments haven’t really been necessary. However, when you have a program that has 10,000 lines of code and you haven’t looked at it in a couple years, comments come in handy. A second instance where comments are handy is when you are trying to make changes to programs someone else wrote. I’ve modified programs written by other people. Some were well commented, others not. If I had not already been convinced of the value of comments, working with those poorly commented programs would have changed my mind. Continue reading “Comments”

Escape Codes

To explain the reason for a number of the escape codes in this tutorial, I’m going to describe a bit more of the history of the C Language. At the time C was being developed, the computer industry was in the transition from using punch cards for input to hardcopy terminals. A hardcopy terminal was essentially a printer with a keyboard. It can with an attached stand and they were about desk height. You could sit at one in your office chair and type away. The last time I used a hardcopy terminal was 1994. Continue reading “Escape Codes”

Why program in Linux?

I really have 3 reasons for deciding to do this.

First, I liked unix from the first time I used it. It’s very flexible.

Second, I expect that in the next few years the growth of linux is going to continue. There is likely to be a glut of Microsoft Certified developers in the market. So, my guess is that the demand will be for linux programmers.

Third, because linux has been developed primarily by people who were doing the development for the shear enjoyment of it, I expect that the work will be more sound and elegant. People programming for income and on dealines are much more likely to cut corners and be less thorough in their work.

The history of Unix according to Ron

Until the early 1970’s, computers tended to occupy entire rooms. Generally, they were liquid cooled using water. Then computers were mostly used to carry out business transaction processing (eg. banks). Both the scientific and engineering communities wanted to be able to use the computing power in their fields. The issue that they had to work around was the fact that the operating systems that existed then were designed to support transaction processing.

Bell labratories began working on developing their own operating system to better serve the needs of their research and engineering groups. They created a language called B (I’ve heard that it stands for Bell) which was designed to allow them to write/program the operating system. However, that still didn’t give them a language which would allow them to write their own applications. So, that lead them to develop the C language (named by virtue of being the letter after B) which would serve both the purpose of low level operating system development and high level application development language.

This eventually lead to the first implementation of unix running on a Digital Equipment (DEC) PDP 11/44 (I used one of those in college). Most operating systems consist of 2 parts. The first is called the kernel (reference to a seed). What it consists of is the boot program, a set of process control programs, and configuration file(s) which tell it what programs to load during boot. The second part of the operating system is everything else that is installed with the OS including the user interface. In unix the kernel is written in the assember language for the processor that it is running on. But almost all of the remainder of unix is written in C (or C++).

The major advantage to this was that it made unix very easy to migrate to a different platform, since only the kernel (and the C Compiler) had to be rewritten for the new hardware. And that was what happened. Within a short time, there were hundreds of versions of unix because each group that worked with it added their own feature to their implementation. Eventually, this lead to the standardization of 2 variants of unix. Bell’s version was called System V (still in use by Sun Microsystems, Santa Cruz Operation) and BSD (Berkeley). Linux is an implementation of BSD unix.

What is interesting about unix (including linux) is that the source code for the operating system is and always has been publicly available. Linux came about when Intel Pentium processors had the performance to fully support both server and GUI processing requirements. The first version of unix for a PC that I was aware of was SCO. At that time it was a text based implementation.

As far as I know, the widespread interest in porting unix to PCs never dropped off. What I believe the reason for that is, is that unix was designed by engineers and scientists to meet their need for maximizing the calculating power of the hardware. And so, it has been optimized for things like 2D & 3D calculating and rendering. In all of the credits of the pixar films, I’ve seen is a credit to Sun Microsystems. Pixar uses Sun Workstations (running unix) and servers to render the animations.