How much is "some" in C programming?
-
How much of C do I need to learn before moving on to Cocoa, and what's the best resource for learning it? I'm very interested in programming for the Mac and iPhone, but I have no real prior programming experience. On the recommendation of an AskMeFi answer, I bought the latest edition of the Hillegass book. However, it states something like "this book was written for those who already know some C programming and something about objects." So how much is "some"? What resources will best help me learn the parts of C I need to know before moving on to Cocoa? I want to hit the ground running, so if there is a good crash course out there, what is it?Are there any video resources?
-
Answer:
Since nobody mentioned it so far, I'm going to be That Guy and suggest you pick up a copy of Kernighan and Ritchie. It may not be closely aligned to your immediate interests, but it's not such a big book and is a real classic. Having a solid understanding of C is an excellent investment that is bound to pay off in the long term. The catch is that you really need to do the exercises to get the most out of it, so it may fail your "hit the ground running" requirement.
joshrholloway at Ask.Metafilter.Com Visit the source
Other answers
Based on my experiences, learning C did nothing to help me understand Objective-C and Cocoa. - Learning C will not help you understand Cocoa. - Learning C will teach you language fundamentals that you will need to understand as an Objective-C programmer. - In learning Objective-C, you must learn C. It isn't necessary for everyone to learn the latter before moving onto former, just as long as one accepts that he or she will have to know it all in the end. - I have never met anyone who went through K&R and didn't come out the other end as a better programmer. You don't have to start in that town, but it's a worthwhile visit. If you've absolutely no programming experience, I would actually recommend a counterintuitive idea: learn C# instead of C. If you have absolutely no programming experience, you lack the ability to validate anyone's recommendation. It's important to remember this whether you're the one recommending things or the one listening to recommendations. The best advice I ever got was not "learn XYZ because of ABC", it was "start here because I can help you". Find a mentor who can help you formulate the questions you don't know you need to ask. If you don't know any Obj-C people but you know C people, start there. If your buddy is a Python kid, rock that. If you work with JavaScript people, pick that up.
Mikey-San
K&R is old, but it is so well-written (and concise) that it beats off the pants of the other books. Learning C-99 and ObjC is trivial after learning K&R. Skipping K&R is like trying to build a house without laying down a solid foundation.
flif
Picking up the differences between K&R 2nd C and C99 is trivial. Every badass engineer I know has a copy of K&R. I have a copy of K&R. You should get a copy of K&R (2nd edition). Once you've finished it and really understand it, no other halfway decent documentation will challenge you. (Chapter 5 is also going to guarantee that you understand pointers.) In fact, K&R is so well-written that you will probably laugh at most other "learn xyz books" because of the poor, convoluted way so many of them are written. As far as Obj-C goes, the ADC documentation on the language is good and clear. Many people swear by the Kochan book mentioned by hippybear. The Hillegass book on Cocoa is excellent and no new Cocoa programmer should be without it. I have looked at taking a few courses in C at a local community college. Would this be a good start? It certainly won't hurt, assuming the instructor is good.
Mikey-San
I've been doing self-study in Objective-C using http://www.amazon.com/exec/obidos/ASIN/0321566157/metafilter-20/ref=nosim/, which is written expressly to move the programming novice into Obj-C without having to do prior study in C first. I haven't tried to program since the C-64 was fashionable, so it's been a bit of a slog, but it seems to be a well-written book which will allow you to sidestep the C prereq. Coupled with the http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.2024353965.02024353968 course which is posted on iTunes (link requires iTunes), I'm hoping to make some good forward progress with learning this topic.
hippybear
http://theappleblog.com/2009/06/01/43-iphone-development-resources/ is another long list of good books.
DreamerFi
Have you tried the examples in the Hillegass book? It's been years since I learned C, and I learned it in a classroom setting, but I program some Objective C (mostly Java, but some Obj C) these days, and it seems like all you really need from C is the basic syntax of the language. Depending on your aptitude, you may be able to pick up what you need by thinking over Hilegass's examples. In terms of references, I haven't read either of these, but I've had generally good experience with O'Reilly books: http://oreilly.com/catalog/9781565923065/, or for a more concise overview, http://oreilly.com/catalog/9780596006976/. Since you're dealing with object-oriented programming, it might not hurt you to look at a Design Patterns book, either. The canonical example is http://en.wikipedia.org/wiki/Design_Patterns_(book) by the "Gang of Four," but there are more accessible options out there. A friend of mine who bootstrapped herself from C to Java last year swears by "Head-First Design Patterns for Java," but since you don't have an interest in Java, that probably isn't the best solution for you.
Alterscape
hmm i appear to have digressed there for a moment, apologies for the noise
Mikey-San
Based on my experiences, learning C did nothing to help me understand Objective-C and Cocoa. 'Objective-C' is a major misnomer: it's more object-oriented than even C++ could ever hope to be. If you've absolutely no programming experience, I would actually recommend a counterintuitive idea: learn C# instead of C. I'm a total Mac geek and I'm saying this. For my job, I started on C# after six or seven years of C++ and a failed attempt at Objective-C. C# was the perfect bridge, and it made Objective-C logical for the first time. (More importantly, you don't have to burden yourself with memory management in C#.)
spamguy
Dave Mark's "Learn C on the Mac" is excellent and you learn XCode at the same time.
neuron
Related Q & A:
- What are some basic c++ programming techniques?Best solution by Quora
- How to use GUI in c language?Which is best GUI for c?Best solution by Quora
- How much programming is required for financial engineering?Best solution by Quora
- What certification can I get for C Programming?Best solution by Yahoo! Answers
- How much is it to take a train from D.C. to NYC?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.