PDA

View Full Version : How much C do you need for objC?


da shiz wiz 19
12-21-2009, 09:35 AM
I've started learning how to code for the past few days and the Apple website said I needed some experience from C to learn objC. SO I started with C. But the question is how much C do I need to know for objC?

da shiz wiz 19
12-21-2009, 12:18 PM
Anyone?

The prez 12521
12-21-2009, 12:19 PM
well, my question is, what are you using to learn C? im interested...:p

da shiz wiz 19
12-21-2009, 12:34 PM
well, my question is, what are you using to learn C? im interested...:p
I'm using some of my parents books on C from when they went to a class for it. Its pretty good actually, explains UNIX too.
edit: Cannot be found online though.

mobile1up
12-21-2009, 01:33 PM
I'm using some of my parents books on C from when they went to a class for it. Its pretty good actually, explains UNIX too.
edit: Cannot be found online though.

i used to teach C at university level. it is definitely NOT the language for people just starting out; there are a lot of pitfalls you can fall into. but there are a lot of common syntax rules between C, Objective-C, Java, C++ and C#. there are some online tutorials, such as:

http://www.cprogramming.com/

but, C programming is not for the light hearted; while it is my language of choice; it is because i've been doing it for 15+ years now - and i know the pitfalls inside out to know how to avoid them.

da shiz wiz 19
12-21-2009, 01:45 PM
Thanks mobile1up
But I'm not going to be going 'in-depth' with it. I want to learn enough to begin objc.
What is a language you suggest starting on?

Deth4U2
12-21-2009, 02:14 PM
Thanks mobile1up
But I'm not going to be going 'in-depth' with it. I want to learn enough to begin objc.
What is a language you suggest starting on?

Obj-C is a superset of C. You'll need to understand C well to program in Obj-C since it's 99% C to begin with.

PixelthisMike
12-21-2009, 02:41 PM
I'm sure there are books that would teach Obj-C to people who have no background in programming. Those books are bound to teach the necessary C stuff in tandem with the Obj-C stuff.

The Obj-C book we have in the office (it is sadly underused but when I have looked through it it's been brilliant) is called "Programming in Objective-C" by Stephen G. Kochan. Here is an excerpt from the introduction that might be of interest to you:

"...When contemplating writing a tutorial on Objective-C, a fundamental decision had to be made. As with all prior texts on Objective-C, I could write mine to assume the reader already knew how to write C programs. I could also teach the language from the persepctive of using the rich library of routines, such as the Foundation and Application Kit frameworks. Some texts also take the approach of teaching how to use the development tools, like the Mac's Project Builder and Interface Builder.

I had several problems adopting this approach. First, learning the entire C language before learning Objective-C is wrong. C is a procedural language containing many features that are not necessary for programming in Objective-C, especially at the novice level. In fact, resorting to some of these features goes against the grain of adhering to a good object-oriented programming methodology. It's also not a good idea to teach all the details of a procedural language before learning and object-oriented one. This starts the programmer off in the wrong direction, and gives the wrong orientation and mindset for fostering a good object-oriented programming style. Just because Objective-C is and extension to the C language doesn't mean you have to learn C first!

So, I decided neither to teach C first nor to assume prior knowledge of the language. Instead I decided to take the unconventional approach of teaching Objective-C and the underlying C language as a single integrated language, and from an object-oriented programming perspective..."

Before you run out and buy this book though a caveat: I haven't learnt Objective-C from this book and I already knew C and C++ before learning Objective-C. I am merely using the book as a reference (and a good one!) every now and then so I can't say whether it does an effective job of teaching the language from scratch. But it does seem to suit your purposes :)

dolly
12-21-2009, 04:48 PM
I'v read about that book, "Programming in Objective-C", it got great reviews but there are some concerns. It's quite old and written for an earlier version of the SDK. A follow-up book has been released but if I remember correctly the new one left out on some of the basic beginner parts. But check it out, I'm not entirely sure.

PixelthisMike
12-21-2009, 04:53 PM
I'v read about that book, "Programming in Objective-C", it got great reviews but there are some concerns. It's quite old and written for an earlier version of the SDK. A follow-up book has been released but if I remember correctly the new one left out on some of the basic beginner parts. But check it out, I'm not entirely sure.

Yes the edition we have is 2004 but it's not written for the SDK at all, it concentrates on teaching you the language and leaves you to figure out specific frameworks yourself. In this way it remains relevent despite being 5 years old. I don't know anything about newer editions though.

da shiz wiz 19
12-21-2009, 05:18 PM
Thanks for the replies guys.
It looks like I'm going to stay with my course and finish the basic of C. Then I'll move onto objC and skip all that other stuff. I dont have any books for objC so I'll check out that one mentioned Mike.

The prez 12521
12-22-2009, 10:57 AM
so, I want to get in on C and up. I know very little html but am willing to work hard. what do you all reccommend? what book for begginning C users? please help thanks :P

MidianGTX
12-22-2009, 11:02 AM
so, I want to get in on C and up. I know very little html but am willing to work hard. what do you all reccommend? what book for begginning C users? please help thanks :P

Probably best to start with something else judging by this:

I used to teach C at university level. It is definitely NOT the language for people just starting out; there are a lot of pitfalls you can fall into.

The prez 12521
12-22-2009, 11:03 AM
well theres so much help out there. but whatever u say, so where should i start?

da shiz wiz 19
12-22-2009, 11:48 AM
well theres so much help out there. but whatever u say, so where should i start?
maybe go straight to objC like pixelmike said? its on the previous page fyi

The prez 12521
12-22-2009, 11:59 AM
maybe go straight to objC like pixelmike said? its on the previous page fyi
oh, i see it, and do i/ will i need C ?

PixelthisMike
12-22-2009, 01:28 PM
Yes you will need to know some C at some stage or another but as the author of the book I mentioned says learning the entire C language as a precursor to Obj-C can actually be a bad idea. This book will teach you what you need to know about C as it teaches you Obj-C, and I'm sure there would be other books/courses that would take the same approach :)

The prez 12521
12-22-2009, 01:30 PM
Yes you will need to know some C at some stage or another but as the author of the book I mentioned says learning the entire C language as a precursor to Obj-C can actually be a bad idea. This book will teach you what you need to know about C as it teaches you Obj-C, and I'm sure there would be other books/courses that would take the same approach :)

alright, thanks much! and without having a mac or anything, where can i experiment with C stuff

da shiz wiz 19
12-22-2009, 01:40 PM
alright, thanks much! and without having a mac or anything, where can i experiment with C stuff
Putty

The prez 12521
12-22-2009, 01:40 PM
Putty

putty free or no?

da shiz wiz 19
12-22-2009, 01:45 PM
putty free or no?
I think it should be free but I dont know where to download it safely from. I'll ask my parents. Also you may need like a book on C that uses putty (I think that is default anyways) because it is confusing.

The prez 12521
12-22-2009, 01:47 PM
I think it should be free but I dont know where to download it safely from. I'll ask my parents. Also you may need like a book on C that uses putty (I think that is default anyways) because it is confusing.

its all confusing these days :P

mobile1up
12-22-2009, 01:54 PM
Yes you will need to know some C at some stage or another but as the author of the book I mentioned says learning the entire C language as a precursor to Obj-C can actually be a bad idea. This book will teach you what you need to know about C as it teaches you Obj-C, and I'm sure there would be other books/courses that would take the same approach :)

everything in C applies to objective-C as well - keep that in mind!

what you should do is focus on the language, not on the libraries. avoid stuff like standard libraries; chances are you'll be using objective-C based versions. i have some lecture notes archived somewhere where the focus was on the language - this is what you need. most books focus on implementation and using libraries that are provided.. this is what you want to avoid.

you can also pick up a lot just by looking at Java tutorials - just again, forget about the object orientation side of things (classes, interfaces etc) and look at the general language syntax.. php also uses a C style language.

kohjingyu
12-22-2009, 09:31 PM
Haha, despite all this talk about C being very closely related to Objective-C (which I totally agree with), I didn't study C at all. I had a 10 day crash course in C++ though.

mobile1up
12-22-2009, 09:36 PM
Haha, despite all this talk about C being very closely related to Objective-C (which I totally agree with), I didn't study C at all. I had a 10 day crash course in C++ though.

same principles.

da shiz wiz 19
12-22-2009, 09:38 PM
Wait guys. Gamesalad? You dont need any programming knowledge? Is gamesalad worth it or should I continue with C/C++/objC

kohjingyu
12-22-2009, 09:46 PM
Wait guys. Gamesalad? You dont need any programming knowledge? Is gamesalad worth it or should I continue with C/C++/objC

I think you should continue with your programming languages. It's much more versatile.

da shiz wiz 19
12-22-2009, 10:10 PM
Alright I think I will continue programming, it might be useful in the future.
But I may look into gamesalad if I get impatient. But using something like gamesalad kind of ruins the fun in being a dev.

kohjingyu
12-22-2009, 10:23 PM
Alright I think I will continue programming, it might be useful in the future.
But I may look into gamesalad if I get impatient. But using something like gamesalad kind of ruins the fun in being a dev.

I know. :)

It's kind of repetitive though, the stuff in GameSalad. I heard you can't implement scores or high scores.

Any news about your first game? :)

mobile1up
12-22-2009, 10:24 PM
Alright I think I will continue programming, it might be useful in the future. But I may look into gamesalad if I get impatient. But using something like gamesalad kind of ruins the fun in being a dev.

gamesalad is an interesting concept; however you may be limited to the types of games you can create with them. it never hurts to understand how to program; you can always use products like gamesalad as a reference. as a developer; you eventually end up with a bunch of libraries for doing certain things - and, you end up minimizing the complex programming to focus mainly on logical programming.

da shiz wiz 19
12-22-2009, 10:39 PM
Actually yeah I'm going to ask for gamesalad for christmas ( it's not free right?). I'm just going to do some easy line drawing game then I have something better :D
thanks for the help pixelmike, mobile1up and froggy, you guys answered my questions nicely.

arkanigon
12-22-2009, 10:44 PM
I think whatever you learn... try to start the iphone related stuff as soon as you can... even if you don't know everything you need yet, starting your iphone projects immediately (start with simple things like the Hello World program etc)... and as you learn little by little you can do more complex projects... There's no need to wait...

I think the learning needs to be done in parallel... rather than waiting to learn the programming language, before actually getting into the iphone stuff... Just my opinion.

If you don't have a mac though, you probably can't start with the iphone stuff...

arkanigon
12-22-2009, 10:46 PM
Actually yeah I'm going to ask for gamesalad for christmas ( it's not free right?). I'm just going to do some easy line drawing game then I have something better :D
thanks for the help pixelmike, mobile1up and froggy, you guys answered my questions nicely.

I think this is a good idea. Get started making a game, however simple, as soon as you can... when you succeed, you will automatically be motivated to learn programming etc...

da shiz wiz 19
12-22-2009, 11:06 PM
Thanks for the advice. I made the hello word app a few days ago.
Thats a good point with the motivation factor, didnt think of it that way.

The prez 12521
12-23-2009, 12:11 AM
ok, i know nothing of HTML, im running Vista x64, what can i use to learn?!?!?

kohjingyu
12-23-2009, 04:18 AM
ok, i know nothing of HTML, im running Vista x64, what can i use to learn?!?!?

If you mean iPhone programming, you need a Mac.