PDA

View Full Version : which C is best to learn




roadgypsy
Mar 25, 2012, 05:44 PM
Hi all
I'm new to programming, although I have developed in Omnis and learning Studio (and way back dabbled in BASIC). What I would like to know, is which C version is the best to start with in order to learn Mac programming: C, C++ or objective C. I want to pick up one of the C books, but when I start looking its confusing a hell. Can anyone point me in the right (and easiest) direction. I'm good with manuals and have no problem with taking the time to learn since I now have a lot of it.

TIA



Catfish_Man
Mar 25, 2012, 06:00 PM
Hi all
I'm new to programming, although I have developed in Omnis and learning Studio (and way back dabbled in BASIC). What I would like to know, is which C version is the best to start with in order to learn Mac programming: C, C++ or objective C. I want to pick up one of the C books, but when I start looking its confusing a hell. Can anyone point me in the right (and easiest) direction. I'm good with manuals and have no problem with taking the time to learn since I now have a lot of it.

TIA

Objective-C is pretty much required for Mac development. I believe there's a sticky at the top of this forum about learning it, but generally speaking the recommendation is to get Steve Kochan's book on ObjC, and Aaron Hillegass's book on Cocoa.

robvas
Mar 25, 2012, 07:44 PM
Objective-C is pretty much required for Mac development. I believe there's a sticky at the top of this forum about learning it, but generally speaking the recommendation is to get Steve Kochan's book on ObjC, and Aaron Hillegass's book on Cocoa.

Here are the two books Catfish_Man mentioned:

http://i.imgur.com/rsQqT.jpg http://i.imgur.com/BdgJ4.jpg

You might also want to check out:

http://i.imgur.com/ln5Te.jpg http://i.imgur.com/s9sb0.jpg http://i.imgur.com/kzvFJ.jpg

roadgypsy
Mar 25, 2012, 08:36 PM
To Catfish Man and robvas, thank you gentlemen. I appreciate the quick response, I thought I'd have to wait a few days for an answer. I'll be getting the books you've suggested and start my hand at C.

Fraaaa
Mar 27, 2012, 03:01 AM
I believe that C, C++, C# and Objective-C are more or less the same in difficulty at the beginning, beside learning one, will make you understand the other.

C is the base.
C++ is an enhance version of C.
Objective-C is a Object oriented version of C, similar to Java.
C# is an object oriented version of C.

Probably C++ would be a bit more difficult over time. You can always start with C and easily move to any of the other. Otherwise I'd say start with Objective-C if you want to do programming on Mac/iOS or C# if you do Windows development.

Zendokan
Mar 27, 2012, 04:15 AM
as an ex C, C++ and C# developer I can say this:

C is a procedural language.

C++ is the first evolution of C into an object-orientated language (since 1994)

C# is the original Microsoft developed counterpart of JAVA, it's also object-orientated, but you don't need to allocate the pointers yourself anymore, which was the real difficulty in C++.

Objective-C is the program language used by most (all?) Apple applications and apps.

If you are completely new to programming in the C-languages and you want to specialize in Apple software programming, I would suggest to just start with a basic course of Objective-C, especially one that learns you the concepts of classes (inheritance, protected, polyformisme, etc...)
It's not necessary to learn the other C-languages, because the code syntax can become confusing in the end and it can give you some bad habits (trying to allocate pointers in C# for example, because you used to do it in C++, while it's a big NO in C#, for example).

(I started with C++, learned than C# and later learned C for some maintenance of older programs).

Hope that this helps.

ghellquist
Mar 27, 2012, 10:29 AM
I came across this in a Runners magazine:
Best way to get betterr at running is to train running.

Same with programming on the Mac in Objective-C. Learn that really well. If you ever need to program on a different platform in a different language, learn that when that time comes. By learning one language really well you will have a firm platform to stand on and will produce useful programs from the start.

Avoid learning a quite different language as a stepping stone. Yes, C is a parent of Objective-C, but the actual programming is very different in 90% of the programs you are going to write. ( Old-timers like me find it very difficult to go from Unix-style pipes and filters in plain C to object-oriented graphical user interfaces on top of Cocoa. The difference is large enough to amount to totally different langagues in just about everything, making for quite a bit of unlearning and relearning. )

roadgypsy
Mar 27, 2012, 03:11 PM
To Fraaaa, Zendokan, ghellquist

The explanations you provided bear out the prior postings about which books would help me get started. I have ordered 2 objC books and the one on Cocoa programming.

I have some ideas on applications for myself and a couple I had outlined years ago for niche services, and I now have some time to donate to them once I get proficient with objC and Mac programming.

Thanks all for the help. All your postings made it easier for me to decide where to start.

firewood
Mar 27, 2012, 04:52 PM
I came across this in a Runners magazine:
Best way to get better at running is to train running.


But humans must learn to crawl and walk before running. Dropping small babies on treadmills moving at 10+ MPH will just create a lot of human hamburger.

Also, the best way to avoid injury running may be a measured amount of cross-training on alternate days. There are a lot more people visiting the doctor than there are Olympic medalists.

All of which applies to learning programming as well, IMHO. Objective C was not designed as a teaching/educational language.

ghellquist
Mar 27, 2012, 05:43 PM
Objective C was not designed as a teaching/educational language.

Thankfully, you are right. Neither were C or C++ or C#, all of them are full production languages allowing professional type of programming. I believe that it is better to learn using the real thing than something intentionally crippled or intended to be left behind once you are past the crawling stage.

Admittedly, Cocoa programming is complex and relies on quite advanced concepts such as object orientation and introspection and more. But if you want to program typical programs for the Mac there are no shortcuts really. It will not help learning, say, Basic.

firewood
Mar 27, 2012, 06:21 PM
I believe that it is better to learn using the real thing than something intentionally crippled or intended to be left behind once you are past the crawling stage.

And how many people and what percentage have successfully completed any intro to programming courses for non-programmers, which you've taught using your "better" method, for you to validate your belief?

Sounds too much like those indentured union apprenticeships meant to limit competition for certain jobs.

Fraaaa
Mar 28, 2012, 07:45 PM
To Fraaaa, Zendokan, ghellquist

Those Apress books are quite good. I have some of them, but I am very lazy.
Unfortunately, never focused too much on learning objC, because I am study Java in uni, but if you are good in self teaching, you will be off to a good start.

ghellquist
Mar 29, 2012, 06:01 AM
And how many people and what percentage have successfully completed any intro to programming courses for non-programmers, which you've taught using your "better" method, for you to validate your belief?

Sounds too much like those indentured union apprenticeships meant to limit competition for certain jobs.

Clarification: this message is only intended for the signature firewood. It is totally irrelavant to the question asked and I strongly urge everyone else to simply skip reading it.

Now, this sounds to me, stating my personal opinion, a lot like trolling in order to start a debate not really connected with the question or with the answers given.

I clearly stated that I had a personal opinion. Every person with the least amount of experience on the internet knows that personal opinions are, well, only personal opinions. They are hopefully, as in the opionion I gave, based on a bit of personal experience and, as in the opinion given here, meant to answer the question and, as in this case, meant to give a bit of support to the person having a dilemma.

So far you have not given any alternatives and not given anything, again in my personal opinion, even remotely helpful to the person asking the question.

So until I, and I will am the judge of my personal opinion in this case, add anything substantial to the discussion, I will be quite deaf to anything I consider to be even remotely close to trolling.

Clear enough?

roadgypsy
Mar 29, 2012, 09:29 AM
Fraaaa, fortunately, I am good at self study. Been doing it all my life.

This is why I started this thread. So I can find the starting point for what I want to do, knowing what I am capable of. And by using the information that you and the other posters have graciously given me, I can now do what I've always done. These days, Iíll be doing it a little slower, taking a little longer, but doing it all the sameÖ.with cigar and scotch in hand I will boldly go.

larswik
Mar 29, 2012, 08:18 PM
I started book learning with "Learn C on the Mac" listed above, I loved that book because it was well written and easy to follow. By the end of the book I wrote a console based black jack game. I am glad I got the C under my belt first. I then moved on to the next one "Learn Objective C on the mac" but I did not like that book at all. After a few Chapters I stopped.

Doing it all over again I think I would still start with the Same C book but now get an Objective C book by the Big Nerd Ranch people.

Get a good understanding of C.

roadgypsy
Mar 31, 2012, 10:27 PM
Again, hi all.
I recently got the following books:

Programming in Objective C, 4th ed. Developers library by Stephen G. Kochan (Addison-Wesley) which is updated for iOS5 and ARC

COCOA Programming for MacOSX, 4th ed. By Aaron Hillegrass and Adam Preble (Addison-Wesley)

Learning Objective-C on the Mac by Mark Dalrymple and Scott Knaster (APRESS)

I found each helpful so far in their own way. The last, Learning Objective-C on the Mac requires some knowledge of a C-like programming language and has some good chapters later in the book like chapter 4 on inheritance. The COCOA book has a great beginning that shows the Xcode windows and explains each one as you begin creating simple code. And the Programming in Objective-C by Stephen Kochan states that there is no C experience required to learn objC for his 'course'.
It seems that Iíll be using all 3 simultaneously since I found that each handles the same topic in different ways. One spends a few words on definition while the other a little more depth on use. This is exactly what I was looking for.

Thanks again for all the help.