473,760 Members | 9,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

just got myself a copy of K&R...

and so far I'm loving it, I like the the authors don't beat
around the bush and just come straight out and say what the book
is sopposed to be. They assume the you have computer experience.

I'm loving the exercises they really leave you with a sense of freedom
to do what you want, just follow the rules.

Just a little rant, I would definitely recommend this book
to anyone interested in C. Great addition to anyones library.

cheers....
Nov 13 '05 #1
42 2534
Andy <ma******@bells outh.net> wrote in message news:<jJ******* ***********@big news5.bellsouth .net>...
and so far I'm loving it, I like the the authors don't beat
around the bush and just come straight out and say what the book
is sopposed to be. They assume the you have computer experience.
Precisely. K&R is an example of what a technical book should be: No
digressions, no pandering to those who are not the target audience
(programmers should know how to use a computer already, IMNSHO), and
plenty of good examples and clear statements of the rules (that is,
you aren't left trying to figure out which parts of an example
illustrate which rules, and you don't mistake nonstandard things the
author does for good programming).

I'm loving the exercises they really leave you with a sense of freedom
to do what you want, just follow the rules.
And that is what programming is, largely: Following the rules and
creating something within those rules. K&R lays out the rules so well,
you can use it as a reference manual later on, after you've learned
the language from it. I've found it a book that ages well, as opposed
to some more beginner-level texts that are largely worthless once
you've moved on.

Just a little rant, I would definitely recommend this book
to anyone interested in C. Great addition to anyones library.


I agree. Others will be along shortly with more books to recommend
you. ;)

The ACCU (Association of C & C++ Users) has some good book reviews on
their site, and not just on books about C & C++. Here is their book
review index:

http://www.accu.org/bookreviews/public/index.htm
Nov 13 '05 #2
"August Derleth" <li************ ***@yahoo.com> wrote in message
news:b6******** *************** *@posting.googl e.com...

[...]
I've found it a book that ages well, as opposed
to some more beginner-level texts that are largely worthless once
you've moved on.


When I first started getting into the world of programming, I thought the
key to learning any language was to learn every single function and operator
and remembering how they are used (I was no more then 10 or 11 years old at
the time). K&R is great because, like any good book, it doesn't just throw
out a bunch of examples without explaining why they work. K&R makes no
attempt to explain all the functions of the standard library because it
starts from the ground up, explaining the rules of the language enough to
let the programmer decide for his or herself what should be used and when.
Writing functions of my own at the time seemed like some so far, out of this
galaxy, topic that I had never even thought I could ever learn how.

The problem with a lot of the beginner level books is that they lead you to
the same frame of mind that had plagued me in the beginning. If there
wasn't a chapter in the book dedicated to my specific task, I didn't know
how to "program" --or was it copy ;-)-- it. It's been a long day so I'm
probably not making sense anymore but what I'm trying to say is that at some
point, if a person really wants to learn how to program, the "For Dummy"
books just won't suffice. And you won't believe how many people refuse to
accept this. I've had friends that have read the Microsoft _By_ _Example_
books and knew nothing after completing the book; yet, swore they did. Ask
them to do anything that isn't in the book and they'll either swear that it
can't be done or attempt to learn how by getting another book of the same
kind. Before you know it, the dumbest person at work has the largest book
colection, reads all of them and doesn't get any smarter.

Have fun,

Sean
Nov 13 '05 #3
August Derleth wrote:
Andy <ma******@bells outh.net> wrote in message
news:<jJ******* ***********@big news5.bellsouth .net>...
and so far I'm loving it, I like the the authors don't beat
around the bush and just come straight out and say what the book
is sopposed to be. They assume the you have computer experience.


Precisely. K&R is an example of what a technical book should be: No
digressions, no pandering to those who are not the target audience
(programmers should know how to use a computer already, IMNSHO), and
plenty of good examples and clear statements of the rules (that is,
you aren't left trying to figure out which parts of an example
illustrate which rules, and you don't mistake nonstandard things the
author does for good programming).

I'm loving the exercises they really leave you with a sense of freedom
to do what you want, just follow the rules.


And that is what programming is, largely: Following the rules and
creating something within those rules. K&R lays out the rules so well,
you can use it as a reference manual later on, after you've learned
the language from it. I've found it a book that ages well, as opposed
to some more beginner-level texts that are largely worthless once
you've moved on.

Just a little rant, I would definitely recommend this book
to anyone interested in C. Great addition to anyones library.


I agree. Others will be along shortly with more books to recommend
you. ;)

The ACCU (Association of C & C++ Users) has some good book reviews on
their site, and not just on books about C & C++. Here is their book
review index:

http://www.accu.org/bookreviews/public/index.htm


thanks for the reply.
glad you agree
great website.

also just a little question.
allot of his examples have the line

while ((c = getchar()) != EOF)
how would input in C equal EOF.

thanks again.

Nov 13 '05 #4
"Fao, Sean" <en**********@y ahoo.comI-WANT-NO-SPAM> wrote in message news:<Qb******* **********@news .abs.net>...
"August Derleth" <li************ ***@yahoo.com> wrote in message
news:b6******** *************** *@posting.googl e.com...

[...]
I've found it a book that ages well, as opposed
to some more beginner-level texts that are largely worthless once
you've moved on.
When I first started getting into the world of programming, I thought the
key to learning any language was to learn every single function and operator
and remembering how they are used (I was no more then 10 or 11 years old at
the time).


Yeah, a common mistake. I think it derives from the elementary-level
schools focusing on rote memorization instead of problem-solving.
While rote memorization is useful in programming, it certainly doesn't
aid the learning of the language beyond a certain level.
K&R is great because, like any good book, it doesn't just throw
out a bunch of examples without explaining why they work. K&R makes no
attempt to explain all the functions of the standard library because it
starts from the ground up, explaining the rules of the language enough to
let the programmer decide for his or herself what should be used and when.
Yep. The Standard Library is presented as something most programmers
will always see it as: A `magical' group of subroutines and magic
numbers you can call upon after including certain header files. It is
presented simply as-needed, with the appendix in the back giving a
short description of all of them in turn.

Which I think is the best possible way to present the Standard Library
to a new programmer.
Writing functions of my own at the time seemed like some so far, out of this
galaxy, topic that I had never even thought I could ever learn how.
Heh. Very little in programming is magical. Some of it is esoteric and
badly-documented, some of it is very complex, and some of it is truly
difficult to understand, but little of it is not doable by someone who
will invest the effort in learning it.

And creating subroutines in C is certainly none of the above, except
doable. ;)

The problem with a lot of the beginner level books is that they lead you to
the same frame of mind that had plagued me in the beginning. If there
wasn't a chapter in the book dedicated to my specific task, I didn't know
how to "program" --or was it copy ;-)-- it.
That's right. That's why books on programming must be written by
people who are generally intelligent and /do/ have a deep
understanding of how to put the tricks of the language in context.
Otherwise, it will be trained seals teaching contextless tricks to
other trained seals.
It's been a long day so I'm
probably not making sense anymore but what I'm trying to say is that at some
point, if a person really wants to learn how to program, the "For Dummy"
books just won't suffice.
The "For Dummy" books are just that: For dummies. ;) Anyone who can
gain a deep understanding of a problem will be left behind by the
sheer ineptness of the texts.

But think about this: As complex as good programming is, what does the
sales of the "<Programmi ng Topic> For Dummies" books mean for the
industry as a whole?
And you won't believe how many people refuse to
accept this. I've had friends that have read the Microsoft _By_ _Example_
books and knew nothing after completing the book; yet, swore they did.
Hell, I know people who didn't read that book, don't know jack shit,
and still insist they're intelligent.

It isn't all the book's fault.

<big_grin>
Ask
them to do anything that isn't in the book and they'll either swear that it
can't be done or attempt to learn how by getting another book of the same
kind.
And that, my friend, is why software book publishers always look so
happy.

And why tech support people always want to price high-powered
handguns.
Before you know it, the dumbest person at work has the largest book
colection, reads all of them and doesn't get any smarter.
Nice of the morons to give us clues like that. I'll know who not to
bother in the future.

Have fun,
Sean


Happy hacking,

August
Nov 13 '05 #5
On 6 Nov 2003 12:07:36 -0800, August Derleth <li************ ***@yahoo.com> wrote:


Andy <ma******@bells outh.net> wrote in message news:<jJ******* ***********@big news5.bellsouth .net>...
and so far I'm loving it, I like the the authors don't beat
around the bush and just come straight out and say what the book
is sopposed to be. They assume the you have computer experience.


Precisely. K&R is an example of what a technical book should be: No
digressions, no pandering to those who are not the target audience
(programmers should know how to use a computer already, IMNSHO)


K&R assumes that you already know how to program in another language,
which is quite a different thing from "knowing how to use a computer".

--
Alan C this post ends with w
q
Nov 13 '05 #6
Andy wrote:
allot of his examples have the line

while ((c = getchar()) != EOF)
how would input in C equal EOF.


It wouldn't, ever. EOF is what happens when there is no more input.

Imagine this. A friend asks you to pull one numbered ball at a time from a
bucket.

He asks, "What have you got?" You reply "19". He makes a note somewhere.
He asks, "What have you got?" You reply "37". He makes a note somewhere.
He asks, "What have you got?" You reply "12". He makes a note somewhere.
He asks, "What have you got?" You reply "22". He makes a note somewhere.
He asks, "What have you got?" You reply "24". He makes a note somewhere.
He asks, "What have you got?" You reply "41". He makes a note somewhere.
He asks, "What have you got?" You reply "7". He makes a note somewhere.

Then he asks, "What have you got?", and you have a look in the bucket, but
there's nothing left.

You reply "We seem to have run out".

He says "How on earth can there be a ball with 'We seem to have run out'
written on it?"

How would you answer him?

Do you now understand EOF?

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #7
Richard Heathfield wrote:
Andy wrote:
allot of his examples have the line

while ((c = getchar()) != EOF)
how would input in C equal EOF.


It wouldn't, ever. EOF is what happens when there is no more input.


This is the intent, but I think it is not guaranteed, nevertheless.

for (;;) {
c = getchar();
if (feof(f) || ferror(f)) break;
...
}

Jirka

Nov 13 '05 #8
Richard Heathfield wrote:
Andy wrote:
allot of his examples have the line

while ((c = getchar()) != EOF)
how would input in C equal EOF.


It wouldn't, ever. EOF is what happens when there is no more input.

Imagine this. A friend asks you to pull one numbered ball at a time from a
bucket.

He asks, "What have you got?" You reply "19". He makes a note somewhere.
He asks, "What have you got?" You reply "37". He makes a note somewhere.
He asks, "What have you got?" You reply "12". He makes a note somewhere.
He asks, "What have you got?" You reply "22". He makes a note somewhere.
He asks, "What have you got?" You reply "24". He makes a note somewhere.
He asks, "What have you got?" You reply "41". He makes a note somewhere.
He asks, "What have you got?" You reply "7". He makes a note somewhere.

Then he asks, "What have you got?", and you have a look in the bucket, but
there's nothing left.

You reply "We seem to have run out".

He says "How on earth can there be a ball with 'We seem to have run out'
written on it?"

How would you answer him?

Do you now understand EOF?

Right, so pretty much all of the example programs will run for as long
as you can input, cause there is nothing you can put in to make it
EOF. I've had to modify the example programs with something like

if ((c = getchar()) == -1)
break;

or something like that, to actually stop
the execution of the program.

is there a better way around this?
Nov 13 '05 #9
Alan Connor wrote:
On 6 Nov 2003 12:07:36 -0800, August Derleth <li************ ***@yahoo.com> wrote:

Andy <ma******@bells outh.net> wrote in message news:<jJ******* ***********@big news5.bellsouth .net>...
and so far I'm loving it, I like the the authors don't beat
around the bush and just come straight out and say what the book
is sopposed to be. They assume the you have computer experience.
Precisely. K&R is an example of what a technical book should be: No
digressions , no pandering to those who are not the target audience
(programmer s should know how to use a computer already, IMNSHO)

K&R assumes that you already know how to program in another language,
which is quite a different thing from "knowing how to use a computer".

I wouldn't say that. Unless I missed it, neither did the authors. K&R
is very basic and straight forward. It sais in <300 what others take1500 pages to say, and it does it well. I remember as a beginner that

was the only book that really made much sense to me.

--
Noah Roberts
- "If you are not outraged, you are not paying attention."

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4297
by: Naren | last post by:
Hello All, I get an unexpected behaviour for this class D{ /*something*/ }; class B
4
2248
by: xuatla | last post by:
Hi, How to copy a pointer to another pointer? Can I do in the following way: // START double *copyfrom = new double; double *copyto = new double;
1
1744
by: Adam | last post by:
Why does this compile: if (err != Socket::errSuccess) { switch (err) { case Socket::errTimeout: ConnectionIOException cio(new string(myTCPStream->getErrorString()), ConnectionIOException::TIMEOUT); throw cio; default:
10
10720
by: ambar.shome | last post by:
Dear All, Whats the difference between a copy constructor and assignment operator. We can assign the values of member variables of one object to another object of same type using both of them. Then where is the difference?
6
3082
by: GaryDave | last post by:
My school registration database has not been quite right after a recent compact and repair (done while I was away). Though most of the many forms and subforms are working normally, one form in particular will no longer allow new entries into the subform - the recordset of the underlying query is no longer updatable. The subform in question enters the identity and other vital info for children whose parent's ID provides the FK, linking...
1
1707
by: Tomomichi Amano | last post by:
Hello. I was wondering how to paste-copy-cut-delete at a SELECTED SPOT in a textBox. Thanks in advance.
6
2629
by: NuB | last post by:
I have a winform and a menu on the form, It allows the users to copy and paste text from text boxes. I never had to do this before, how can I copy and paste text from one box to another?
0
1293
by: Charles Miller, Jr. | last post by:
I have an ASPX webform that needs the &copy; entity in it, which is easy enough, but when I edit the form, etc, Visual Studio changes it to the actual character, not the entity code, which ends up rendering as Â&copy;. Is there a way to either force it to render properly the actual character, or to stop it from rewriting my code for me? Sorry to ask, since I'm sure it's a common problem, but I've searched the web, but can't come up with...
0
3215
by: Taxman | last post by:
Windows XP, MS Office Excel 2003 If the tasks, I’m trying accomplish have been addressed previously (separately or in combination). Please, provide the links or keyword search to find them. I’ve been searching for code for each part of the task separately and trying to piece together multiple macros, that do something similar, to what I’m trying to accomplish in my over all task, but I’m not having a lot of luck. So, here’s the entire task,...
0
10107
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8768
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.