[sf-lug] Tutor me in Programming?

Doug Bierer doug at unlikelysource.com
Sat Sep 6 22:27:48 PDT 2008

CAVEAT: $0.02 from another working Joe programmer

I found it most helpful to learn certain basic concepts.  These are
things which are common to all computer languages (with the possible
except of ... FORTH ... but we won't go there :-):

1.  Variables
What is a variable? In hard core terms, it's a memory storage location.
In layman's terms, it's a name which represents a value which can change
(i.e. "vary").  Variables can also be extended into lists which are
known as "arrays".  This is handy when you have groups of values, such
as month names, or weekly totals for the year 2008, etc.

2.  Data Types
How the computer actually handles the information you have passing back
and forth.  To put it at its simplest: numbers and letters.  Numbers are
further broken down ad infinatum into things like integers, floating
point, decimal, etc.  Letters are most often referred to as "strings" or
"characters".  You can add numbers, but you can only
"concatenate" (append one string to another) strings.  There's also a
whole art and science to manipulating strings.

3.  Flow Control
This includes setting up some sort of testing of the values of
variables.  The simplest of this sort of thing is "if" and "then".  If
you want to get more complicated, there is also an "else" clause.  Most
programming languages include some way to "loop" the program until some
condition is met.  Examples of this include "while" and "until".
Finally, there is a way of "iterating" through a set of values
(especially when going through an array).

Many new languages, and some older ones, use a concept called "object
oriented".  This concept is actually pretty old.  PL/I, an IBM
programming language used in the 1960s, had something called a
"structure."  This was also true to some extent in "C" language.
Anyhow, the idea behind OOP (i.e. Object Oriented Programming) is to
group similar sets of logical code and data together into blocks which
can then easily be moved around and transported.

Once you get a handle on these 3 concepts, you should then be able to
start seeing what's going on with any particular language.  There's also
the entire art and science of designing a nice user interface, file
manipulation, and "web 2.0."

To get started, pick a language you want to learn.  Learn how to do the
"Hello World" program for that language.  Find examples of code (i.e.
open source), and pick through them.  Tweak the code and see what breaks
when you do things to it.  Figure out how to make it work again.  Make
mistakes ... just don't do that on the customer's time or on a
production server!!!  Linux has tons of great programming tools to make
your life easier.

Hope this helped a little bit!


On Sat, 2008-09-06 at 20:46 -0700, Jeff Bragg wrote:
> +1 for Jim's advice.
> I write code for a living, and that's essentially what's it's about
> (background note: I do not have any significant collegiate background
> in CS or Mathematics, and no formal exposure to algorithms).  Know (or
> learn) the problem domain, and the essential steps to create the
> solution.  Once they are understood representationally (in one's own
> mental spaces), expressing the solution in any language becomes much
> more tractable, and less prone to logical missteps.  You can always
> look into formal algorithms if you feel the need to optimize or
> otherwise re-factor (or simply for didactic reasons).
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20080906/42d9782c/attachment.html>

More information about the sf-lug mailing list