PDA

View Full Version : Recommend me a book for learning the C programming language



PrimoTurbo
December 19th, 2009, 01:59 AM
I want to learn C to edit some quake3 code for a mod, what is a good book for beginners? Any suggestions?

Simon17
December 19th, 2009, 02:41 AM
Do you only need to learn the C language, or do you need to learn to program as well?

Frak
December 19th, 2009, 02:45 AM
If you don't know how to program, read this: http://www.pragprog.com/titles/ltp2/learn-to-program-2nd-edition

If you don't know how to program/concepts of programming ahead of time, C will be next to impossible to understand.

PrimoTurbo
December 19th, 2009, 02:46 AM
I want to learn to program in C, so I can read and edit the Quake3 source code. So far I can do some basics like edit speed of weapons and such, but I want to be able to read the code and understand how things function and be able to add various functions associated to gameplay not rendering or anything like that.

PrimoTurbo
December 19th, 2009, 02:48 AM
If you don't know how to program, read this: http://www.pragprog.com/titles/ltp2/learn-to-program-2nd-edition

If you don't know how to program/concepts of programming ahead of time, C will be next to impossible to understand.

I understand the basic of programming, I've taken a C++ course a while back but have forgotten most it. I need a modern beginners book to C.

But I will look into the book your provided.

Greg
December 19th, 2009, 02:53 AM
The C Programming Language. It's still the best book for learning C.

Note, I'm not being facetious- there's a book called The C Programming Language, also known as the K & R.

mIXpRo
December 19th, 2009, 02:58 AM
check this link www.mycplus.com (http://www.mycplus.com)

enjoy :)

phrostbyte
December 19th, 2009, 02:59 AM
the c programming language. It's still the best book for learning c.

Note, i'm not being facetious- there's a book called the c programming language, also known as the k & r.

++++++++++++++++++++++

:p

hobo14
December 19th, 2009, 03:03 AM
The C Programming Language. It's still the best book for learning C.

Note, I'm not being facetious- there's a book called The C Programming Language, also known as the K & R.

Agree.

Frak
December 19th, 2009, 03:04 AM
The C Programming Language. It's still the best book for learning C.

Note, I'm not being facetious- there's a book called The C Programming Language, also known as the K & R.
I don't recommend that book because it wasn't meant to be a learning book in the first place. It's a reference guide. It explains how things work, but in a very deep sense. It somewhat assumes you know B or Assembler.

mIXpRo
December 19th, 2009, 03:09 AM
I don't recommend that book because it wasn't meant to be a learning book in the first place. It's a reference guide. It explains how things work, but in a very deep sense. It somewhat assumes you know B or Assembler.


agree 100%

Greg
December 19th, 2009, 03:14 AM
I don't recommend that book because it wasn't meant to be a learning book in the first place. It's a reference guide. It explains how things work, but in a very deep sense. It somewhat assumes you know B or Assembler.

I learned C out of it with no real experience outside of FPLs.

phrostbyte
December 19th, 2009, 03:19 AM
The C Language has a pretty good tutorial chapter in it. It's worth noting the book was actually written by the inventors of the C language. But if you already know C++ I really doubt you need a book. C, with some exceptions (implicit pointer casting, for instance), is a subset of C++.

mIXpRo
December 19th, 2009, 03:33 AM
The C Language has a pretty good tutorial chapter in it. It's worth noting the book was actually written by the inventors of the C language. But if you already know C++ I really doubt you need a book. C, with some exceptions (implicit pointer casting, for instance), is a subset of C++.

plus file handling .:popcorn:

zero-n
December 19th, 2009, 03:47 AM
C++ from problem analysis to program design (http://www.amazon.com/Programming-Problem-Analysis-Program-Design/dp/1423902092)

Zoot7
December 19th, 2009, 10:12 PM
This is the one I used to teach myself C from the ground up. The only thing I knew before it was Assembler.
http://www.amazon.co.uk/Programming-Developers-Library-Stephen-Kochan/dp/0672326663/ref=sr_1_1?ie=UTF8&s=books&qid=1261257133&sr=8-1

MaxIBoy
December 19th, 2009, 10:43 PM
Practical C Programming by Steve Oualline, published by O'Reilly. I really cannot recommend this book enough.
http://oreilly.com/catalog/9781565923065

If you already know C++, you can skip the first three or four chapters.

There are also tons of Quake 3 tutorials out there which are worth reading up on. I recommend starting smaller than the Q3 codebase though, as it really is quite big. It's a lot of grepping for functions in different files and tracing codepaths in your head. Slightly easier to make a mod than it is to hack on the core engine itself, but still.

mivo
December 19th, 2009, 11:04 PM
If you don't know how to program, read this: http://www.pragprog.com/titles/ltp2/learn-to-program-2nd-edition

I second this. I actually "beta-read" the draft of the first edition before publication. Chris' style is very easy to follow and it's an entertaining, non-scary read for a broad audience.

Frak
December 19th, 2009, 11:13 PM
I second this. I actually "beta-read" the draft of the first edition before publication. Chris' style is very easy to follow and it's an entertaining, non-scary read for a broad audience.
I love the jokes within it.

cmat
December 20th, 2009, 12:01 AM
I learned C from Schaum's Outline of Programming C but the For Dummies series is awesome for absolute beginners. The unfortunate thing is that there are a million other concepts you need to learn in order to do work on the Quake 3 engine. I know C but I couldn't do anything spectacular with it.

Queue29
December 20th, 2009, 12:12 AM
\The unfortunate thing is that there are a million other concepts you need to learn in order to do work on the Quake 3 engine. I know C but I couldn't do anything spectacular with it.

QFT. Technically, C is a pretty simple language. But I hope you are dedicated, because it's going to be a looong time before you can understand what's going on in the Quake code.

phrostbyte
December 20th, 2009, 12:15 AM
QFT. Technically, C is a pretty simple language. But I hope you are dedicated, because it's going to be a looong time before you can understand what's going on in the Quake code.

True true.

For modding Q3, I'd start at this actually:
http://www.amazon.com/Concrete-Mathematics-Foundation-Computer-Science/dp/0201558025

(add this book in before Concrete Mathematics you don't know Calculus)
http://www.amazon.com/Calculus-Analytic-Geometry-8th-Larson/dp/061850298X/ref=sr_1_2?ie=UTF8&s=books&qid=1261265025&sr=1-2

Then this:
http://www.amazon.com/Linear-Algebra-Georgi-E-Shilov/dp/048663518X/

Then move on to something like this:
http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Development/dp/1584502770/

Then this:
http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321552628/


Good luck :)

Frak
December 20th, 2009, 12:22 AM
QFT. Technically, C is a pretty simple language. But I hope you are dedicated, because it's going to be a looong time before you can understand what's going on in the Quake code.
The problem with Quake is that the code is all kinds of "clever". "Clever" in the sense that it gets the job done with less code, but is difficult to read on first glance.

squilookle
December 20th, 2009, 01:09 AM
I learned C from Schaum's Outline of Programming C but the For Dummies series is awesome for absolute beginners. The unfortunate thing is that there are a million other concepts you need to learn in order to do work on the Quake 3 engine. I know C but I couldn't do anything spectacular with it.

+1 for the For Dummies books, even though I never used the one for C.

I do have Linux For Dummes, and the PHP/MySQL Desk Reference For Dummies.

I learned html properly from one too (i had dabbled with html before, but the w3c validator wouldn't have liked it... :) )

They tend to have and informal style and lot's of examples that make them easy and enjoyable to read. :)