Learning C after Java

getoffb

Member
Jun 19, 2003
36
0
0
Throughout the past couple of semesters/years, for good or bad, all of my course work has been in Java. I want to start learning something new in my (limited) free time. Are there any particular books that anyone would recommend for someone new to C? I prefer hard copy books, but any good online resources are also welcome.

Also, all of my Java work has been done in NetBeans. I got the C/C++ plugin for it and plan to use it. Any problems with starting out using that with C? Or should I use some other editor/compiler combo?

Thanks -
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Are you set on C? There are plenty of decent current books on the language, and I don't think it matters all that much. I still grab my K&R reference from time to time when I want to know something. C is a very simple language. C++ retained much of that elegance and simplicity until the standards process got ahold of it. The barrier to learning C probably won't be the grammatical complexity of formulating expressions into statements. Back when I was learning it we all percolated up from assembly language to higher level languages. Having an understanding of memory and addresses, registers, stack frames, branching and loops, all of that made migrating to C much easier. Drilling down to C from Java will be a fair bit harder unless you're already a bit-head and familiar with these concepts. I'm not sure it's worth it anymore. In fact I'm pretty sure it isn't, unless you're going to be writing kernel mode drivers, embedded systems, realtime data acquisition applications with challenging device timings, etc. You don't need to understand this stuff to get useful work done, and you'll need it even less in future years.

If, on the other hand, you just have a desire to drill into the machine and figure out what's going on, C ain't a bad place to start, but I might suggest C++ anyway, since it's a superset, and as ungainly as it has become it is still much more flexible and powerful than C. You'll still need to understand most if not all of the stuff I mentioned above. If you don't have any real thirst for the lower layers of oily arcania then I would strongly suggest C#, or if you are oriented more toward intellectual challenge, Eiffel, Ruby, or maybe Python.

If you're still looking for books on C, I've heard a lot of good things about Stephen Prata's C Primer Plus (5th Ed.). Have fun.

 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
In response to Markbnj, knowing the low level stuff is still very important even in a high level language. Understanding underlying hardware for example, will get you thinking about data structure organization, cache implications on your structure and algo design, prefetching, concurrency, context switching and state changes (implicitly calling ftoi and changing rounding modes back and forth for example is really expensive for something that seems as harmless as (int)myfloat), etc.

You don't even have to leave the bounds of the high level languages; rather you get a feel for how your high level implementation gets compiled for the hardware and you learn to adjust your habits within the high level language, tailoring for more hardware friendly code generation.

Good strong knowledge of assembly and hardware architecture allows you to write better C by choosing or designing structures and algorithms compatible with the hardware using a high level language.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: exdeath
In response to Markbnj, knowing the low level stuff is still very important even in a high level language. Understanding underlying hardware for example, will get you thinking about data structure organization, cache implications on your structure and algo design, prefetching, concurrency, context switching and state changes (implicitly calling ftoi and changing rounding modes back and forth for example is really expensive for something that seems as harmless as (int)myfloat), etc.

You don't even have to leave the bounds of the high level languages; rather you get a feel for how your high level implementation gets compiled for the hardware and you learn to adjust your habits within the high level language, tailoring for more hardware friendly code generation.

Good strong knowledge of assembly and hardware architecture allows you to write better C by choosing or designing structures and algorithms compatible with the hardware using a high level language.

Don't disagree with any of that, actually. But it's not going to matter. Ten years from now programmers won't have any idea at all what's going on at the hardware level. Heck, most of them don't now.
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
Originally posted by: Markbnj
Originally posted by: exdeath
In response to Markbnj, knowing the low level stuff is still very important even in a high level language. Understanding underlying hardware for example, will get you thinking about data structure organization, cache implications on your structure and algo design, prefetching, concurrency, context switching and state changes (implicitly calling ftoi and changing rounding modes back and forth for example is really expensive for something that seems as harmless as (int)myfloat), etc.

You don't even have to leave the bounds of the high level languages; rather you get a feel for how your high level implementation gets compiled for the hardware and you learn to adjust your habits within the high level language, tailoring for more hardware friendly code generation.

Good strong knowledge of assembly and hardware architecture allows you to write better C by choosing or designing structures and algorithms compatible with the hardware using a high level language.

Don't disagree with any of that, actually. But it's not going to matter. Ten years from now programmers won't have any idea at all what's going on at the hardware level. Heck, most of them don't now.

Al the better, people like us get raises and we get more Java monkeys with overnight programming degrees to lead and supervise.

Having perfect compilers is like having cars that can drive themselves with cameras. Not going to happen without fully sentient artificial intelligence making decisions on the fly. In the mean time, there is no substitute for the real time scrutiny and nit picking of the human brain.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Having perfect compilers is like having cars that can drive themselves with cameras. Not going to happen without fully sentient artificial intelligence making decisions on the fly. In the mean time, there is no substitute for the real time scrutiny and nit picking of the human brain.

Without question. It's just that these days that nit picking is largely focused on higher order logic. When I was a young geek it wasn't unusual for all of my friends to own copies of the IBM VGA hardware specification, so we could figure out mode x graphics for ourselves. I had it. I also had the 8253 timer spec, and the 8042 keyboard controller spec. Everyone knew the BIOS interrupts by heart.. at least 10h, 13h, and a few others. Those days are long gone .
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
They aren't long gone. Just now what used to be common knowledge now separates the elite from the people who graduate with CS degrees in Java not knowing what a heap is. Someone is being paid to write those Java compilers and I bet they get paid more than the person writing Java apps

And try writing a Win32 driver for a GeForce 8800 in Java or VB or C#

Or the Ada interpreter and runtime in a missile guidance system.

Anywhere there is someone programming an application in a sandbox or focusing on high level design logic, there is someone else getting down and dirty with low level stuff in order to create the tools and platform that make it possible for that programmer to not know what a heap is and still get his job done
 

lousydood

Member
Aug 1, 2005
158
0
0
Computer science isn't about Java buzzword nonsense, nor is it about the peculiarities of hardware and low-level "stuff".

I'm not defending people who somehow graduate without knowing what a heap is. That's despicable. But "heaps" are hardly a low-level concept.

All the "down and dirty" knowledge in the world won't help you write a compiler if you don't know about formal languages, computability, type systems, and graph theory.

Efficient data structures and algorithms you use in a low-level OS driver are equally useful to know when writing an "ordinary" application in a high-level language.

Showing correctness of program properties, and analysis of program complexity, are fundamental tools which no person should be able to graduate without.

Also, by that point, you should have a healthy understanding of why Java and C are extremely flawed programming languages, each in their own way. You may be forced to use them, but you should know better, and as a result know how to write better code.
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
Originally posted by: lousydood
Computer science isn't about Java buzzword nonsense, nor is it about the peculiarities of hardware and low-level "stuff".

I'm not defending people who somehow graduate without knowing what a heap is. That's despicable. But "heaps" are hardly a low-level concept.

All the "down and dirty" knowledge in the world won't help you write a compiler if you don't know about formal languages, computability, type systems, and graph theory.

Efficient data structures and algorithms you use in a low-level OS driver are equally useful to know when writing an "ordinary" application in a high-level language.

Showing correctness of program properties, and analysis of program complexity, are fundamental tools which no person should be able to graduate without.

Also, by that point, you should have a healthy understanding of why Java and C are extremely flawed programming languages, each in their own way. You may be forced to use them, but you should know better, and as a result know how to write better code.

Well said. Just a bit sore that in my experiences most Universities are now biased towards abstracted languages like Java and spend 4 years teaching design patterns and emphasizing inheritance as god, rather than many of the things you mentioned.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I agree completely with both of you on the principles. There will always be people putting together the foundations everyone else relies on. All of those other people, the ones developing work-a-day applications that make up 95+% of all the growth in the business in the last quarter century, will increasingly use higher and higher level abstractions. They will not know most of the things a CS grad knows (they don't now, and I don't either), and they won't need to. And in fact even the former group, the ones exdeath calls elite, will work with higher level tools, and in fact already are. Even the microcode guys are benefitting from abstractions and reuse. There will be a time, might be we're in it already, when only a core group representing a very small percentage of all developers knows _anything_ about how the operating system works. Everyone else will talk in terms of transactions, messages, events, and higher level logic. Maybe even that vocabulary will be too low level in the future.
 

trexpesto

Golden Member
Jun 3, 2004
1,237
0
0
Originally posted by: exdeath10/31/2007 02:36 PM
Having perfect compilers is like having cars that can drive themselves with cameras. Not going to happen without fully sentient artificial intelligence making decisions on the fly. In the mean time, there is no substitute for the real time scrutiny and nit picking of the human brain.

Joking or ?? DARPA Urban Challenge 2007


 

aCynic2

Senior member
Apr 28, 2007
710
0
0
Originally posted by: nordloewelabs
for C or C++ i recommend the "How To Program" series by Deitel. :thumbsup:
be sure not to judge those books by their (ugly) covers.... :roll:

http://www.prenhall.com/deitel/

I recommend them also. I first encountered them a college text books (priced appropiately). I recently updated my copy from 2nd Ed to 6th Ed. It's a bit dry perhaps, but will be the best book to learn from.

The 6th edition of C++ Deitel includes chapters on STL, Ogre3D and Boost and the whole thing is 1500 pgs.

It's expensive. I think it cost me $106.

The K&R is a solely reference, not a tutorial. Deitel and Deitel is pretty much both.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |