[OT] book recommendations for (re)learing C and /or C++
So I'm wanting to get back into programming after taking a year of programming classes while i was studying EE which I quit to get a music degree, and now with said music degree I am realizing I really prefer the music technology side of things. So i want to (re-)learn c++ and or c with the goal of being able to develop music/audio software including max externals. (i'm more mac oriented if it matters). So apologies to the off topicness but I figure you always very helpful community of geeks (thats an endearing "geek") would be highly knowledgeable regarding the following questions:
(I'm a CS beginner again so forgive my confusion, i just really want to learn but dont know where to start...)
Do i need to learn oldschool C (first)? is it going ot make c++ easier, or should I start with C++ and learn it well than if i need to write straight up C code i can adjust?
Books. I will need books there are alot of them, which ones do you experienced type folks recommend? Is there one (or a few) that is/are generally agreed upon to be the bible(s) (for C and C++ respectively)?
Any other advice you feel like throwing my way is greatly appreciated.
I am very greatful for any responses,
Jonny
I've been reading/writing C/C++ since 1996; here's the sequence I recommend:
1. The C Programming Language, Brian W. Kernighan & Dennis M. Ritchie
2. The C++ Programming Language, Bjarne Stroustrup
3. Effective C++ Third Edition 55 Specific Ways to Improve Your
Programs and Designs, Scott Meyers
4. Modern C++ Design: Generic Programming and Design Patterns Applied
(C++ In-Depth Series), Andrei Alexandrescu
5. C++ Templates: The Complete Guide, David Vandevoorde, Nicolai M. Josuttis
If you want to write Max/MSP externals then #1 will take you a long
way since most of the externals out there are written in C. You can
even read the first part of Stroustrup's book (#2) to lean C++
initially as "A Better C" -- at that point you can begin your long
journey of object-oriented programming, general programming
techniques, design patterns and template metaprogramming which has
largely characterized C++ as a language in the 21st century. I also
highly recommend getting the ISO C++ Standard 14882:2003 PDF document
as a reference in your travels, it's not terribly expensive if I
remember correctly.
This is of course a lot to read, but if you get through all five
you'll begin to understand why the language is extremely powerful when
you get into the more advanced techniques -- but you really can't go
wrong reading those books if you read them in that specific order,
they're all excellent. If you thoroughly get through all five in a
year or two you should definitely check out the Boost library and the
developments into the next C++ standard which will be released later
next year in 2009.
Brandon Nickell
http://www.isounderscore.com
On Sun, Jun 15, 2008 at 11:47 AM, Jonathan Sylvan wrote:
>
> So I'm wanting to get back into programming after taking a year of programming classes while i was studying EE which I quit to get a music degree, and now with said music degree I am realizing I really prefer the music technology side of things. So i want to (re-)learn c++ and or c with the goal of being able to develop music/audio software including max externals. (i'm more mac oriented if it matters). So apologies to the off topicness but I figure you always very helpful community of geeks (thats an endearing "geek") would be highly knowledgeable regarding the following questions:
>
> (I'm a CS beginner again so forgive my confusion, i just really want to learn but dont know where to start...)
>
> Do i need to learn oldschool C (first)? is it going ot make c++ easier, or should I start with C++ and learn it well than if i need to write straight up C code i can adjust?
>
> Books. I will need books there are alot of them, which ones do you experienced type folks recommend? Is there one (or a few) that is/are generally agreed upon to be the bible(s) (for C and C++ respectively)?
>
> Any other advice you feel like throwing my way is greatly appreciated.
>
> I am very greatful for any responses,
> Jonny
> --
> "I must not fear. Fear is the mind-killer."
>
Quote: jonnyfive wrote on Sun, 15 June 2008 20:47
----------------------------------------------------
> Do i need to learn oldschool C (first)? is it going ot make c++ easier, or should I start with C++ and learn it well than if i need to write straight up C code i can adjust?
The first thing you need to "learn" is to program. Period.
The language you use should just be a medium. As a composer I may write for solo piano or wind quintet or orchestra or Max/MSP or "tape" or... you get the idea. As a programmer you should (ideally) be just as able to switch language as a composer switch mediums or an artist may switch from pencil to chalk to oil.
I write this because I've heard from C++ programmers who came close to a nervous breakdown when faced with C, or Perl programmers who can't handle awk.
It's fair enough that you develop a preference for some particular languages (I'll admit I never really got on with COBOL and my Pascal is seriously rusty), but the actual problem-solving involved in programming should be flexible enough that you don't fixate too much on one particular language.
That said, for my money plain-vanilla C is the most straight-forward way to work with Max/MSP/Jitter. Understanding Object-Oriented design principles is a good idea. Whether you pick up your OO chops from C++ or Smalltalk or Java or Simula is sort of secondary. (Personally, C++ is not my favorite flavor of OOPL).
> Books.
Brandon's suggestions are a good starting point.
I learned a lot from Jon Bentley's "Programming Pearls" books. Many details may seem a bit old-fashioned, but there is still a lot of good general problem-solving stuff in there.
Hope this helps,
Peter
Awesome.
I thank you all very much for your input; this was exactly the sort of information/sage advice I was hoping for.
Peter's advice re: learning to be a good programmer is well taken. And that is for sure the goal, but whats kind of obtuse to me is exactly how one approaches "learning to program period".
(granted I am just now returning to this thread and haven't actually gone down to the bookstore to poke around and see what the books actually look like inside, nor gotten started)
I guess I find it daunting/overwhelming to try and conceptualize a methodology for learning something both abstract and complex without having enough experience to really even begin to guess at what that process is going to be like, come to think of it maybe thats how I felt when I started with Max...
Perhaps it will become readily apparent once I begin my journey.
Anyway, you guys rock! I really appreciate your willingness to share and teach. I'll also take this opportunity to extend that sentiment to the Max "community" in general...
Thanks again (and again and again)
Jonny
(any other advice solicited or otherwise is still welcome)