Page 1 of 1 [ 12 posts ] 

JesseCat
Sea Gull
Sea Gull

User avatar

Joined: 26 Dec 2011
Age: 39
Gender: Male
Posts: 228

17 Feb 2012, 10:08 pm

Does anyone else have the book, only to learn that the Xcode examples in the book are slightly outdated? Where else can I look to find information on the new Xcode and how to use C on the Mac? I am new to learning programming. A little intimidated to be posting here as well, from the looks of it you all know what you are talking about.

Also, would anyone recommend learning in this order: C, Objective C, Cocoa, then C++?

Can anyone recommend any informative websites or books to help a newbie like me out? I'd really appreciate it :D



nat4200
Veteran
Veteran

User avatar

Joined: 10 Jan 2011
Gender: Male
Posts: 704
Location: BANNED

17 Feb 2012, 10:35 pm

Redacted



Last edited by nat4200 on 19 Apr 2012, 6:56 am, edited 1 time in total.

JesseCat
Sea Gull
Sea Gull

User avatar

Joined: 26 Dec 2011
Age: 39
Gender: Male
Posts: 228

17 Feb 2012, 10:49 pm

Oy, I should have worded my dilemma a little better- :oops:
The Xcode examples given in the book are different than the actual Xcode4 program itself, apple recently changed how it works, so the examples in the book don't match up with the actual program. It's nothing too extreme, but for a newbie like me it makes it a little more difficult.

This is the book I am posting about :
http://www.amazon.com/Learn-C-Mac-Dave- ... roduct_top
(Some of the reviewers posted the same complaint)

I'm sure as I move further along the book I'll manage to make sense of it all... :oops:



NeantHumain
Veteran
Veteran

User avatar

Joined: 24 Jun 2004
Age: 46
Gender: Male
Posts: 4,837
Location: St. Louis, Missouri

20 Feb 2012, 2:21 pm

Based on a glance at the table of contents for that book on Amazon.com, it looks like only Chapers 2 and 12 are very particular to Xcode and the Mac OS X. Otherwise, the book is dealing with the C programming language itself and the Standard C Library, neither of which is specific to Xcode or the Mac OS X. If you want to get into Mac OS X- or iOS-specific programming, you need to learn Objective-C and the Cocoa API. C, though, is the base for Objective-C, so you are right to learn it first. C++ really isn't necessary if you intend to stay wholly on the Apple reservation since NeXT went with Objective-C instead of C++ for the object-oriented superset of C for NeXTStep/OPENSTEP, which later evolved into the Cocoa API of the Mac OS X.



JesseCat
Sea Gull
Sea Gull

User avatar

Joined: 26 Dec 2011
Age: 39
Gender: Male
Posts: 228

01 Mar 2012, 10:55 pm

Thanks for the help =)
Almost done with the book, plan on reading it again.
Getting the hang of it, but I imagine there is much more to learn.



Burzum
Veteran
Veteran

User avatar

Joined: 26 Apr 2011
Age: 34
Gender: Male
Posts: 1,205

02 Mar 2012, 3:08 am

nat4200 wrote:
And, the c language is the same regardless of what OS you learn on :D

Not exactly. For example, how many bytes are there in a long?

Then there's the issue of different preprocessor directives and keywords (__stdcall for example).



nat4200
Veteran
Veteran

User avatar

Joined: 10 Jan 2011
Gender: Male
Posts: 704
Location: BANNED

02 Mar 2012, 5:09 am

Redacted



Last edited by nat4200 on 21 Apr 2012, 12:52 am, edited 1 time in total.

peterd
Veteran
Veteran

User avatar

Joined: 25 Dec 2006
Age: 73
Gender: Male
Posts: 1,374

03 Mar 2012, 7:41 am

There are courses on iTunes U that use the latest XCode and iOS



Burzum
Veteran
Veteran

User avatar

Joined: 26 Apr 2011
Age: 34
Gender: Male
Posts: 1,205

06 Mar 2012, 7:49 pm

nat4200 wrote:
Easy, official answer: atleast 32bits and atleast as many as their are in an int :lol: (and I would expect any good guide to the language to explain this)

You know full well the point I was making.

nat4200 wrote:
Non-standard features are not officially part of the language :wink:

Doesn't matter whether they are standard, you will end up using them eventually.



nat4200
Veteran
Veteran

User avatar

Joined: 10 Jan 2011
Gender: Male
Posts: 704
Location: BANNED

07 Mar 2012, 3:15 am

Redacted



Last edited by nat4200 on 21 Apr 2012, 12:54 am, edited 1 time in total.

Burzum
Veteran
Veteran

User avatar

Joined: 26 Apr 2011
Age: 34
Gender: Male
Posts: 1,205

07 Mar 2012, 4:55 am

nat4200 wrote:
Who are your posts for anyway?

You.

nat4200 wrote:
I thought the "Not exactly. For example, how many bytes are there in a long?" was directed at me

It was.

nat4200 wrote:
but if you think I "know full well the point [you were] making" without you you having made it, then why did it bear mentioning?

Because I assumed that you would understand that I wasn't asking for the number of bytes in a long at least, but how many bytes are in a long exactly. And now for some strange reason you have turned this into a pointless debate.

nat4200 wrote:
If you want an integer of specific size you should use the types defined in "stdint.h"

I know. In fact that was the very point I was going to make. The stdint.h header exists because the language's built-in types differ across operating systems and compilers, which was the very point I was making that I assumed you would understand.


nat4200 wrote:
There are maybe three levels you can appreciate something like "__stdcall" on:

1. Recognising that it is non standard keyword; and recognising that as per the standard, symbols/keywords starting with a double underscore (or a single underscore and a capital letter...) are "reserved" for use by the implementation - eg. a program shouldn't define a variable,function or macro as "__FOO" (or "_BAR"...)
2. Understanding that it specifies a calling convention, and when you will need to use it working with an API or other 3rd party code
3. Understanding low level details, eg. how a program's stack and heap are used; and understanding what effect specifying a calling convention will have upon the function call.

I maintain that at most a book on learning C, aimed at beginners, should cover #1 above (ie. pointing out what names one shouldn't use for a variable/function/macro even if one's compiler may not give an error/warning).

I feel #2 should be covered in texts dealing with APIs that need the programmer to use non-standard calling conventions (eg. the Win32 API).

Who said anything about books aimed at beginners?

You said "the c language is the same regardless of what OS you learn on". You did not say "the C language does not differ across operating systems and compilers to the extent that it will have any bearing on a beginner learning the language".



nat4200
Veteran
Veteran

User avatar

Joined: 10 Jan 2011
Gender: Male
Posts: 704
Location: BANNED

07 Mar 2012, 6:33 am

Redacted