tutes-dump/site-tutorials/unx/node8.html

245 lines
7.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2K.1beta (1.50)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>7. Programming</TITLE>
<META NAME="description" CONTENT="7. Programming">
<META NAME="keywords" CONTENT="unx">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="unx.css">
<LINK REL="next" HREF="node9.html">
<LINK REL="previous" HREF="node7.html">
<LINK REL="up" HREF="unx.html">
<LINK REL="next" HREF="node9.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html255"
HREF="node9.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="../img/latex2html/next.png"></A>
<A NAME="tex2html251"
HREF="unx.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="../img/latex2html/up.png"></A>
<A NAME="tex2html245"
HREF="node7.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="../img/latex2html/prev.png"></A>
<A NAME="tex2html253"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="../img/latex2html/contents.png"></A>
<A NAME="tex2html1"
HREF="../"><IMG
ALIGN="BOTTOM" SRC="../img/latex2html/root.png"
ALT="root">
</A>
<BR>
<B> Next:</B> <A NAME="tex2html256"
HREF="node9.html">8. Hacking</A>
<B> Up:</B> <A NAME="tex2html252"
HREF="unx.html">Introduction to Unix &amp;</A>
<B> Previous:</B> <A NAME="tex2html246"
HREF="node7.html">6. Super Dimension Fortress</A>
&nbsp <B> <A NAME="tex2html254"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A NAME="tex2html257"
HREF="#SECTION00810000000000000000">7.1 Language</A>
<LI><A NAME="tex2html258"
HREF="#SECTION00820000000000000000">7.2 Languages on SDF</A>
<LI><A NAME="tex2html259"
HREF="#SECTION00830000000000000000">7.3 Theory</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A NAME="SECTION00800000000000000000">
7. Programming</A>
</H1>
<P>
So you want to learn to program? Good. Programming is fun,
creative, &amp; fascinating. (It used to be a well-paying career, too. I
guess it still is, if you are in India or China.)
<P>
<H1><A NAME="SECTION00810000000000000000">
7.1 Language</A>
</H1>
<P>
There are billions &amp; billions of programming languages.
Well, not that many, but there's a damned lot.
<P>
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.
<P>
But I'm a bitter &amp; opinionated old programmer, so ignore
what I just wrote. Here's some actually useful information:
<P>
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, &amp;
there is no technical reason that C# won't work on unix.
Many other programming languages are available for unix.
Heck, many were developed <EM>on</EM> unix. So you can pick
pretty much whichever you want.
<P>
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, &amp; 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.
<P>
There are two books you need to do serious C programming.
<P>
The first is the original &amp; the classic <EM>The C
Programming Language</EM>, by Kernighan &amp; Ritchie
([<A
HREF="node11.html#kandr">aDMR88</A>]). Yeah, it's old &amp; 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&amp;R?
<P>
The second book you need for C programming is <EM>The
Standard C Library</EM>, by P. J. Plauger
([<A
HREF="node11.html#plauger:library">Pla92</A>]).
<P>
<H1><A NAME="SECTION00820000000000000000">
7.2 Languages on SDF</A>
</H1>
<P>
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.
<P>
<DIV ALIGN="CENTER">
<TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="RIGHT"><B>language</B></TD>
<TD ALIGN="LEFT"><B>pathname</B></TD>
</TR>
<TR><TD ALIGN="RIGHT">Bourne (or other)</TD>
<TD ALIGN="LEFT">/bin/sh</TD>
</TR>
<TR><TD ALIGN="RIGHT">C</TD>
<TD ALIGN="LEFT">/usr/bin/gcc</TD>
</TR>
<TR><TD ALIGN="RIGHT">C++</TD>
<TD ALIGN="LEFT">/usr/bin/g++</TD>
</TR>
<TR><TD ALIGN="RIGHT">Open Lisp (not Common)</TD>
<TD ALIGN="LEFT">/sys/pkg/uxlisp/uxlisp</TD>
</TR>
<TR><TD ALIGN="RIGHT">Perl</TD>
<TD ALIGN="LEFT">/usr/pkg/bin/perl</TD>
</TR>
<TR><TD ALIGN="RIGHT">Python</TD>
<TD ALIGN="LEFT">/usr/pkg/bin/python</TD>
</TR>
</TABLE>
</DIV>
<P>
To learn a language, I recommend studying at least one book,
not just online sources.
<P>
<H1><A NAME="SECTION00830000000000000000">
7.3 Theory</A>
</H1>
<P>
Obtain, read, &amp; understand a book about data structures.
Learn it &amp; learn to love it. Data structures separates the
scripters from the programmers.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html255"
HREF="node9.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="../img/latex2html/next.png"></A>
<A NAME="tex2html251"
HREF="unx.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="../img/latex2html/up.png"></A>
<A NAME="tex2html245"
HREF="node7.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="../img/latex2html/prev.png"></A>
<A NAME="tex2html253"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="../img/latex2html/contents.png"></A>
<A NAME="tex2html1"
HREF="../"><IMG
ALIGN="BOTTOM" SRC="../img/latex2html/root.png"
ALT="root">
</A>
<BR>
<B> Next:</B> <A NAME="tex2html256"
HREF="node9.html">8. Hacking</A>
<B> Up:</B> <A NAME="tex2html252"
HREF="unx.html">Introduction to Unix &amp;</A>
<B> Previous:</B> <A NAME="tex2html246"
HREF="node7.html">6. Super Dimension Fortress</A>
&nbsp <B> <A NAME="tex2html254"
HREF="node1.html">Contents</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Gene Michael Stover
2005-07-07
</ADDRESS>
</BODY>
</HTML>