Good books for learning C language.

I believe books when they say they teach c they should stick to standard c. Platform speific issues should be left to platform specific books. Atleast they should say what's std c and what's not, so that I know what's portable and what's not. One of the most important goals of c was to creat a programming language which could be used to write portable code, even portable system level code.

You haven't answered my other points.

In "Let us C" or similar books they say there are two argument passing mechanisms which is just plain wrong. c++ has but c doesn't.

Understanding arrays properly is crucial for lower level code and their relation with pointers. That's wrongly discused in "Let us C". Read Ritchie then read Kanetkar on that and see for yourself. Confusion here leads to incorrect understanding of multidimensional arrays and pointer to pointers.

Hardly discusses and uses manual memory management(balu garu doesn't use free for some reason.

These are pretty basic things, I am not talking about structure padding, boundary alignment, what's exactly the value of null pointer or sequence points. Basics should be discussed properly.

Just because your MCA students think they got it, doesn't mean they actually got it. How do you decide whether somebody is wriing good code or not? I would like to quote Martin Flowler here "Even a fool can write a program which a machine understands, good programmers write code which humans can understand".

And the code which I have written previously is from the most important section of K&R. That's where I thought, "now I understand c better".

Do consider reading this Bjarne's interview. You might find it related.

Technology Review: The Problem with Programming

You seem to be laughing at kanetkar's joke, still recommending it :)

Just curious. Did you read K&R?
 
>>In "Let us C" or similar books they say there are two argument passing mechanisms which is just plain wrong. c++ has but c doesn't.

I understand where you are pointing too,

Though kanitakar said C has pass by value and pass by reference, it actually is same in C cause when you are actually doing pass by reference in C using pointer, you are actually doing a pass by value as target function will have his own separate pointer. where as in C++ they introduced references.

I believe it always was a debatable issue though in community.

>>Hardly discusses and uses manual memory management(balu garu doesn't use free for some reason.

I did not get it, can you elaborate?

>>Just because your MCA students think they got it, doesn't mean they actually got it. How do you decide whether somebody is wriing good code or not?

How can *you* tell they didn't got it. :) you can not, neither can I unless we saw how they approach to a certain problem with their C knowledge.

>>I would like to quote Martin Flowler here "Even a fool can write a program which a machine understands, good programmers write code which humans can understand".

They are famous guys, you can quote them but don't believe them, stick to your mind and you'll win. Remember Tannenbom said that "linux is obsolete" and linus said "good programmer does not need debuggers".

None of them is true, not in my community at least.

>>Just curious. Did you read K&R?

It was one of our text book and my teacher was infamous to deduct marks if you say something which is not from the book. :) but than its almost 9-10 years. I don't think I have read any programming book in last 5 years. pretty much OS specific stuff now days. though I can surly look in to it as I still have a copy of it.

Edit:

>>I believe books when they say they teach c they should stick to standard c. Platform speific issues should be left to platform specific books. Atleast they should say what's std c and what's not, so that I know what's portable and what's not. One of the most important goals of c was to creat a programming language which could be used to write portable code, even portable system level code.

As I said they should change the name of let us c to programming C in Dos.

>>You seem to be laughing at kanetkar's joke, still recommending it

What you quoted was (structure and clsscr) was amazing. Can you tell me which edition it was and in which chapter. I believe the book was not this funny those days and wonder who is editing it now days.

I have nothing +or - for kanitkar. What ever is bad I'll say it is and what ever is good, I'll say it is. not that loud though.

Anyways its good to discuss with you, we in our team rarely discuss language, so it was kind of fresh.

good luck
 
adi_vastava said:
In "Let us C" or similar books they say there are two argument passing mechanisms which is just plain wrong. c++ has but c doesn't.

I understand where you are pointing too,

Though kanitakar said C has pass by value and pass by reference, it actually is same in C cause when you are actually doing pass by reference in C using pointer, you are actually doing a pass by value as target function will have his own separate pointer. where as in C++ they introduced references.

I believe it always was a debatable issue though in community.

You mean to suggest the creator of the language doesn;t know what his language supports. Pretty strange :(.

>>Hardly discusses and uses manual memory management(balu garu doesn't use free for some reason.

I did not get it, can you elaborate?

Didn't get it? Leave it.

>>Just because your MCA students think they got it, doesn't mean they actually got it. How do you decide whether somebody is wriing good code or not?

How can *you* tell they didn't got it. :) you can not, neither can I unless we saw how they approach to a certain problem with their C knowledge.

You doesn't seem to get my point. It's you who said that they got it from Kanetkar. I said how does one know they got it. I didn't suggest, I knew they didn;t get it.

Anyway if I see code which uses Ritchie's idioms, I know he is pretty much on the right path. That's what idioms are for.

>>I would like to quote Martin Flowler here "Even a fool can write a program which a machine understands, good programmers write code which humans can understand".

They are famous guys, you can quote them but don't believe them, stick to your mind and you'll win. Remember Tannenbom said that "linux is obsolete" and linus said "good programmer does not need debuggers".

None of them is true, not in my community at least.

You seem to suggest you are more intelligent than all these guys, and you are ready to believe Kanetkar but not Fowler, Ritchie, Bjarne. :(

I completely agree with Tanenbaum, linux as a monolithic architecture is obselete, they today make use of modular architecture very similar to micro kernel architecture(but not very close to it. This is debatable).

And I completely again agree with Linus Torvalds. Good programmers don't need debuggers. You have every right to disagree.

If you are working in a company, then you know for sure majority are fools and they do write tons of code. You could for example atleast consider me in that category :) Disagreeing with that is strange. I hope you read Bjarne's interview.

>>Just curious. Did you read K&R?

It was one of our text book and my teacher was infamous to deduct marks if you say something which is not from the book. :) but than its almost 9-10 years. I don't think I have read any programming book in last 5 years. pretty much OS specific stuff now days. though I can surly look in to it as I still have a copy of it.

That give a good indication to me about what you are saying and why you are saying that. I know, you aren't interested in taking my suggest, still I strongly suggest you to go through the whole book again. That should help anybody. I read it cover to cover many times, and each time I discover new insights. (perhaps, because I am dumb not to get it in one reading)

Edit:

>>I believe books when they say they teach c they should stick to standard c. Platform speific issues should be left to platform specific books. Atleast they should say what's std c and what's not, so that I know what's portable and what's not. One of the most important goals of c was to creat a programming language which could be used to write portable code, even portable system level code.

As I said they should change the name of let us c to programming C in Dos.

Change the title, and read it?

>>You seem to be laughing at kanetkar's joke, still recommending it

What you quoted was (structure and clsscr) was amazing. Can you tell me which edition it was and in which chapter. I believe the book was not this funny those days and wonder who is editing it now days.

I don't have the book, that's somewhere around 2002 and if you read the book which contained dos code, then sure it will have in structures chapter. There he meant that you could fill REGS structure and invoke int86 to clear screen.

I have nothing +or - for kanitkar. What ever is bad I'll say it is and what ever is good, I'll say it is. not that loud though.

You are experienced enough to + and -, beginner wouldn't be. I myself read it after learning c from K&R. I didn't become a bad programmer.

Anyways its good to discuss with you, we in our team rarely discuss language, so it was kind of fresh.

good luck

Thanks :).

I believe you are arguing for just argument sake, and not trying to understand my point. You are defending everythin from Kanetkar, trying to suggest he's a good author and most stuff is decent and suggesting Ritchie, Bjarne, Fowler and Torvalds are wrong. I don't get that.

Anyway it's too much of time I spent on this, I would say I rest my argument. Do correct all my wrongs.
 
>>you mean to suggest the creator of the language doesn;t know what his language supports. Pretty strange

Nothing like that, He was the one, it belongs to him and indeed Kanikar has misguided this thing. When I say debatable I just meant that few technologist debated on whether passing pointer should be treated as pass by value or can be treated as pass by reference.

>>Didn't get it? Leave it.

I have not read Bala, though I just checked Kanitkar and surprisingly he does not talk about it. (Though I was sure he does,i mean how can he miss it? :S) Now I better admit that this guy missed things, nice observation :cool2:. In that case I believe you were correct on him and I probably mixmy other studies and Let us C. Thanks for correction.

>>You seem to suggest you are more intelligent than all these guys, and you are ready to believe Kanetkar but not Fowler,

No I am not, is somehow it appears like that than it must be the language I used & you interpreted. How can I (or any one) compare with them. Regarding their what they said, things have different meaning in different contexts and scenario. SO An idiom may suits you perfectly, and may not suit me at all.

>>If you are working in a company, then you know for sure majority are fools and they do write tons of code. You could for example atleast consider me in that category Disagreeing with that is strange. I hope you read Bjarne's interview.

yes I do. You look are looking at things from your window(not MS :)) only, though there a lot more exist than that. Now days we fix all application compatibility issues, be it MS apps, Adobe Apps or any other XYZ app. As soon as we found some issue when they are running in our Virtual environment we open them in windbg and try to read their code in assembly & than see what can we do in our code to fix that. Kind of replicating NT layer for them in virtual environment. So you can clearly see the work involves more debugging and assembly reading than coding, isn't it? And when I say linus saying do not hold true I also said at least in my community.

Surly I understand your point and agree to that as 1-2 years back, I was in same league. I haven't read the interview, though I'll surly look into that. If you are recommending it, it should be good.:hap2:

>>I know, you aren't interested in taking my suggest, still I strongly suggest you to go through the whole book again. That should help anybody. I read it cover to cover many times, and each time I discover new insights. (perhaps, because I am dumb not to get it in one reading)

Nothing like that, I am flexible enough. If I can learn something from you, I surly will. I'll try to read it again.

>>if you read the book which contained dos code, then sure it will have in structures chapter.

I have 1999 book, and REGS is discussed in chapter "Interaction with Hardware through C". Though nothing found related to clrscr.(probably old edition)

>>There he meant that you could fill REGS structure and invoke int86 to clear screen.

What so wrong with this line? Appears ok to me.

>>I believe you are arguing for just argument sake, and not trying to understand my point. You are defending everythin from Kanetkar, trying to suggest he's a good author and most stuff is decent and suggesting Ritchie, Bjarne, Fowler and Torvalds are wrong. I don't get that.

Nothing like that, I can not defend Kanitkar. especially when his all VC++ books are cop**d from Kruglenski or prosise. I'll be the first person to go against them. On the other hand as I stated few posts back, if K&R is difficult for you as a initial read than you may want use his book (let us C) as a starter and than jump to K&R and get things sorted. additionally if there is some other book as you suggested which is a easy read but with better concept, totally ditch this and read that. As simple.

I never said that they were wrong, but those two idioms were. Now in 2010 you may say that you believe its obsolete but Tanenbom said that in early 90s. Got the point? I already told you about the debugger thing.

And K&R and group is in different league, they are creators of language, but that does not qualify them as a good author. Will you recommend "The C++ programming language" to a person new to c++, I'll not. I rather refer him to Thinking in C++ to build a base and than jump to the official bible by the creator.

you are correct we are wasting too much energy in this thread, we better go to PM route, Though I believe by this time my points should be clear.

How about helping me in OCing my processor by the way. :P
 
Read your replies carefully again.

...but than its almost 9-10 years.

...pretty much OS specific stuff now days

Seems like you are working for an operating system for queit a few a number of years. I am told that, generally if you need to find best c programmers, you need to search in os circles. That indicates you are a pretty good c programmer.

...being taught few MCA batches years back in my college

You working in a company would mean you have seen lot's of beginners coming in, learning and becoming experts. Moreover you taught some students, so should know what beginners needs are.

Being an expert c programmer and knowing what a beginner need you are better placed to suggest the right thing. I have none of these. Perhaps, you were right. Got the point, now. :)

How about helping me in OCing my processor by the way.

Start a thread, there are many expert ocers here. I am a complete noob in this respect. :ashamed: Yet, I too will contribute, if I can.
 
haraakiri said:
Read your replies carefully again.

Seems like you are working for an operating system for queit a few a number of years. I am told that, generally if you need to find best c programmers, you need to search in os circles. That indicates you are a pretty good c programmer.

You working in a company would mean you have seen lot's of beginners coming in, learning and becoming experts. Moreover you taught some students, so should know what beginners needs are.

Being an expert c programmer and knowing what a beginner need you are better placed to suggest the right thing. I have none of these. Perhaps, you were right. Got the point, now. :)

Not an expert, though yes I am an experience C programmer, coded for almost 3 Yrs in just C and around 7 years on C, C++. Actually the level of beginners varies a lot now days and due to that what we discussed here is very much subjective and change from person to person.

>>I have none of these. Perhaps, you were right.
You got real good concepts behind you, what else you want :). You corrected my wrong assumption and I really appreciate your confidence in your study. I was thinking that you are also having few years of experience. I believe you'll be a very good coder when you start professional coding.

As you know, with added experience we don't generally turned to college books every time as we don't really need to; except for certain things (and for that we generally open the book refer that and close the book, so no thorough reading) and hence sometimes mix things like I did.
It was nice discussing things with you.
 
All said and done..... I would say -

If you want to go in the heard, go ahead and buy whatever is selling hot.

If you want to learn the proper way, get is from the horses mouth i.e get K&R
 
haraakiri said:
I would strongly suggest you to start with some other programming language. C is a low level language not well suited for beginners. Something like python should be an ideal language for beginners. Or you could start with java. That's a simpler programming language.

If you anyway plan to start with C, please remember don't go with ordinary books like "Let us C" or "Programming in ANSI C" by Balagurusuwamy. These are pretty bad and you will pickup lot's of bad practices.

For beginners, IMO "A Book On C" by Kelly Pohl is decent. Follow it up with the highly acclaimed "The C programming language" by Kernighan and Ritchie(creator of c). If you find "A Book On C" difficult, you could opt for "Beginning C" by Ivor Horton, this book is extremely simple but not as good as "A Book On C".
I think thats the best advice. I will modify it a little bit though.

Like Haraakiri said, don't go with C as first programming language, not because it is tough but because you will learn many bad programming habits unknowingly. Python is a good language to start with and you also have other options like Ruby, Scheme and Common Lisp. Check out their newsgroups for advice on books. I will not recommend any C book here as I strictly don't advise anyone to start from a language like C, C++. 2nd, Whatever kind of programming you do, never waste your time with languages like VB or .NET.

Whats the very first thing you need to do to enter into computer world in general. Install Linux (without dual-booting with Windows)
 
Back
Top