 |
I am frequently asked what the best book is for learning one
topic or another in computers, computer science, or programming,
having read only a few hundred myself. Since these requests are
so common, I thought I might create my list of "best books" for
various topics. Each of the books below I can heartily recommend
because I have read each one and can directly quote most of them,
occasionally by page number.
Programming Languages
These books each discuss one specific programming language in depth.
Some are reference manuals, and some are introductory texts.
|
The C Programming Language |
K&R. If you claim to program in C
or C++ and you don't own or haven't read this book, then
you don't program in C or C++; you just think you do.
K&R is the de-facto source for everything C, and will teach
you more in its thin 272 pages than those thousand-page monster
books ever will. This book is worth every penny you'll pay for
it, and more.
Kernhigan, Brian W., and Dennis M. Richie.
The C Programming Language, 2nd ed.
Prentice Hall, 1988. ISBN 0-13-110370-9 or -8 (paperback).
|
| |
The Annotated C++ Reference Manual |
The ARM. In some ways, this is to C++ what K&R
is to C. Although this, being a reference manual, does not have any
introductory material for C++, it is invaluable if you work in C++
with any frequency. A new edition will hopefully be released
soon, now that C++ is finally standardized.
Ellis, Margaret A., and Bjarne Stroustroup.
The Annotated C++ Reference Manual.
Addison Wesley, 1997. ISBN 0-201-51459-1.
|
| |
Programming Perl |
The Camel Book. This is the
de-facto standard reference for Perl, written by Perl's
creator himself; if you want to learn Perl, this thick book
is the one you want. Although his style is occasionally too
"cute," the book is still very readable, especially if you
already know another programming language (like C).
Wall, Larry, Tom Christiansen, and Jon Orwant.
Programming Perl.
O'Reilly & Associates, 2000. ISBN 0-596-00027-8.
|
| |
8086/8088/80286 Assembly Language |
Scanlon's Books. Leo J. Scanlon
has written many books on PC assembly language, and while
his writing style is occationally inscrutable, and while the
books frequently have more printing errors than you'd ever like,
the books are still useful introductions. I preferred starting
with a simpler assembly (6502), but since nobody has computers
that speak 6502 anymore, these books are as good as you'll
get for introductions to assembly. I do recommend you find
a more recent title by Scanlon, though, because the venerable
'286 isn't used much anymore. On the other hand, this book
ought to be cheap if you can find a copy.
Scanlon, Leo J.
8086/8088/80286 Assembly Language.
Brady, a division of Simon & Schuster, 1988. ISBN 0-13-246919-7.
|
| |
| Lisp |
A big book by two MIT guys on a
very MIT language. Lisp has a lot to like and a lot to hate,
but every die-hard computer scientist ought to know it, like
it or not, because it will change the way you think
about computing. This book is one of the better introductions, providing
a lot of very interesting examples and problems.
Winston, Patrick Henry and Berthold Klaus Paul Horn.
Lisp, 3rd ed.
Addison-Wesley, 1997. ISBN 0-201-08319-1.
|
| |
Theory Books
These books discuss the mathematics and theory behind much of
computer science. In fact, many of these are the seminal works
that define computer science. If you're a serious programmer,
and want to learn what it means to be a computer scientist, you
should get, read, and study these books.
|
The Art of Computer Programming |
Knuth. Every list of "theory" books
should begin with Knuth. If you can read and understand everything
in these books you will know more than
most people who claim to be programmers. Knuth covers every
topic, but these are very dense reads: Expect a minimum of
a year of study for just a basic understanding of these.
Every computer scientist should just break down and buy
the boxed set, because it's worth it.
Knuth, Donald A.
The Art of Computer Programming.
Addison-Wesley, 1998.
ISBN 0-201-89683-4 (vol 1, 3rd ed --- "Fundamental Algorithms").
ISBN 0-201-89684-2 (vol 2, 3rd ed --- "Seminumerical Algorithms").
ISBN 0-201-89685-0 (vol 3, 2nd ed --- "Sorting and Searching").
|
| |
Introduction to Algorithms |
Big White. This book covers
many of the same topics that Knuth covers, but not in as great
a depth, and with fewer proofs, which leaves room for more
readable explanations. If you're new to programming, but you
know a language or two and want to put some new techniques under
your belt, you should buy and read this book. Even if you're
experienced, this book serves as a great reference tool for
a wide variety of topics (and I've used the bibliography more
than once too).
Cormen, Thomas H., Charles E. Leiserson, and Ronald L. Rivest.
Introduction to Algorithms.
MIT Press, 1994. ISBN 0-262-03141-8 (MIT Press) or ISBN 0-07-013143-0 (McGraw Hill).
|
| |
Discrete Mathematics with Applications |
This book contains much of the
basic mathematics used in nearly every other book listed on this
page; if you don't understand the math in Big White or Knuth,
read this book first. It assumes that you've had a course
or two in algebra, but nothing more.
Epp, Susanna.
Discrete Mathematics with Applications, 2nd ed.
PWS Publishing, 1995. ISBN 0-534-94446-9.
|
| |
Compilers: Principles, Techniques, and Tools |
The Dragon Book. This is the
best book out there on compiler design, even though it's showing
its age, and focuses on classic Pascal more than any modern language.
If you want to know anything about what happens between
your source code and machine language, you should read this book.
It's dense, but worth the purchase price.
Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman.
Compilers, Principles, Techniques, and Tools.
Addison-Wesley, 1988. ISBN 0-201-10088-6.
|
| |
| Design Patterns |
The Gang of Four's Book.
If you work in an object-oriented language, or work with
object-oriented code, you
should save yourself some headaches and buy this book. This
changes the way you think about objects and how they interact,
and introduced many object-oriented terms we take for granted these days (like
Pattern, Factory, and Singleton).
While not a substitute for programming practice, this book
will help you codify the concepts you use as you practice.
Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides.
Design Patterns: Elements of Reusable Object-Oriented Software.
Addison-Wesley, 1998. ISBN 0-201-63361-2.
|
| |
Introduction to Automata Theory, Languages, and Computation |
The Book from Hell.
This book explains why your computer works, inventing very
precise mathematics to describe it. It's thin and succinct, but
even reading a few pages will make your head hurt. This is
pure math, but if you're a serious computer scientist,
you should read and understand everything in here, because it
will make you look at the world differently (like if the human brain
is a computer, does that make it subject to the Halting Problem,
and if so, then is all of psychiatry doomed to failure?).
Hopcroft, John E., and Jeffrey D. Ullman.
Introduction to Automata Theory, Languages, and Computation.
Addison-Wesley, 1979. ISBN 0-201-02988-X.
|
| |
Programming Languages: Concepts and Constructs |
A good broad overview of
what programming languages are, how they work, and introductions
to each of the major categories of languages. If you only know
one or two languages, this book will definitely broaden your
horizons; while it doesn't teach you every language in depth, it
introduces you to everything you'll likely encounter.
Sethi, Ravi.
Programming Languages: Concepts and Constructs.
Addison-Wesley, 1996. ISBN 0-201-59065-4.
|
| |
| Garbage Collection |
If you're interested in
techniques of automatic memory management, this is a fascinating
book. Although the book's conclusions are not encouraging (garbage
collection will probably never be fast or efficient), it shows that GC can
be used effectively in a wide variety of projects, and details
a lot of otherwise obscure algorithms.
Jones, Richard, and Rafael Lins.
Garbage Collection.
Addison-Wesley, 1996. ISBN 0-471-94148-4.
|
| |
The Data Compression Book |
This is the best all-around
introduction to data compression, covering all the major
techniques in a reasonable degree of depth. One of its authors
is the creator of zlib, which is used for zip-style compression
in just about every program that offers zip-style compression.
The only thing that's lacking in this book is an in-depth look
into zip-compression itself, but even so, this book is worth
its cost.
Nelson, Mark, and Jean-Loup Gailly.
The Data Compression Book, 2nd ed.
M&T Books, 1996. ISBN 1-55851-434-1.
|
| |
Operating Systems: Design and Implementation |
Tanenbaum's Book. This is
a good introduction and overview to general operating system concepts.
Don't expect to see the internals of Windows here, but you can
expect an overview of all the concepts Windows should have been
built on. Note: Be sure to get the first edition.
The second edition is a very different book, and sacrifices
a lot of good talking space for page after page of pointless
source code. Tanenbaum thought he was helping the reader by
including the Minix source code, but it does little more than
waste trees.
Tanenbaum, Andrew S.
Operating Systems: Design and Implementation.
Prentice-Hall, 1993.
|
| |
Specific-Software and Specific-Hardware Books
These books target programming a specific piece of common
software or hardware or programming technique.
|
PC & PS/2 Video Systems |
Wilton's Book. A broad introduction
to the 2-D graphics systems used on PCs, discussing everything
from drawing a black dot to filling a chartreuse polygon.
I own the first edition; but the second appears to still cover
most of the first's contents, so it's probably okay to buy it.
Note that before you program 3-D graphics, you should really
understand 2-D well.
Wilton, Richard.
Programmer's Guide to PC & PS/2 Video Systems.
Microsoft Press, 1987. ISBN 1-55615-103-9.
|
| |
Programming Windows 95 |
Petzold. This is the de-facto
introduction to programming Windows in C, and while it skimps
on topics you wish they'd cover, it's still a good book to
keep on your shelf. If you want to learn real Windows
programming --- not Visual Basic or scripting --- you should
start with this book, or one of its later editions.
Petzold, Charles, and Paul Yao.
Programming Windows 95, 4th ed.
Microsoft Press, 1996. ISBN 1-55615-676-6.
|
| |
Advanced Programming in the Unix Environment |
Stevens. This is the de-facto
reference for programming Unix in C, and doesn't skimp on
anything. If you program Unix, skip the man pages and buy
this book; you'll be glad you did.
Stevens, W. Richard.
Advanced Programming in the Unix Environment.
Addison-Wesley, 1993. ISBN 0-201-56317-7.
|
| |
| The Undocumented PC |
Everything you wanted to know
about how the PC works, and are very afraid to ask. This
book covers everything you're not supposed to know about the
PC's hardware, and when you do know it, you'll wish you
didn't. In-depth details of all the major pieces of PC
hardware, including the keyboard, serial ports, disk system,
and CMOS. If you work with PC hardware programming, you
need this book.
Van Gilluwe, Frank.
The Undocumented PC.
Addison-Wesley, 1994. ISBN 0-201-62277-7.
|
| |
XML in Plain English |
A decent reference for XML
and all its children. If you're using XML for a project, you
ought to get this book, because while the introductory material
is skimpy (and located in the middle of the book), its
reference material is top-notch, and a lot faster than the W3C's web
site.
Eddy, Sandra E., with B.K. DeLong.
XML in Plain English.
M&T Books, 2001. ISBN 0-7645-4744-5.
|
| |
Windows 95 System Programming Secrets |
Lots and lots of stuff that
Microsoft would prefer you didn't know about how Windows works
--- and when you know, you'll wish you didn't. Pietrek takes
Win95 apart one DLL at a time, and shows how every corner of it
works. Highly recommended for any serious Windows programmer.
I've spent many entertaining hours reading the Windows assembly
code (with this book in hand) and grotesquely laughing at the
horrors I find.
Pietrek, Matt.
Windows 95 System Programming Secrets.
IDG Books, 1996. ISBN 1-56884-318-6.
|
| |
DOS Programmer's Reference |
While Windows gets all the press
these days, many people forget that DOS still lurks under the
hood. This book, a forerunner to Ralf Brown's Interrupt List,
details the internals of DOS, and many of the discussions are
still very useful. My copy is old, worn, and has duct-tape on
the spine just because of how frequently I used it back in the
days before Win95. I still occasionally use it now too, but
not as frequently as I once did.
Dettmann, Terry, with Jim Kyle.
DOS Programmer's Reference, 2nd ed.
Que, 1989. ISBN 0-88022-458-4.
|
| |
| Lex & Yacc |
Lex and Yacc are two of the most
powerful text-processing tools ever invented, and this book
discusses them better than any else out there, including the
various compiler-writing books. If you intend to write a compiler
or interpreter for any language of any kind, buy this book and
use Lex and/or Yacc, because you'll save yourself years of effort
over having done the lexical analysis and parsing yourself.
Levine, John R., Tony Mason, and Doug Brown.
Lex & Yacc.
O'Reilly & Associates, 1995. ISBN 1-56592-000-7.
|
| |
PNG: The Definitive Guide |
If you intend to work with PNG images,
buy this book. In fact, if you don't work with PNG images,
this book will tell you why you should. Anybody who does
graphics programming should read this book.
Roelofs, Greg.
PNG: The Definitive Guide.
O'Reilly & Associates, 1999. ISBN 1-56592-542-4.
|
| |
The X Window System Server |
This book is dated, and probably
out of print, but get it if you can. It provides an in-depth
analysis of the server part of X-Windows, and, in addition, if you
want to know how window systems work in general, from regioning
to surface validation, this is the only documentation out
there.
Israel, Elias, and Erik Fortune.
The X Window System Server.
Digital Equipment, 1992. ISBN 1-55558-096-3.
|
| |
Philosophy Books
These books each discuss a particular area of programming that is
hotly debated, often in "religious war" fashion. While not everybody
agrees on the solutions, people at least always agree on the problems.
These books are my favorites in the philosophy wars; they are concise,
smart, and above all propose good, practical solutions.
|
| About Face 2.0 |
Alan Cooper's followup to his classic
About Face, below. If you haven't read the original About Face yet,
buy this book yesterday and read it already. Personally,
I like the style in About Face better than in 2.0.
The new book is more organized, which is helpful for newbies, but while the first book was fuzzy and friendly,
the new one has a far more "corporate" and business-like feel: UI design is slowly transforming from art
to science, and this book reflects that change. The focus here has also shifted
from user-interface design to user-interaction design, the pet concept of Cooper's
company. User-interaction design is a neat concept,
and deserves further exploration, but I don't quite think it's mature enough
yet to have changed the focus of the book so heavily. I would rather have seen
more new case studies and less philosophy; the original book was built on a
solid foundation of examples, and while the new one has all the original examples, it
doesn't have many new ones, which is a real loss considering how much software
--- and how many bad examples --- have been generated in the eight years since
the first book.
Still, if you missed the original About Face, or you just want to
see where the state-of-the-art is in human-computer interaction, this book
is well worth your time.
Cooper, Alan.
About Face 2.0: The Essentials of User Interaction Design.
Wiley Publishing, 2003. ISBN 0-7645-26413.
|
| |
| About Face |
Alan Cooper's brilliant treatise
on crappy user interfaces. Every programmer should read this
book four or five times, and if they refuse, they should be physically
attacked with it until they agree. There are a lot of user-interface
design books out there, but few discuss the problem --- and real,
practical solutions --- as eloquently as this book does.
With not a single line of source code, this book is a pleasant
read for non-programmers as well.
Cooper, Alan.
About Face: The Essentials of User Interface Design.
IDG Books, 1995. ISBN 1-56884-322-4.
|
| |
The Inmates Are Running the Asylum |
Alan Cooper's equally brilliant followup
to About Face, this book explains to Management why they
should allow the programmers to follow the solutions given in
About Face. If you're a programmer, read this, and
get your boss to read it too.
Cooper, Alan.
The Inmates Are Running the Asylum.
Sams, 1999. ISBN 0-672-31649-8.
|
| |
Enough Rope to Shoot Yourself in the Foot |
Allen Holub's cute little book about
stylistic standards in C and C++. Although I frequently disagree
with his style, I agree with his message: Pick a good,
readable style, and stick to it. If you don't know
what a good, readable style is, buy this book and follow his.
Holub, Allen I.
Enough Rope to Shoot Yourself in the Foot.
McGraw-Hill, 1995. ISBN 0-07-029689-8.
|
| |
Writing Solid Code |
Although I do disagree with this book
in spots, its message is very good for beginning programmers.
Maguire covers a lot of stylistic issues that can quickly translate
into bug fixes, and while you can disagree with his conclusions,
you have to accept his premises. If you're new to C or C++,
get this book and save yourself from writing a lot of buggy code.
Maguire, Steve.
Writing Solid Code.
Microsoft Press, 1993. ISBN 1-55615-551-4.
|
| |
Apple II Books
You're probably wondering why this category is here. I have
included it because there are a few books that dealt with Apple II
programming that have no equal in the PC world, or the Mac world,
or anywhere else. Each of the books included below covers knowledge
you can't get anywhere else --- and unfortunately, they're all out
of print. But maybe if you hang around eBay, you can find a copy...
|
Assembly Lines: The Book |
Roger Wagner's elegant introduction
to 6502 assembly programming. This book covers assembly concepts
better than any other book I've read (and I've read about a half
dozen at last count), and its discussion of alternate numeric
bases is truly classic (I have it committed to memory, and have
reproduced the story here!).
Wagner, Roger.
Assembly Lines: The Book.
Roger Wagner, 1984. ISBN 0-927796-99-6.
|
| |
Apple II Reference Manual |
Apple's own documentation on the Apple II.
This documentation is more thorough than any released for any other
computer in history, even going so far as to include disassembly of
the ROM (!) and schematic diagrams and timing diagrams for the whole
computer (!!).
If you want to know what truly great documentation looks
like, look no further than this book.
Apple Computer, Inc.
Apple II Reference Manual.
Apple, 1981. Apple Part #A2L0001A (030-0004-C).
|
| |
| Beneath Apple DOS |
Before there was MS-DOS, there was
Apple DOS. The Apple II was unique in computer history in that it
was the only microcomputer that allowed software to directly
control the floppy drive. Because of this, if you understood DOS,
you also intimately understood disks, far more so than programmers
do today, even though the same concepts apply. This book detailed
not only how Apple DOS worked, but also how disk drives work from
a programmer's perspective, and that alone makes the first 25 pages
of this book invaluable.
Worth, Don, and Pieter Lechner.
Beneath Apple DOS.
Quality Software, 1985. ISBN 0-912985-00-3.
|
| |
Magazines
I've had subscriptions to a wide variety of computer magazines over
the years. Some have been useful, and some have been a total waste of
time. But there's one magazine that I keep coming back to, because it
has a consistent supply of useful and intelligent
articles. That one magazine is Dr. Dobb's Journal (of Computer
Calesthenics and Orthodontia: Running Light without Overbyte).
DDJ has been around since the 1970s, and has been consistently good
since its first day. I only rue that I don't own any back-issues from
the 1980s.
I've been a subscriber of other magazines. Here are some of them:
- C/C++ User's Journal sounded like
a good idea, since I spend most of my time in C or C++, but it consisted
of little more than religious flame war articles, language nitpicking,
and utter newbie dead space. Half the pages were for people who couldn't
put together two lines of code, and the other half was for people who
had nothing to do with their time but argue. I would rather focus on
technique, not tips and tricks, and tips and tricks were all I ever got
from this thing, in the few substantive articles I could find.
- MSDN Magazine I think
Microsoft may have lifted my name and address from somewhere, because I
started getting these out of the blue for a couple of years (and they
stopped just as suddenly). It reads like a Microsoft press release, and
that's the nicest thing I have to say about it.
- Windows::Developer Network Magazine
Admittedly, this magazine has a bias to it. I understand that. And
when I paid my $10 for a year's worth (cheap subscription!), I figured
it might still be useful information. After all, I program on Windows, use
the horrible Win32 API heavily, and a magazine dedicated to that environment
seemed like a useful addition. But I let the subscription lapse, because
if MSDN Magazine is the left arm of Microsoft's printed advertising,
this magazine is the right arm. It's got the occasional useful article,
which is infinitely more than MSDN Magazine will ever have. But in a year's
worth of subscribing, I've only used two things I ever read in it. No
details on things I deal with every day. No juicy tidbits on the Win32
API. The most interesting column is "Bug++ of the month", in which they
discuss a new bug found in some chunk of Microsoft's code (often in the
compiler), and all that column really teaches you is what parts of the
C++ compiler to avoid like the plague. Everything else is a lot of
rehashing of stuff that you can read in the standard Windows SDK help
that comes with every Microsoft compiler (and can be downloaded from
their web site), or it's stuff that is ancient history to me: this month,
their feature article is on "developing your own custom scrollbar"; I designed and
implemented my first scrollbar ten years ago in the days of DOS, and the
current scrollbar I use --- far more flexible than the one in the article
--- is one I wrote two years ago, its design based on one I wrote two
years before that.
- Game Developer Magazine Back in
1997, I got some photocopies of articles from 1996 issues of this magazine,
and I was intrigued. So I got a subscription. That lasted about a year:
Game Developer changed during the time I subscribed, and got thinner, and
thinner, and as it thinned, so did the code in it. By the time I cancelled
it, there was little left of substance for programmers. Now it tends to
focus on other aspects of game design, like art and plot and management.
Those are all interesting things, but not for a programmer. So I don't
subscribe anymore, but some people might find it interesting.
- Extra disappeared as fast as I got a subscription, back when
I was a kid.
- Byte imploded and no longer exists.
- Family Computing had code in the 1980s, but then it turned
into Family and Home Office Computing and then just Home Office
Computing. It's still around, but there hasn't been anything good
for programmers in there in over a decade.
- Compute! was a great magazine in its day, but it
changed its focus away from source code in the early '90s, and
eventually collapsed.
No doubt I've forgotten a few magazines, but that's not very
relevant. If you're interested in programming --- no matter what
language or target application --- subscribe to
DDJ and skip the others.
You'll be glad you did.
|
 |
Where do I start?
I would like to address this very common question,
a question that people who want to learn programming often
ask me. I feel very sorry for anybody
starting programming in these latter days when the bare metal of the
machine is obscured under a hundred layers of software,
so the answer must start with a question: How much do you really
want to know? If you want to be a serious computer scientist,
you have several years' work ahead of you; you will need to
learn several programming languages and a lot of new, very
strange concepts. If you want to write board-game programs
or web scripts, you can do that in six months or less, but
you will not earn the respect of the coding community or
of hard computer scientists. Knowledge is earned, and anybody
who tells you otherwise is trying to sell you something.
The best way to start --- if you're serious about
really understanding computers --- is to go to your local yard
sale, buy an old Apple II or Commodore 64, and track down
an old book (like from about 1985) on programming in BASIC.
Once you're adept at BASIC, learn 6502 assembly language
(books on this are harder to come by, but they do still exist),
and learn how to make your assembly programs interact with
your BASIC programs. Once you've got the basics covered,
switch to a modern PC, install Linux, and get a book on
programming in C. Learn C well, then you can safely dare
things like Windows C programming, safe in
knowing that you will understand it better than nearly everybody else
out there.
However, even though this is the best way to do it if you
really want to understand the machine, it's not feasible for
most people. So here's an alternate, somewhat easier set of
steps you can follow:
- Buy Visual Basic, install it, and learn the basic
concept of an iterative programming language.
- Install Linux. Learn to use it, because later on,
you'll be glad you did.
- Buy K&R. Study it, and try
every example on your new Linux (Unix) system.
Don't try to learn C++ until you really understand C;
you have to walk before you can run.
- Using C, write several (at least ten) small but significant programs
that do useful things for you (1000 to 2000 lines each).
Try to write programs that haven't already been written.
Try everything, and try to write programs that aren't in the
books. Practice counts more than study does.
Practice will teach you a hundred times more than
any book ever will. I've written at least a million
lines of code in my life, and I value that experience
more than my hundreds of books, and even more than
my college education --- practice makes a good programmer,
and nothing else can.
- Depending on your needs, learn C++, Perl, or assembly
language. You will be adequately prepared if you correctly
and fully followed the other four steps. Each of these
languages will teach you a lot of new
concepts. As with C, write several decent-sized programs
for practice (if learning Perl, you should increase
the number of programs, but shorten each one's length
by a lot).
Ideally, you should learn all three if you can get the
time.
- If you really want respect, learn the math and science
behind your art:
Learn discrete mathematics.
Study automata theory.
Learn Lisp or Scheme or Prolog.
Study compiler design.
Every one of these is a worthy exercise, and will
broaden your mind and give you knowledge far beyond
your peers.
That's it. Six steps, but they may take six years or more.
I've been doing this for 17 years now, and all that means is
that I know how much more there is to learn out there.
|
 |