1.0.0 The New Programmer's Road Map

There is nothing I love more than when someone says "You do it this way" then gets up and walks away. This statement rides right along side of the nefarious RTFM - somewhat true of learning how to program. Many people will simply say do this, that and the other

The goal of this series of texts will be quite simple: To provide information about the most popularly accepted method(s) of learning how to program.

What this series will not do is instantly turn you into a programmer in "21 Days" - or whatever. Learning how to program takes a lifetime because programmers never stop learning. Whether it be new languages, styles or techniques - the process goes on forever.

How the Road Map Will Be Structured

By no means do I intend on writing a set of primers, tutorials (there are plenty of these already) or cast my own distorted views, instead the Road Map will approach programming from a high level perspective. It will introduce what many believe are the best ways to get started and where to go from there. The series will also look at attending classes, purchasing books and other ways to become a proficient programmer.

The beginning of the series will be a forecast of what is to come and some general philosophy ideas, after that we will look at editors and ways to "Prime up to Programming". Next will come some suggested starter languages, middle languages and finally a sort of "pick your own way" after that.

It is important to note here that it takes all kinds, which is why this Road Map will be somewhat vague or even appear to be indecisive, it is a guide, not a rule book. Many people want to program in different ways for different reasons. For instance, take the differences between people who may spend a lot of time working on GUIs versus Network Programmers. Many programmers have a particular area they like (this seems especially true in Free and Open Source Software Arenas) to work in, the Road Map will attempt to illustrate these differences instead of saying "Learn this and you will forever be employed."

How to Get the Most from this Series

This series will not be designed so easily to where you could go learn every primer, read every paper and perhaps do everything mentioned in one text and go to the next. Instead it is a series of texts on progression. The best way to use the series would be to do as much as you can, move at your leisure and refer back to areas you may wish to reread.

UNIX Programming Ideals

I am not one for duplication, however, I will restate some very popular beliefs about UNIX Programming that have been around since before UNIX was around. I would give due credit to Dennis, Ritchie and Kernigan (in addition to the scores of scientists before them) plus Eric Raymond for bringing their ideas together in many of his texts and of course RMS with his brilliant coding contributions. Following is a short list (not all of them) of some of these ideals:

These ideals (and more) are expressed much better in ESR's The Art of UNIX Programming; Chapter 1; Philsophy Matters (a work in progress). I highly recommend reading it.

General Programming Ideals

Just about every really good programmer will tell you (and I was told the same thing) you should learn a variety of different types of languages. There is a reason for this beyond the obvious job security (although it helps). Different programming languages, literally, require different ways of thinking. I have assembled a short list of language categories, by no means is it authoritative as much as it is descriptive of the types:

An important note here is that different problems do in fact require different languages. What may seem like a practical solution in one language may be extremely difficult or even prohibitive in another. For instance, let's say we are using an interpreted language which cannot produce binaries you can keep on your local system. You have solved a simple problem with this language, however, the code is only a couple of lines. Additionally, your interpreter is 12MB in size. So when these couple of lines are sent, all 12MB of the interpreter are loaded into memory. Perhaps it would be better to write the program in a language that produces a small binary, hence saving some overhead or even using a different interpreter that is smaller. This is the essence of the right tool for the right job. Many large projects use a variety of languages to piece together one large functional product.

Another important ideal is that one does not have to become proficient in every type of language out there, I do believe that would be quite difficult. Instead, learn a variety of types to the degree where you can do something with them (even if it is trivial) so you gain an appreciation for the design, and even perhaps see a way to attack a problem with a language that you already are proficient in, again, brain exercising and perspective.

1.0.1 Choosing an Editor and a Programming Primer

There is a silent holy war (among many thousands to be sure) on the Internet. It can be found waging in newsgroups, chat rooms, "web forums" and the like. It is about the Editor of Choice. Some will say it is vi while others will insist the end all editor (and environment in some cases) is emacs. I would say - the choice is yours, but what value might I bring you without some simple information about them first?

Initially built by Bill Joy of Sun Microsystems, the vi editor represents simplicity and elegance. It has a wide range of commands and can have MACROS. The vi editor is best known for being light. It normally has only a terminal interface, however, there are clones out there that can run in X mode. A very thorough tutorial on the vi editor can be found at the Engineering Computing Network of Purdue University's VI TUTORIAL.

On the other hand is emacs from Richard M. Stallman, founder of the GNU project. Emacs has an intense array of commands, extensions and tools to help a programmer a long. In fact, emacs is similar in nature to an Integrated Development Environment, but better. One can also use mail utilities, play games, download and participate in newsgroups with emacs. The trade off for some might be the time it takes to reap the full benefit of all the things emacs can do.

There are also many other editors for UNIX out there, some are like vi, some are like emacs while others are sort of hybrids. If neither one of the ones mentioned here suit your tastes, explore and see what else is available, I am sure you can find one that works for you.

So which one do I use? I prefer the vi editor, mainly because I am on so many different platforms and I will be blunt, I am lazy. It was easy for me to learn and retain the commands. I used xemacs for awhile but was easily frustrated by my own poor memory while trying to learn how to use all of it. I have always been a sucker for the whole simple elegance thing too.

A Primer for Programming

I had intended to suggest learning either the Hypertext Markup Language (HTML) or a Text Processing Language as a "primer for programming" but decided to stick with HTML only for several reasons. First, it is somewhat difficult to learn a text processing language and the processing side as well. Second, many people suggest learning HTML before a text processing language - that sort of ended the issue.

Now, what do I mean by Primer for Programming? Well, just that, through HTML, one can learn the basics of structure, a very important aspect of programming. I do not believe one needs to become a master of HTML, rather the opposite, understand how it works and what happens when one uses certain tags. In a sense it is a Primer for Programming Primers if you want to get technical.

HTML is a subset of the Standard General(ized) Markup Language (SGML) which is now coming "online" as the eXtensible Markup Language (XML). HTML is a set of tags that are relatively easy to learn and employ, however, it is a Markup Language which means the author is concerned not with appearance but with the Structure. This is why HTML makes a great primer for primers, some (not all) principles of programming can be found within it.

Another great thing about HTML is it can be fun. It offers very quick rewards for a small amount of work, always a good thing for the aspiring programmer since later, things will not be so easy.

If you are strictly interested in programming, I suggest learning basic HTML and going no further in the "on line" endeavors until you have a little spare time. Otherwise, for the extremely brave who wish to know and understand a great deal of how HTML works and additional topics such as style sheets.

Wrap Up

Try out an editor and play with it, once you feel somewhat comfortable with it, start learning HTML using your editor. This will give excellent practice with your editor and a chance to have a little fun with HTML.

1.0.2 Scripting Languages

Python, the New Intro Language

The Python programming language is an interpreted type of language in that source code is not compiled into binary form. It is also the most recommended introductory language by many good sources (ESR among them) for several reasons. I have learned Python all the way up to creating a class and I admit, I liked it a lot. Some of the main reasons that Python is popular as a first language is that it is very forgiving and helpful about syntax errors when not used interactively. If used interactively it can be somewhat difficult. Python also has another interesting facet, it uses indentation to determine how statements are to be operated upon and does not have closing marks for statements, instead multi-line statements are marked like a multi line UNIX command with a backslash.

Another reason that Python is preferred as a starter programming (or scripting) language is that it has a great deal of built in capabilities. For instance, console I/O is extremely easy both ways, making things like I/O loops easy to write. What that means is one can learn some very handy techniques without doing a great deal of coding thus freeing up the learners mind to explore and be creative early on instead of memorizing a great deal of long programming to accomplish such techniques.

Finally, Python scales quite well as a learning tool goes. One can learn it at a basic procedural level and stretch all the way to the fundamentals of Object Oriented Programming (OOP) in a relatively short period of time. As a case in point, I will use myself since I really do believe if I can do it, anyone can. My first language was Perl (I did shell program before that), it took me three months before I could write a Perl program that could do something worthwhile and believe me, it was not object oriented. It was strictly "block level" programming. Next I learned C and C++ (sort of at once) and it took me about three months until I reached and mastered the basics of OOP in C++. With Python it took me one week. Now, granted, I already had the Perl, C and C++ experience, but I still believe that was fast.

So as you can see, Python is very good as a first language for the following reasons:

Shell Scripting

Shell scripting is not just a great way to get a feel for programming but is an essential skill for UNIX power users (e.g programmers). Understanding shell scripting and the shell environment (whichever one you choose) is essential. I can guarantee it will come in handy someday. Shell scripting is basically putting UNIX commands in a file along with shell built in functions to do things (such as if iterations for example). Obviously you can already see the inherent advantage to learning it. I use shell scripts for maintaining file systems, log-files, sources and my own packaging. I also use them to rapidize packaging for large projects until I am ready to finish the Makefiles associated with them. In addition to the obvious benefits of learning shell scripting, there is also it's similarity to more procedural types of languages.

Shell scripting (and programming) is also a vague term because, there are many to choose from. Following is a short list of the ones I have seen (not necessarily scripted in):

Final Notes

There are other languages out there for starting, however I honestly believe Python is the best starter language. Some readers recommended ADA or Pascal. I definitely do not agree with Pascal as a starter language - or for anything actually and I have never used ADA so naturally - I cannot recommend it either.

1.0.3 More Programming Languages

Without out a doubt the three big (more like three and a half) languages out there today are C/C++, JAVA and Perl.


Perl is an easy to learn, easy to write language that is great at operating on strings of arbitrary length(s). As such the Perl acronym of "Practical Extraction and Reporting Language" has been comically portrayed as "Practically Eclectic Rubbish Lister" or reduced to "awk on steroids." While both may have a ring of truth to them, they do not do Perl justice, not by a longshot.

So what makes Perl so great? Time. As I mentioned, it is arguably as easy to learn as Python, however, it does not have a lot of built in pragmas one should follow. As such sometimes someone else's Perl code can be a bit hard to read.

Systems Administrators (myself included) use Perl every day (either automatically or not) to compile reports, trim/filter logfiles, run filescans and a plethora of other chores that used to be done by shell scripts.erl is also interpreted like Python, so there is no pre compiling done, well, that is not true exactly. The interpreter reads the source file, compiles the executable and then runs it. In a sense Perl more or less cuts out the middle (make) man .Systems Administrators (myself included) use Perl every day (either automatically or not) to compile reports, trim/filter logfiles, run filescans and a plethora of other chores that used to be done by shell scripts.

Perl is also robust enough to perform applications programming, especially web applications where standard input is involved - again - string manipulation. One of the great things about Perl is scalability. Not unlike Python, Perl inherently scales rather well from scripting language to all out applications language.


I have to confess I do not know a lot about JAVA. I wrote one of the many famous calculator programs and lost interest. What I can say about it is I am always surprised at the variety of uses and places JAVA seems to be popping up and, in reality, has always been since it popped up on my geek radar. Initally I thought JAVA was another GUI language, the difference between it and other ones being it has the "write once run anywhere" action going.

JAVA has turned up in a number of other places as well. JAVA is used to power appliances and micro devices of all sorts. On fast intranets it makes a great user interface tool that scales rather well. JAVA in addition to many other great languages exudes this ability to scale.


Definitely different languages, but evolved from the same core, C and C++ are the most widely used programming languages to date. The reason is simple, while they may not be "write once run anywhere" like JAVA - they came closer to it sooner than any other programming language for its time. Especially C which was more or less designed to be easily ported.

Still, many programs from many languages can be ported. Another little item about C in particular that sets it apart is it's easy access to hardware through small, clean interfaces. Hence why so many systems level programs and utilities are written in C or C++. Due to the low to high level nature of C/C++, almost all applications that are multi platform are written in C/C++ (including - other languages).

Last, and definitely not least, resulting executable object code is tiny. C/C++ (again, esp. C) are great for writing small, clean and efficient programs. They are the language of choice for device drivers, utilities and low level programs for that very reason.

So what, prey tell, is the downside to C/C++? Well, I have heard this a million times so I will repeat it;

"With C, we have the ability to write great programs and shoot ourselves in the foot in the process."

" . . . with C++ now we can blow off the whole &^%$ leg."

That was paraphrasing a bit but true. It is easy to cause buffer overflows (without even knowing it) or the most famous, hidden errors. I believe logical errors can be done easily in any language but I have to admit they seem somewhat more prevalent in C/C++. I would also venture to say there are so many problems in C/C++ programs because of wide use.

1.0.4 GUI Languages


One thing I never expected, being such a geek and all, was to actually like creating a Graphical User Interface of any sort. The reason I might not like it is quite simple, I never really used them a lot (with the exception of running X windows so I can have, lots of xterminals). It occured late one night when I was bored out of my mind. I picked up some unleashed book that was laying on the floor and just thumbed through it to find something interesting.

I stumbled across an introduction to tcl/tk GUI scripting and tikered with it for a bit, I was very surprised . . .


Tcl/Tk was fun, I really like the interactive scripting side of it, which I can tell would be difficult for a large project. In case you are wondering exactly what the heck I am talking about, please allow me to explain.

Tcl/Tk has an interactive mode (not unlike Python or LISt Processing for example). You can build objects just by typing in the syntax in interactive mode. So in effect, I would type in a bunch of syntax and suddenly off somewhere on my X display a little box pops up; then a button, a label, some more buttons, more labels etc. Eventually I made it do something (I honestly cannot remember now what that something was - I am sure it was cool though).

At the time, I thought this was just too nifty and really, still do. It was a heck of a lot of fun and I saw why tcl/tk had become so popular. Not unlike other GUI languages, a lot of people found it a blast to hack on and shared the results (whether useful or not).


The other popular GUI language I am going to discuss is GTK+. While GTK does not offer the interpretive interface that Tcl/Tk does, it is still quite rewarding: anyone who has worked even with interpretive languages realizes you must enter all of the syntax in a file anyway on larger projects. So making the change was not exactly difficult. The reason I tried out GTK+ is simply because, well, I had to or else I could not possibly write about it, could I?

GTK+ uses a C-style syntax where most of what one does in the way of generic operations is done by using the libraries. To me, this is no different than doing my homework with the glibc documentation, and for this I see why GTK+ is so popular. A C or C++ programmer should have no problems (after a bit of reading) getting up to speed with GTK+. Since I have a preference for C/C++ of course I really enjoyed it and definitely recommend it for a C/C++ programmer on UNIX.


Are there other programming languages? Heck yes. Thousands, literally. Not only are there thousands, there are variants of existing languages. So what among these thousands, would I recommend learning? Well, for starters, I strongly recommend learning one of the LISt Processing (or LISP if you will) languages to the point of creating a recursive function for one simple reason, LISP uses recursion by default; once you understand this you do not really have a need to go further, but if you wish to, please do so. The sheer elegance of LISP, aside from it's more well known acronym of:

Little Irritating Special Parenthesis

is truly an eye opener--bluntly, it is a beautiful language and I liken learning it (even at a basic level) to learning a new human language.

1.0.5 Reflections

One point I did fail to reiterate in subsequent texts that I made in the first text is that I do not believe and anyone in the right mind would also, that any one single language is the end all solution. I do not argue that there are some languages out there that are bordering on the edge of pure blasphemy. It has always been the case for me that it truly depends on what the goal of a particular project is or where it will fit in with other pieces of what it may be working with. That may be somewhat confusing so let us take a look at some quick examples to further illustrate those ideas:

The Case of Matching A Goal

In this example, we have a project that is not necessarily connected to anything else, so we have a lot of options, we could, literally, choose any language if we knew the user of the resulting application or utility would have everything they need to use it. In this case, we look for the best match to meet the goal. If we wanted to create a very fast small utility, then C, C++ or Perl might be the best language to use, if we wanted the ultimate in speed, I would venture to say C or ASM (or a combination therein) would be the best match.

If the goal was slightly different and I mean just slightly, we might have to shift to a different language. What if we wanted a strong object oriented program, C++ or python might be the answer. If we wanted a great deal of speed but to still retain the built in Object Oriented features then C++ might be the best match for that particular goal.

Finally, for the sake of argument, let us assume that we will be doing massive string handling on a pretty powerful system. Perl would be my first choice, at least as a prototyping language for it's ease of auto-magically handling arbitrary string lengths.

The Case of Playing Nice

There are occasions when one should or even have to use a certain language. If we are creating a GNOME application for example, it would indeed make sense to use GTK and it's associated tools to build our application. Another time we would be forced to use a certain language would be kernel programming, where C and ASM play a large role.

Unfortunately, it is rarely ever so clear cut. I can speak from personal experience about this because I face it for every project I start. In my case it is almost always a sysadmin tool of some sort, well except for my nefarious screw off programs. So often I must think about how I want to approach a problem and how it would work the best but still be created with a language that other toolmakers use. Now, why should I care? It is Free/Open Source, which means if there is a problem that exists and I miss it (and believe me, I do) then there is a good chance that if someone else wanted to fix it or make a change for the better they can because they will be familiar with the language.

In my case I choose C or Perl almost everytime. I primarily use C when working very close to the kernel or hardware. When building admin tools like quasi greppers, log filters and report generating scripts I almost exclusively use Perl. Both languages are extremely popular (if not necessary) to the audience I happen to cater to.

Applying All Examples

In both of the aforementioned cases and examples, everything goes when it comes to selecting a language and even the implementation, coding style, commenting style - whatever. Try to match every aspect of the project with:

Following those guidelines will tend to make life a little easier.

No Program Is A Dumb Program

It might be a poorly written one, but the intent is always good. The first time I wrote a real program (although I would hardly call it that now) it was not exactly an achievement in programming. it worked, don't get me wrong, it did the job, but it could have been a lot better. Regardless, it was a learning experience. That is what is is all about really; learning, growing and expanding.

A case in point (again), I made what might be considered one of the single most useless programs of all time. It is written in Common LISt Processing (CLISP) and contains a whopping 12 lines of code. I read the entire CLISP tutor and implemented every example and when I finally understood how it worked, I decided to write a recursive CLISP program, my motivation was irony. You see, LISP uses built in recursion in its statements. So, I thought it would be somewhat ironic if I wrote a useless program that was a call to one recursive function. The program runs through ninety nine bottles of beer on the wall, almost instantly the screen is filled with lines of the song.

Hey, at least it is efficient.

Point is, I did it as a learning experience and shared because I felt others might get a kick out of it. I did intend to improve upon it, but I couldn't stop laughing after the "first revision."

Learning To Complement Your Skills

One last shot I will fire at the "learn a variety" ideal is understanding the approaches of one language and using them in another. In some cases there is a direct translation. Say you know C++ but not C and are programming in C. You stumble across a linkage method and realize you can do the exact same thing in C++. You have just added to your armory of C++ skills.

Of course, that is a pretty cheap example since C++ is an enhanced C with built in Object Oriented capabilities. Instead look at how CLISP promotes the use of recursion (since internally that is how it works anyway). Understanding this can help one better understand how to use recursion efficiently in other languages or to create built in lexicals using recursion in another language.

The Road Map Is A Guide, Not A Rule Book

Experienced Role Playing Gamers will remember the cardinal rules set out by Gary Gygax in Advanced Dungeons and Dragons when he stated (and I am paraphrasing):

"These books are not rules, they are guides. They show a path but not an absolute way to do things."

As is the New Programmer's Road Map. If at some juncture one decides that using a language I did not even mention (and I did not mention a lot) would suit them best then so be it. Instead the New Programmer's Road Map is a really big suggestion. I believe following it to some extent will round out ones skills, but that does not necessarily mean that a New Programmer should follow each and every suggestion I make. Instead, I would make these ones as a sort of short version:

  1. Prime yourself by choosing an editor and fooling around. Possibly make some sort of Markup Document(s) with it.
  2. Choose and easy to learn language.
  3. Move onto a middle level or lower level language
  4. Next choose either an Object Oriented language, progress a current language you know into OOP or try a GUI language
  5. Try to find a language that seems altogether different to you, not just in syntax but style and philosophy as well
  6. Home in on a couple of languages you liked

In my case, it was quite typical of a sysadmin career really. Here is the short short version of what I learned and in what order:

  1. Tinkered with JAVA
  2. Shell Scripting
  3. Shell Programming
  4. Perl Scripting and Programming
  5. C and C++
  6. a little Python, Tcl/tk and GTK+
  7. Tinkered with CLISP

I focused on Perl and C for the most part. As you can see, I sort of do not follow the Road Map exactly, hence why I thought I might share my thoughts with the world at large!

The Final Recommendations

The Road Map missed a few points from the beginning, the most important one not covered in this installment is - what else do I need?.

Books - and Lots of Them

Buy books, lots of books. You will need them. I cannot really recommend one brand over the other, I have several books from several publishers on C, C++ and Perl (and soon to have Python). All of them have different examples, different approaches and methods. After a time you will even begin to question the material you bought. This is a good thing. If I did not receive an email that questioned something I said here, I would REALLY be scared. If you do not question, you will not learn . . .

On Line Data Mining

Almost parallel to books is online documentation, either on the internet, info, ps, man or whatever. Dig, Dig, Dig. It is there, somewhere. I have found this to be the best way to get the full advantage of any library or call available. Understanding the documentation is an art unto itself. Weeding through the diatribe of one individual can be difficult, but the reward is priceless. Finding that obscure capability you never knew existed is always enlightening.

1.1.0.i Facets of Open Source: Defining a Process

Recently I was asked the following question:

" What is the point of differentiating Open Source as an entity versus something that has just always been there?"

In other words; if a company sells services and products, what reason outside of buzzword compliance is there for creating a practice that revolves completely around Open Source?

Good question - the answer is simple at first:

" Open Source is more than just software - it is a way of doing things - not to be confused with "best practices". Open Source is a pragma versus a method. "

It is easy for people who do not live with Open Source to become confused. The larger the distance from Open Source (for instance - persons who are only business oriented) the greater the confusion. This text examines what benefits of Open Source can mean while the next article will use specific real world examples of Open Source saving time and money. What Does it all Mean?

Open Source and indeed Free Software are not necessarily free of cost. It is free in the sense that the code is available, may be modified for local use and redistributed as long as the original license remains intact and is adhered to. In some cases, upstream patches of changes are required. So what does free really mean? Truly free is the definition of "Public Domain" - or "do whatever you want with it." So where is the cost?

Where a product can be bought and brute force implemented, talent can be purchased and used with accuracy. The entire idea of service versus product is key to Open Source. Only a few years ago, most companies looked at software as a boxed product to buy: direct system administrators and database administrators to put the product in place; then let users and/or developers "have at it". The problem of course is that computing systems are organic at some level even if they do not appear to be at a high(er) level. Computing systems evolve; even if the underlying hardware and software use extraordinary mechanisms for release/change control - the evolution cannot be stopped: the reason for this is simple; stop evolving the systems and you will lose. Changing the thought process from blackbox product to strong resources makes sense. Open Source is an enabler of the idea that powerful resources give advantage as most Open Source is is inexpensive (or free) to use, allowing an organization the financial resources to pay for resources.

What is the Cost?

Is it possible that the costs even out? Certainly. The real answer is "it depends". It truly depends upon the type of software and scope. A good example is to compare the difference between three different software system types in an order of magnitude:

Note that the product is not the only item to consider; there are two other costs:

Compiler Toolchain

For those who have ever had to deal with building for multiple platforms (or target architectures) from a single platform; powerful crossbuild toolchains are a blessing ... and wrought with danger. Getting a free crossbuild toolchain is easy: GNU has a great one. The problem of course is support. A company known as Cygnus used to offer support for cross compiling - there are likely more. Most proprietary crossbuild systems have a hefty front end fee plus even larger support costs. In this the smallest example; the benefit of Open Source far outweighs the proprietary alternative. For example, the cost can be less if paying for a person who has the skills to master the toolchain versus buying an off the shelf product with some sort of support agreeement.

Database Products

Databases have one main factor: scale. A proprietary database product - top of the line - can come with a rather large (on the order of thousands or even tens of thousands of currency) front end fee before licensing and support are even factored in. If a database does not need features like built in database redundancy (outside of the OS) and will not exceed a few million rows in any given table then there is no reason to sink thousands into closed products at all. Some of the open source products are not only catching up with features like built in redundancy and a multitude of multiplexing access methods, in some areas, they are exceeding their closed source counterparts. This makes the support side easy, with no heavy front end cost; database specific support through a vendor for an open source project is trivial. Conversely, if there are features in the proprietary database that are needed - then that is the way it is ...

... just remember; the Open Source equivalent may be available next year ...

Operating Systems

A complete operating system is entirely different because of support models. Some companies will support software on the operating system in addition to the core OS - which muddies the water a bit. For the time being, things like development and database software will be tossed aside within this context to look only at the core Operating System.

Most, not all, proprietary operating systems are tied to a specific set, class or even their own hardware models. The same can be said of open source operating systems - the difference being the former is a complete product line while the latter is something one can deploy with more flexibility on a particular group of hardware platforms; in some cases - a large variety of platforms.

With most supported Open Source operating systems, there is some sort of fee associated with support and subscription. Support and subscription are also tied to proprietary systems - the difference is the cost (Open Source systems are generally- but not always - less) and hardware. With many (not all) closed systems the hardware is either the same company or a very limited set. The offset cost of open source is dealing with multiple hardware vendors and their support structure. It is worth noting that most Unix shops deploy a mix of vendors anyhow - so the old argument of "one vendor for all" is usually the exception.

The operating system is probably the fuzziest area of support because of the multitude of factors involved:

In the simplest case, general purpose, large (not very large) database, distributed or commodity systems are best served with Open Source. Only exceptions to the rule apply to closed systems. It is worth noting that this is a complete reversal in thinking dating only a few years ago which stated "Open Source is good only for commodity systems."

1.1.0.ii Facets of Open Source: Examples

In the first text a generalized view of how Open Source may be beneficiary to an organization was highlighted: not this time, now a look at development models and three real world examples of leveraging Open Source resources for a particular organization.

Open Source Models

The Open Source model is actually very similar to extreme programming minus the formality. In the simplest terms; the Open Source model is:

On the surface the model does not sound too difficult and it is not for small projects. The Open Source model becomes difficult - ironically - when the software becomes popular. The more popular a particular type of software becomes factored by the software's size creates a management issue on the author(s) part.

The "Problem" with the Model

Essentially the three stages of time management look something like:

  1. {I,We} have some spare time to create this software...
  2. The software is popular, it is a good thing there is spare time to maintain it...
  3. {I,We} have no spare time...

The time management problem is exacerbated by the number of developers controlling the source, for example, the Linux kernel (for a very long time) only had one maintainer of the core source tree; burnout was inevitable.

Mitigating the Time Problem

Other than dropping a project on the floor, there are several ways to mitigate time management problems:

The implications of time management are obvious; a real version system needs to be used, someone or some persons have to set aside time to figure out exactly which model to use and execute putting the mechanisms in place.

So How Does the Open Source Model Differ?

Most organizations take three approaches to software system development:

The models of central core and/or gatekeepers work - in fact; they work the best. The Linux kernel experienced a slowing of development when the single gatekeeper issue arose; it was remedied by putting in a set of gatekeepers to handle subsystems. The various BSD projects use a two pronged approach; there are developers who are considered experts for a general area, set of areas, specific modules and package experts with an accompanying technical core group to make final (and sometimes pretty tough) decisions about code inclusion.

It is worth noting that many organizations do end up using the Open Source structure naturally. A team of programmers is assigned to create an application; often they divide into groups of "who is better at certain aspects of the project" and subsequently end up becoming the subject matter experts; at the same time; the more expierienced and/or talented individuals naturally assume leadership roles.

3 Real World Examples

These examples are real; the names involved have been omitted for legal reasons however, each case study example happened. Perhaps even of more interest; each case example happened to the author. The examples are given in an order of magnitude from least to most significant.

The Scenario

Security through obscurity is often a very bad method; key word: often. At the time hardly any sites were using IPv6; the provider for this company was not using IPv6 (at least not routing IPv6).

The scenario is simple, two systems in a DMZ needed to communicate using a private connection. The problem? No physical private connection. Secure Sockets Layer and Secure Shell both can do the job with an encrypted session - what if that could be taken a step further? What if communication was done between the two systems on a non routed network using IPv6?

The Solution

The systems were one NetBSD and one FreeBSD system. They both supported IPv6 by default [1]. Instead of having to remember the syntax of remote execution over IPv6 a set of wrapper scripts was written to use IPv6 in place of the commands needed to maintain a heartbeat between the servers. The Cost

Solely hours; roughly five hours total versus:

The Resultant

The organization saved money in time and hardware expense by paying for the technical resource to implement a solution.

The Scenario

Some cases are just too interesting to pass up. A company wanted to use Oracle on Linux in 2000. The problem.. Oracle kept wedging because it was using a newer memory model than the current kernel. The short term solution was to update the 2.4 kernel to at least 2.4.12. Easy enough, the sysadmin downloaded the Red Hat sources; quick built (that is - just use the default) and voila - a new kernel . . . one minor problem . . . the BroadCom ethernet card did not work. It gets worse; the card was not supported at the time nor any of the subsequent kernels [2]. Quite a place to be cornered into. One of the reasons this system had been purchased was for the 1 Gig card.

The Solution

The sysadmin understood that at the time, a new 1 Gig card would cost a great deal of money; possibly thousands of dollars. The solution was simple enough: port the driver from the previous kernel. The admin copied over the driver files, changed the PCI handshaking and glued the card into the newer kernel's framework . . . it worked.

The Cost

Time, however, in this case the time was a direct proportion to the cost of a new card. A new card could have cost at least 1000 USD - the admin (who already had driver experience on another platform) did the work in 2 hours. Remember, the porting was done in 2 hours versus the time to:

The Resultant

It is interesting to note that the result was staggering, the system was made available again within two hours of diagnosing the problem wheras if the driver could not have been ported for lack of experience, the cost would have been far greater (possibly an order of magnitude).

The Scenario

In 1999 Brett Lymn put forth the idea of using a method to check all executables in a system (and scripts) via a kernel loaded hash table; not unlike tripwire but inside the kernel. A Fellow Developer felt it was a good idea and decided to take Brett's proof of concept code and break it out into a seperate module within the kernel. The same admin took the idea to their corporate management with a singular pitch . . . credit.

The Solution

Not only did the company the sysadmin worked for go for it - they offered up test hardware that both the admin and developers could login to remotely. Eventually the first draft was hammered out and committed to the NetBSD kernel.

The Cost

In this case, the company paid for power and a system plus spare developer time that the admin could have been using to code for the company, however, the mandate was for the admin, no coding unless it is idle time - effectively the company lost no personnel cost.

The Resultant

The company got three things:


Upon closer examination it can be found that Open Source differs from closed source only in the sense that vendor support models are modified and may (read: often do) take a little time to adjust. The Open Source development model while on the surface looks like chaos in action is not. Small projects remain controlled by their respective developer(s) while larger ones adapt using some sort of control mechanism. The cost savings do take time, there is the initial cost of deploying, adapting and hiring/training resources - but the savings exist.

What has been discussed in these texts are only two pragmatic facets of Open Source; there are more that have been missed (and may be addressed later) such as heritage, tradition, science, hobbyists, friendship, community and just plain fun - for the short-sighted pragmatic or Open Source afficiando alike these texts explain the methods and models but skip over the human factor . . .

. . . you need to figure that one out yourself.

1.2.0 Syntax and Context .... Grammar and Programming

Comparing a spoken language to most contemporary programming languages might be a reach. Is it possible that the structure of grammar might be comparable to programming? There are two extremely simple ways that grammar, English grammar in particular, can be compared to programming statements: syntax and context. Syntax

One definition of syntax is:

That part of grammar which treats of the construction of sentences; the due arrangement of words in sentences in their necessary relations, according to established usage in any language. [1913 Webster] On the C Programming Language

The C language has very strict typing and checking. In a sense, the C language can be compared to when grammar is used in very strict terms or perhaps an easier way to think about it - not hackney. Not all languages, including English, apply the rule of being overly strict all of the time. In very simple sentences correct syntax is the rule of thumb.

        The boy is tall.

Pretty straightforward, if the structure changes, and the rules for English broken, the sentence becomes very difficult to follow:

        Tall is the boy

Is this saying the same thing? No, it might be asking a question or is just malformed by accident (or you are Yoda). Doing something similar in C can simply break it:

        char *boy  = "tall";

Works - but -

        "tall" = char *boy;

does not. In general terms, strict grammatical and some programming syntax share a similar set of relations. A more complicated example might be looking at iteration. Iteration is not so easy to do in typed words because pages do not loop by themselves. Conversation can create an iterative function:

        $ "Is it nice out today?"
        $ "no"
        $ "Then I am going to work"

Simple iteration; look for something and either act upon it, look for something else or go on.

        /* in some other part of the program */
        char *weather = "lousy";
        if (strcmp(weather,"lousy"))
        return 0;

Although the action of iteration will appear similar between many programming languages it is still important to note that strong typing and syntax are among the most important aspects of C. Understanding this makes looking at context all that much more interesting. Context

A good definition for context (within the context of this article) is: context

n 1: discourse that surrounds a language unit and helps to determine its interpretation [syn: {linguistic context}, {context of use}] 2: the set of facts or circumstances that surround a situation or event; "the historical context" [syn: {circumstance}] The Perl Programming Language

Whereas C is based on strict structure and typing, Perl is much more context based. By this, it means a basic Perl data type, the scalar, can be anything based on the context it is represented in. The similarity to grammar is the concept of context itself.

English context for some can be difficult to master because different words have different meanings in different contexts. Such as:

"To say I like that job is akin to loving glass eating." "To say I like that beer is similar to asking me if I mind eating to live."

The first sentence is a negative statement. The second statement positive (if not a lame attempt at humor). Both use the word like. The sentence connotation is distinguished by information that comes later and puts the word like in the proper context. By means of pure context the most basic Perl variable, a scalar, is similar:

        $like = "yes";
        $like = 1;
        $like = 'no';
        $like = `NO`;

All of those are a scalar of the same name but defined later in the statement by more information, in this case, the actual data itself surrounded by (or not) ticks, quotes or double quotes. What can be even more interesting (or distressing depending upon your point of view) is how Perl can change the literal context:

        [jrf@vela:~$] cat foo.pl 
        $bar = "ooga wooga";
        @foo = $bar;
        print "@foo\n";
        push (@foo, "booga googa");
        push (@foo, 42);
        print "@foo\n";
        [jrf@vela:~$] perl foo.pl 
        ooga wooga
        ooga wooga booga googa 42

The above is perfectly legal and of course quite useful.

Context also dictates that the actions of something later can affect the context of a word. In Perl, this can very easily be summarized:

        sub somesub {
                if ("somedir") {
                        return "somedir";
                } else {
                        return 1;

If the function is assigning a variable then that variable can have a totally different type of value depending on the circumstances. In truth, they are just bits and bytes of course and Perl magically translates the difference, semantically, however, they are two different types of data. Other Comparisons

Other programming languages can be laid side by side to metaphors. Object oriented programming is probably one of the most obvious programming language types that does so in a very literal sense. List Processing languages are based on recursive thought mechanisms (a simplification of course). Summary

To know something such as the difference between strict syntax and loose context can help a programmer to better understand why things work (or don't) the way they do.