Table of Contents

7. Programming

So you want to learn to program? Good. Programming is fun, creative, & fascinating. (It used to be a well-paying career, too. I guess it still is, if you are in India or China.)

7.1 Language

There are billions & billions of programming languages. Well, not that many, but there's a damned lot.

You'll probably want to learn one of the most popular ones, which is too bad because most of the currently popular languages aren't very good. They are complex versions of the exact same features that have been available in programming languages since the 1960s. That's right: Even after forty years of hyped, new languages, we've effectively come full-circle to Algol 1960.

But I'm a bitter & opinionated old programmer, so ignore what I just wrote. Here's some actually useful information:

You can use just about any language you want on unix. At the moment, it might be difficult to find a fully functioning C# compiler for unix, but one is coming, & there is no technical reason that C# won't work on unix. Many other programming languages are available for unix. Heck, many were developed on unix. So you can pick pretty much whichever you want.

No matter what you pick, I highly recommend that you also do some plain, vanilla C. That's because the programming language of unix is C. When you need to write some programs to experiment with some feature of unix to learn the details of how it works before you use it in a larger program you are writing, the best language for writing those experimental programs is C because it hides the least from you. It's not that C is better, & I'm not saying it's better for writing applications. I mean that because unix's API is for C, C is the best language for discovering how unix's system calls work. C doesn't hide anything from you.

There are two books you need to do serious C programming.

The first is the original & the classic The C Programming Language, by Kernighan & Ritchie ([aDMR88]). Yeah, it's old & small, but since when is information bad just because it's old? And since when would you rather take days to read a humongous tome that contained no more information than in a small book like K&R?

The second book you need for C programming is The Standard C Library, by P. J. Plauger ([Pla92]).

7.2 Languages on SDF

Here are some languages that are available on SDF. You may have to be validated or even ARPA to use some of them, but I don't know for sure.

language pathname
Bourne (or other) /bin/sh
C /usr/bin/gcc
C++ /usr/bin/g++
Open Lisp (not Common) /sys/pkg/uxlisp/uxlisp
Perl /usr/pkg/bin/perl
Python /usr/pkg/bin/python

To learn a language, I recommend studying at least one book, not just online sources.

7.3 Theory

Obtain, read, & understand a book about data structures. Learn it & learn to love it. Data structures separates the scripters from the programmers.

back