Skip to content

Commit

Permalink
First cut of the Ex0 ininstructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
zedshaw committed Sep 1, 2011
1 parent 081793d commit 5f8e03b
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion ex0.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
\chapter{Exercise 0: The Setup}

This is how you setup your computer to work through this book.
In this chapter you get your system setup to do C programming. The
good news for anyone using Linux or Mac OSX is that you are on a
system designed \emph{for} programming in C. The authors of the
C language were also instrumental in the creation of the Unix operating
system, and both Linux and OSX are based on Unix. In fact, the install
will be incredibly easy.

I have some bad news for users of Windows: learning C on Windows
is painful. You can write C code for Windows, that's not a problem.
The problem is all of the libraries, functions, and tools are just
a little "off" from everyone else in the C world. C came from
Unix and is much easier on a Unix platform. It's just a fact
of life that you'll have to accept I'm afraid.

I wanted to get this bad news out right away so that you don't
panic. I'm not saying to avoid Windows entirely. I am however
saying that, if you want to have the easiest time learning C, then
it's time to bust out some Unix and get dirty. This could also
be really good for you, since knowing a little bit of Unix will
also teach you some of the idioms of C programming and expand
your skills.

This also means that for everyone you'll be using the
\emph{command line}. Yep, I said it. You've gotta get in there and
type commands at the computer. Don't be afraid though because
I'll be telling you what to type and what it should look like,
so you'll actually be learning quite a few mind expanding
skills at the same time.

\section{Linux}

On most Linux systems you just have to install a few packages. For
Debian based systems, like Ubuntu you should just have to install
a few things using these commands:

\begin{code}{Installing Requirements On Ubuntu}
\begin{Verbatim}
$ aptitude install build-essential
\end{Verbatim}
\end{code}

The above is an example of a command line prompt, so to get to where
you can run that, find your "Terminal" program and run it first. Then
you'll get a shell prompt similar to the '\$' above and can type that
command into it. \emph{Do not type the '\$', just the stuff after it.}

Once you've run that, you should be able to do the first Exercise in
this book and it'll work. If not then let me know.


\section{Mac OSX}

On Mac OSX the install is even easier. First, you'll need to either
download the latest \ident{XCode} from Apple, or find your install
DVD and install it from there. The download will be massive and could
take forever, so I recommend installing from the DVD. Also, search
online for "installing xcode" for instructions on how to do it.

Once you're done installing XCode, and probably restarting your computer
if it didn't make you do that, you can go find your Terminal program
and get it put into your Dock. You'll be using Terminal a lot in
the book, so it's good to put it in a handy location.


\section{Windows}

For Windows users I'll show you how to get a basic Ubuntu Linux system up and
running in a virtual machine so that you can still do all of my exercises, but
avoid all the painful Linux installation problems.


0 comments on commit 5f8e03b

Please sign in to comment.