PDA

View Full Version : "Programming in Objective-C 2.0" - Developer's Library - Stephen G. Kochan




Darkroom
Jun 22, 2008, 04:01 PM
The 2nd edition of "Programming in Objective-C (2.0)" is being released in November 2008. It's available now for pre-order.

For someone who's currently learning Objective-C and Cocoa development, i would like to order the first edition from 2003, but i'm concerned that Objective C 2.0 will be vastly improved/different... is is worth waiting for this? how great is the difference between Objective-C and Objective-C 2.0?



Cromulent
Jun 22, 2008, 04:04 PM
You'll need to know Objective-C 1 if you are programming for the iPhone anyway as garbage collection is not available on it. So you'll still be doing your own memory management. Objective-C 1 is fine to use.

There are some nice features to Objective-C 2 but you'll do just fine with the 2003 book.

neiltc13
Dec 8, 2008, 06:57 AM
I'm looking into this book too. Amazon.com has it down for a US release on January 2nd, with a UK version launching later in that month. The cover makes specific reference to iPhone development.

http://www.amazon.co.uk/gp/product/0321566157/

North Bronson
Dec 8, 2008, 11:27 AM
You'll need to know Objective-C 1 if you are programming for the iPhone anyway as garbage collection is not available on it. So you'll still be doing your own memory management. Objective-C 1 is fine to use.

There are some nice features to Objective-C 2 but you'll do just fine with the 2003 book.

Isn't Garbage Collection part of Foundation?

When I read Kochan's book the whole first half was devoted to Objective-C *independent* of Cocoa frameworks (which I think is a good way to learn). Wouldn't Kochan have to use retain counts if he wasn't using Cocoa?

lee1210
Dec 8, 2008, 11:54 AM
Isn't Garbage Collection part of Foundation?

When I read Kochan's book the whole first half was devoted to Objective-C *independent* of Cocoa frameworks (which I think is a good way to learn). Wouldn't Kochan have to use retain counts if he wasn't using Cocoa?

Retain counts are a manual means of memory management. The runtime is just kindly enough to dealloc things when their retain count reaches zero for you, but there is no object graph used, and the reference counting is not done for you. The autorelease pool helps "automate" memory management, but is not a replacement for real garbage collection.

It is somewhat confusing, as retain counts and the runtime dealing with deallocation for you does seem sort of "garbage collecty". However the garbage collection introduced in Objective-C 2.0 is what a programmer used to GC'd languages like Java, the .NET family, and many functional languages like Lisp and Haskell would expect. It is completely automatic, and the programmer doesn't have to directly deal with managing the retain/reference counts. The problem this can cause is leaking of references, which would be the same as leaking memory in the absence of GC, and can be quite difficult to track down.

-Lee

nick9191
Dec 8, 2008, 01:10 PM
Preordered it a while back :)

skochan
Dec 21, 2008, 11:42 AM
Isn't Garbage Collection part of Foundation?

When I read Kochan's book the whole first half was devoted to Objective-C *independent* of Cocoa frameworks (which I think is a good way to learn). Wouldn't Kochan have to use retain counts if he wasn't using Cocoa?

Because garbage collection isn't supported on the iPhone, and because I believe it's important to understand object ownership, memory management is still emphasized throughout the second edition of the book. The primary changes to the second edition include the incorporation of the new objective-C 2.0 features (such as properties, synthesized accessors, and fast enumeration), the use of NSObject from the start as the root object (the first edition used Object), and a chapter that introduces how to write an iPhone application. All feedback is welcome.

Cheers,

Steve Kochan

toddburch
Dec 21, 2008, 12:27 PM
Hey Steve. I'm going through the first edition right now. I really like it. I read really slow and try to absorb as much as I can. I'm on chapter 15, and have only noticed one very insignificant typo so far. Very good job. I can't stand it when I'm "correcting the author" when I'm reading.

Todd

GorillaPaws
Dec 22, 2008, 12:50 PM
Because garbage collection isn't supported on the iPhone, and because I believe it's important to understand object ownership, memory management is still emphasized throughout the second edition of the book. The primary changes to the second edition include the incorporation of the new objective-C 2.0 features (such as properties, synthesized accessors, and fast enumeration), the use of NSObject from the start as the root object (the first edition used Object), and a chapter that introduces how to write an iPhone application. All feedback is welcome.

Cheers,

Steve Kochan

Hey Steve, I can't say enough good things about your book. I did find the bitwise operation section to be less polished than the rest of the text however, and it seems others on Amazon had commented on this as well. Did you happen to revisit that particular section in the 2nd edition at all?

Also, do you have any interest in writing a learning Cocoa book for people who just finnished your Objective-C book, possibly in a joint effort with Hillegass'? One of my criticisms of Hillegass' excellent book is that it seems to lack the degree of detailed analysis of what the code is doing (even when it's repetition) that was present in your book. I found this strategy in "Programming in Objective-C" to be a critical part in the learning process for me, and think others trying to learn how to program for the first time on a Mac would really benefit from your lucid writing style.

toddburch
Dec 26, 2008, 11:18 AM
The primary changes to the second edition include ... the use of NSObject from the start as the root object (the first edition used Object)...

I thought the use of Object (vs NSObject) from the beginning was fine, as it allowed the reader to focus on the whole OO paradigm versus getting immersed straight into a huge framework from the get-go. Perhaps you can make a side-note of it's use in the appendix?

laprej
Dec 27, 2008, 12:57 AM
This thread reminded me it was coming out soon. Fortunately, I received two B&N gift cards for Christmas so this time around there was absolutely no hesitation! :)

toddburch
Dec 27, 2008, 07:15 PM
In the new edition, are you getting rid of the deprecated methods like cString?

roamy
Dec 27, 2008, 08:12 PM
Well here is a dilemma - I can't program at all. I want to write a enterprise web app. Lets say another Ebay. As of today my option seems only Java. However does anyone out there think we may see a Cocoa ability to create enterprise apps with the coming of ObjC 2?

Now for anyone answering forget it period if you can't program then lets assume I am a expert but don't know Java or Obj C

Cromulent
Dec 27, 2008, 09:23 PM
Well here is a dilemma - I can't program at all. I want to write a enterprise web app. Lets say another Ebay. As of today my option seems only Java. However does anyone out there think we may see a Cocoa ability to create enterprise apps with the coming of ObjC 2?

Now for anyone answering forget it period if you can't program then lets assume I am a expert but don't know Java or Obj C

Apple does have an enterprise web app solution. It is called Web Objects and is based on Java.

roamy
Dec 28, 2008, 01:15 AM
Apple does have an enterprise web app solution. It is called Web Objects and is based on Java.

Thank you Cromulent - I am very aware of WO. I am wondering if they will have a web app solution with Cocoa as they currently do not.
WO was great when it had the tools

skochan
Dec 28, 2008, 10:41 AM
Hey Steve, I can't say enough good things about your book. I did find the bitwise operation section to be less polished than the rest of the text however, and it seems others on Amazon had commented on this as well. Did you happen to revisit that particular section in the 2nd edition at all?

I had an expanded description of the bitwise operators in Programming in C, but I decided to scale it back for the Objective-C title. Bad decision! I restored the more detailed explanation in the second edition. There are now truth tables for all the operators, and the explanations are not so terse!

Cheers,

Steve Kochan

skochan
Dec 28, 2008, 10:45 AM
In the new edition, are you getting rid of the deprecated methods like cString?


Yes, because this edition starts from the beginning with NSObject (instead of Object), I use NSLog almost exclusively instead of printf. That allows string objects to be displayed directly without having to first convert them to C-strings.

skochan
Dec 28, 2008, 10:55 AM
I thought the use of Object (vs NSObject) from the beginning was fine, as it allowed the reader to focus on the whole OO paradigm versus getting immersed straight into a huge framework from the get-go. Perhaps you can make a side-note of it's use in the appendix?

In the first edition, I was hoping Objective-C would really catch on as a cross-platform development language. Thus the use of Object instead of NSObject, and coverage of the Foundation Framework in the second part, which does allow portable, multi-platform applications to be developed.

Five years later, Objective-C remains primarily a Mac application development language. So, I gave in and decided to start with NSObject out of the box, but there's still no real coverage of the framework (other the autorelease pool that XCode automatically sets up) until the second part of the book, which is consistent with the first edition.

I also added another section to take the reader through the process of getting a program to run on an iPhone. In this case, the Calculator and Fraction classes that are developed throughout the text are used to develop a simple iPhone Fraction calculator. This serves as an introduction to the world of Cocoa and iPhone application development and ties everything together. By no means is this introductory chapter designed to replace any of the excellent Cocoa texts out there.


Cheers,

Steve Kochan

skochan
Dec 28, 2008, 11:03 AM
I'm looking into this book too. Amazon.com has it down for a US release on January 2nd, with a UK version launching later in that month. The cover makes specific reference to iPhone development.

http://www.amazon.co.uk/gp/product/0321566157/

See my answer in #18. There is an introduction to iPhone development. You are taken through the steps involved in designing an iPhone Fraction calculator, including building the interface with Interface Builder. However, this is not a tutorial on iPhone or Cocoa programming, as it covers just developing two particular types of applications on the iPhone.

Cheers,

Steve

skochan
Dec 28, 2008, 11:13 AM
Also, do you have any interest in writing a learning Cocoa book for people who just finnished your Objective-C book, possibly in a joint effort with Hillegass'? One of my criticisms of Hillegass' excellent book is that it seems to lack the degree of detailed analysis of what the code is doing (even when it's repetition) that was present in your book. I found this strategy in "Programming in Objective-C" to be a critical part in the learning process for me, and think others trying to learn how to program for the first time on a Mac would really benefit from your lucid writing style.

Thanks much. I have thought about it. Unfortunately, I'll have to leave it at that for now. :)

softweyr
Dec 29, 2008, 12:17 PM
Well here is a dilemma - I can't program at all. I want to write a enterprise web app. Lets say another Ebay. As of today my option seems only Java. However does anyone out there think we may see a Cocoa ability to create enterprise apps with the coming of ObjC 2?

Now for anyone answering forget it period if you can't program then lets assume I am a expert but don't know Java or Obj C

There are lots of alternatives, some of which run on the Mac. You didn't mention platform, so let me toss out the obvious Windows .NET suggestion. Other combinations based on Java include NetBeans/EJB/GlassFish and several different webapp environments that plug directly into Eclipse. Non-Java frameworks basically boil down to Ruby on Rails and PHP and *Sql on (your favorite unixy OS here). My favorite are BAPPs (BSD, Apache, PHP, PostgreSQL) but feel free to mix-n-match according to your own preferences.

Xcode, NetBeans, and Eclipse all have editor support for the common web languages like Ruby and PHP these days, so you have an embarassment of riches at hand for development tools.

I haven't found any web development frameworks written in Obj-C, or C or C++. I'm not sure of the reason, other than languages like PHP and environments like Rails have been designed with the flow of web programming in mind and have done a very good job. Java grew up with the web and so a large percentage of the "real programmers" that went into web programming did so with Java. The Java frameworks and servers that have survived are genuinely useful stable platforms with thousands (or more) users and useful documentation.

roamy
Dec 30, 2008, 11:18 AM
There are lots of alternatives, some of which run on the Mac. You didn't mention platform, so let me toss out the obvious Windows .NET suggestion. Other combinations based on Java include NetBeans/EJB/GlassFish and several different webapp environments that plug directly into Eclipse. Non-Java frameworks basically boil down to Ruby on Rails and PHP and *Sql on (your favorite unixy OS here). My favorite are BAPPs (BSD, Apache, PHP, PostgreSQL) but feel free to mix-n-match according to your own preferences.

Xcode, NetBeans, and Eclipse all have editor support for the common web languages like Ruby and PHP these days, so you have an embarassment of riches at hand for development tools.

I haven't found any web development frameworks written in Obj-C, or C or C++. I'm not sure of the reason, other than languages like PHP and environments like Rails have been designed with the flow of web programming in mind and have done a very good job. Java grew up with the web and so a large percentage of the "real programmers" that went into web programming did so with Java. The Java frameworks and servers that have survived are genuinely useful stable platforms with thousands (or more) users and useful documentation.
thank you for your response. I guess maybe it is just wishful thinking that Mac would replace WO. I am trying Netbeans visual web and it seems to be coming along. I guess I will compare that to WOLips and rails after Macworld. It seems that many WO developers are migrating to Rails.

mdeh
Jan 7, 2009, 10:27 PM
In the first edition, I was hoping Objective-C would really catch on as a cross-platform development language. Thus the use of Object instead of NSObject, and coverage of the Foundation Framework in the second part, which does allow portable, multi-platform applications to be developed.


Hi Steve...your new book arrived today. Just skimming through it, I see it has largely been rewritten with the new 2.0 features.

I **assume** :) those questions incorporating new terminology are posted somewhere??? Could you let us know where these are, so the more industrious of us can **really** get to learn it. Thanks.

skochan
Jan 8, 2009, 01:47 PM
I **assume** :) those questions incorporating new terminology are posted somewhere??? Could you let us know where these are, so the more industrious of us can **really** get to learn it. Thanks.

I'm not sure what you mean by questions. I assume you mean answers to exercises? No, the code and the answers to the exercises haven't been posted yet. I just got the book done before the holidays, so now I need to sit down and actually work out the answers to the even-numbered exercises, which I didn't even do for the first edition. It's quite a time consuming task (as I was writing some of the exercises I was grimacing at the thought of having to answer a couple of the harder ones myself). It's my top priority. I'm hoping to set up a web site shortly (or use my mac home page as I'm doing now) for errata, answers to exercises, and the source code from the book.

Feel free to pester me! :)

Here's a thought: I'll accept contributions (code, not $$$) for the even-numbered exercises via email, provide comments and give you credit if I use it. (Does that sound too desperate? :D)

Cheers,

Steve Kochan

toddburch
Jan 8, 2009, 01:51 PM
I can (try to) help with that. Now, where's that amazon link.... I've made it through page 400 of the first edition.

Koreos
Jan 8, 2009, 02:41 PM
Just received my copy... anxious to finish it!

JLatte
Jan 8, 2009, 02:45 PM
I just placed an order on Amazon, very much looking forward to reading.

mdeh
Jan 8, 2009, 03:07 PM
Here's a thought: I'll accept contributions (code, not $$$) for the even-numbered exercises via email, provide comments and give you credit if I use it. (Does that sound too desperate? :D)


Nope! I would love that challenge, as I am sure will others. But all the questions & answers need to be looked at in terms of the new headers and new dot notation for the accessors etc... I know from going through C and religiously going through the exercises in K&R how frustrating it was to find that the "C answer book" was outdated (Not that yours would be to the same degree). The beauty of a book like yours is that it is not only well explained, but offers the opportunity to feel one is really learning the language by doing the exercises, and more importantly, able to verify one's answers. I know it's asking a lot, but your publisher has put you in a corner by offering the answers on the informit website...which clearly has not yet happened. At least take heart from the fact that in this dire economy, you are one of the few left actually producing something new!!! :)

skochan
Jan 8, 2009, 04:38 PM
Nope! I would love that challenge, as I am sure will others.

That's great! If anyone does submit answers, be sure to only use features of the language that have been taught up to that point in the book.

Cheers,

Steve K.

softweyr
Jan 9, 2009, 01:05 AM
That's great! If anyone does submit answers, be sure to only use features of the language that have been taught up to that point in the book.

Hahaha, now I have to go buy the book. I haven't been quoted by an author in years. :)

SatCommEng
Jan 10, 2009, 03:53 PM
I have worked through my copy of the 2nd Edition (the first printing run) and, alas, the code for the final project (Fraction_Calculator) does not work as given in the book. I pasted the code directly from the Safari page online, but I can not for the life of me figure out why it doesn't work. The initial code compiles with 37 errors and 2 warnings!

I have found a couple errors already, but they have not solved all the problems. For some reason the "displayString" is null.

When are errata and code going to be posted?

skochan
Jan 10, 2009, 07:05 PM
I have worked through my copy of the 2nd Edition (the first printing run) and, alas, the code for the final project (Fraction_Calculator) does not work as given in the book.


YIKES!

These days publishing schedules have become so tight (due to increased pressure from free stuff on the Internet), that books today are going out with more problems than they used to (I've been writing for a while, as was pointed out in a previous post! ).

I tried hard to carefully read through the pages from the publisher, but it's not possible to catch everything. My first edition had over 100 typos! Many typos get introduced in conversion of the Word files to their internal publishing software (don't know what they're using now). I believe this 2nd edition is cleaner, but I've noticed the typos are starting to get recognized. I don't mean to complain, but you don't know what it's like to go through and circle all the quotes that are going in the wrong direction. All single character constants like 'A' were set by the publisher as `A' !!! As another example, their conversion chewed up many of my NSLog (@"....."); statements because it apparently thought that (@" was the start of special formatting. When you get distracted with things like quotes and NSLog statements, it's harder to focus on the content. Anyway, enough complaining.

Back to the problem. I desk-checked the text against my source code. Here's what I found:

Page 480: Title at the bottom of the page should be:
Program 21.2 Fraction_CalculatorViewController.h Interface File

Page 481: Seems like it got all messed up at the bottom of the page with the wrong code. This I think is source of most, if not all, of your errors.

Replace all 4 program lines with:

#import "Fraction_CalculatorViewController.h"
@implementation Fraction_CalculatorViewController

-(void) viewDidLoad {


Page 482: remove the line that reads

[window makeKeyandVisible];

Page 484: remove the line that reads

[window release];

I don't have access to the online version (:rolleyes:). If you cut and paste the code from there and then email it to me (steve_kochan@mac.com), I'll insert the above changes and verify that the program works.

I apologize for the errors. I will post an errata page soon...probably within the week. In the meantime, feel free to continue to post or email me with any more problem you find.

Cheers,

Steve Kochan

SatCommEng
Jan 11, 2009, 09:26 AM
Stephen,

Thank you for the prompt reply!!! I applied your corrections, and there were still several more typos, but I list them below:

p. 480 Program 21.2 Fraction_CalculatorViewController.h
Requires @end at the end of the code

p. 481 Program 21.2 Fraction_CalculatorViewController.m
Add the two @synthesize lines below

#import "Fraction_CalculatorViewController.h"
@implementation Fraction_CalculatorViewController
@synthesize display;
@synthesize displayString;
-(void) viewDidLoad {

I was then able to get the program to run. There is still some weird behavior I want to track down. When you first start the program (prior to doing anything else), if you enter a single number, such as 5 into the calculator and press the = button, the program crashes out to gdb with the following errors:

warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).


If you do the same thing after doing a normal fraction calculation, you get a line such as 5 = 5, which is correct.

Marc

skochan
Jan 11, 2009, 10:37 AM
There is still some weird behavior I want to track down. When you first start the program (prior to doing anything else), if you enter a single number, such as 5 into the calculator and press the = button, the program crashes out to gdb with the following errors:

warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).


If you do the same thing after doing a normal fraction calculation, you get a line such as 5 = 5, which is correct.

Marc

Marc,

Thanks for correcting my corrections! I've been looking at the code too long; that's what happens after several rounds of proof-reading.

As for your problem, that's actually a bug in the code and not a typo! In fact, this was pointed out to me late in the game by Mike Trent, my tech reviewer. It has to do with the fact that the variable op has not been set when you press the equals key without first entering an operation. This leads to a crash in the performOperation: method due to the fact that the result variable never gets set. I'll leave it up to you to address this in your code! :)

Cheers,

Steve Kochan

macsilvr
Jan 11, 2009, 03:51 PM
I've had the first Programming in Objective C book for about a two months now (I didn't realize a new one was coming out so soon). Is it worth getting the new one or should I finish up with the first one?

(The reason that it's taking be some time to get through it is that I have a heavy course load and am taking AP Comp Sci, which is all in java and having to switch between the two can get a little confusing)

GorillaPaws
Jan 12, 2009, 08:01 PM
I tried hard to carefully read through the pages from the publisher, but it's not possible to catch everything. My first edition had over 100 typos! Many typos get introduced in conversion of the Word files to their internal publishing software (don't know what they're using now). I believe this 2nd edition is cleaner, but I've noticed the typos are starting to get recognized.

The Pragmatic Programmers publishing house has started using a concept called the beta book program whereby pre-ordering customers gain access to a pre-release electronic version of the text while the book is going through its final revisions. They are later shipped the final product when it is officially released. In this beta stage, all of those extra eyes help catch errors before they go to print.

I'm guessing that wasn't an option with your publishers for this book, but it might be worth having your editors look into exploring something similar for your next project. Maybe we should all band together and write a cocoa version of their internal publishing software :eek:.

medievalone
Jan 16, 2009, 03:59 PM
I got the same result. I modified my clickEquals action to the following and all seems to work fine...

-(IBAction) clickEquals: (id) sender {
[self storeFracPart];
if(!firstOperand) {
[myCalculator performOperation: op];
}
[displayString appendString: @" = "];
[displayString appendString: (!firstOperand) ? [myCalculator.accumulator convertToString] : [myCalculator.operand1 convertToString]];
[display setText: displayString];

currentNumber = 0;
isNumerator = YES;
firstOperand = YES;
[displayString setString: @""];
}

Kevin


Stephen,

Thank you for the prompt reply!!! I applied your corrections, and there were still several more typos, but I list them below:

p. 480 Program 21.2 Fraction_CalculatorViewController.h
Requires @end at the end of the code

p. 481 Program 21.2 Fraction_CalculatorViewController.m
Add the two @synthesize lines below

#import "Fraction_CalculatorViewController.h"
@implementation Fraction_CalculatorViewController
@synthesize display;
@synthesize displayString;
-(void) viewDidLoad {

I was then able to get the program to run. There is still some weird behavior I want to track down. When you first start the program (prior to doing anything else), if you enter a single number, such as 5 into the calculator and press the = button, the program crashes out to gdb with the following errors:

warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).


If you do the same thing after doing a normal fraction calculation, you get a line such as 5 = 5, which is correct.

Marc

skochan
Jan 16, 2009, 06:43 PM
I will post an errata page soon...probably within the week.

I've consolidated the errors from the iPhone chapter and a few more that have been discovered elsewhere. They're posted here: www.classroomM.com/objectivec.

Please feel free to make contributions on that page or here. I will monitor both places.

Cheers,

Steve Kochan

Stucarius
Feb 23, 2009, 02:10 PM
I am currently learning C and will move straight to O-C afterward. I already bought the 1st Ed of Stephen's O-C in anticipation of that. I had no idea the new edition was about to come out.

Is there enough new stuff and is it Mac-centric enough that I should buy the new edition and write off the money spent on the first one?

Also, I have been looking for an accompany book to use with K&R as I am learning that is Mac-centric. Should I buy the new C on Mac edition or get Stephens C Programming book I have heard so much about?

My concern is that the C book might be a little dated in regards to Mac Xtools Dev.

Thanks for any answers.

Jeff

skochan
Feb 23, 2009, 02:23 PM
Is there enough new stuff and is it Mac-centric enough that I should buy the new edition and write off the money spent on the first one?

Hi Jeff,

I wouldn't invest in the second edition. Work through the first edition you have then go to Apple's website to read up on the changes added to Objective-C 2.0 (Don't have the link to the document handy).

You can also ask questions about anything related to the first edition or about Objective-C in general on the forum I set up for the book at classroomM.com/objective-c.

As for my C book, it's not Mac-specific at all. It's a general tutorial on C and is fully up-to-date with respect to the language. Since it's not a Mac-oriented book, there's really no instructions on using Xcode, Mac OS X, etc.

Good luck! Hope this helps.

Cheers,

Steve Kochan

Stucarius
Feb 24, 2009, 08:29 AM
Hi Jeff,

I wouldn't invest in the second edition. Work through the first edition you have then go to Apple's website to read up on the changes added to Objective-C 2.0 (Don't have the link to the document handy).

You can also ask questions about anything related to the first edition or about Objective-C in general on the forum I set up for the book at classroomM.com/objective-c.

As for my C book, it's not Mac-specific at all. It's a general tutorial on C and is fully up-to-date with respect to the language. Since it's not a Mac-oriented book, there's really no instructions on using Xcode, Mac OS X, etc.

Good luck! Hope this helps.

Cheers,

Steve Kochan

Thanks Steve...you are a good man to recommend "not" buying your book. Even for the right reasons. I have heard so many great things about your C book I think I am going to get it as my companion to K&R.

From what I can gather there are 3 truly great books in C programming. K&R, your book and Kings "Modern" book.

I am heading to the forums now. I am really really loving C. Much more so than C++. It would be really funny if an older language like C came back and took out newer languages as the preferred Dev Language. It has its oddities but there is something truly elegant about the language that most other high languages lack. Maybe it is just because it is so close to the hardware. "Power to the C."

Cheers on the flip side,
Jeff

SamRhoads
Mar 14, 2009, 10:22 PM
I just bought the book (Objective-C by Stephen Kochan). I do not
yet have a Mac, but I'm planning on getting one so I can try some iPhone apps.

In the meantime, I wanted to run the fraction calculator on my iPod Touch.
Is that app available on the web somewhere? How about the other code in
the book. Is it available for download somewhere?

Sam Rhoads

skochan
Mar 15, 2009, 05:17 PM
I just bought the book (Objective-C by Stephen Kochan). I do not
yet have a Mac, but I'm planning on getting one so I can try some iPhone apps.

In the meantime, I wanted to run the fraction calculator on my iPod Touch.
Is that app available on the web somewhere? How about the other code in
the book. Is it available for download somewhere?

Sam Rhoads

Sam,

Program examples, quizzes, questions, etc. are available at the forum for the book: www.classroomM.com/objective-c (http://www.classroomM.com/objective-c).

You need a Mac and you need to register with Apple for the iPhone developer program to get the Fraction Calculator app installed on your iPhone/iPod Touch. The only other way to get an app onto to your (non-jailbroken) iPod Touch would be through the App Store. The fraction calculator is not available from the App Store.

In the book you learn how to write an iPhone application that you can run and debug on the Mac using the iPhone Simulator that is distributed as part of the iPhone SDK. But once again, you need a Mac.

Cheers,

Steve Kochan

thingsis
Mar 24, 2009, 04:39 PM
Hi,

I just started reading the book. My question is do you guys think I should do every exercise, or is it enough if I start doing them in Section II of the book (p. ~300)? I am a computer scientist so I know some programming languages - including Smalltalk. I definitely plan on reading the whole thing - just don't really want to do all the exercises.

Whats your opinion?

Henrik

Cromulent
Mar 24, 2009, 04:51 PM
Hi,

I just started reading the book. My question is do you guys think I should do every exercise, or is it enough if I start doing them in Section II of the book (p. ~300)? I am a computer scientist so I know some programming languages - including Smalltalk. I definitely plan on reading the whole thing - just don't really want to do all the exercises.

Whats your opinion?

Henrik

You should always do the exercises. If you already know it then they should be easy and you can confirm that with yourself.

If you find them hard, then there is something that you have misunderstood and you know that you are not ready to move on yet.

Darkroom
Apr 17, 2009, 08:04 PM
though it might be helpful to post the "Corrections of 1st Printing" .PDF here...

dantherevelator
Apr 17, 2009, 08:30 PM
though it might be helpful to post the "Corrections of 1st Printing" .PDF here...

Ooh! Groovy. Thank you.

skochan
Apr 18, 2009, 01:32 AM
Thanks for posting that. It's really the corrections for the 1st and 2nd printings. If you have a PDF or Safari Books online version, then it's just for the 1st printing (don't ask!).

The forum noted about five posts back also has corrections after these printings posted as well.

Cheers,

Steve Kochan

tnsmart
Jun 15, 2011, 06:55 PM
I'm not sure what you mean by questions. I assume you mean answers to exercises? No, the code and the answers to the exercises haven't been posted yet. I just got the book done before the holidays, so now I need to sit down and actually work out the answers to the even-numbered exercises, which I didn't even do for the first edition. It's quite a time consuming task (as I was writing some of the exercises I was grimacing at the thought of having to answer a couple of the harder ones myself). It's my top priority. I'm hoping to set up a web site shortly (or use my mac home page as I'm doing now) for errata, answers to exercises, and the source code from the book.

Feel free to pester me! :)

Here's a thought: I'll accept contributions (code, not $$$) for the even-numbered exercises via email, provide comments and give you credit if I use it. (Does that sound too desperate? :D)

I realize this is an old thread, but I have begun to work through my copy of the book, and am wondering if any answers have been published on the web by the author, Mr. Kochan. I found this forum: http://classroomm.com/objective-c/index.php?board=3.0, but would prefer answers given by the author.

Also, I saw that the third edition of the book will becoming out shortly. Will there be answers in there?

skochan
Jun 15, 2011, 07:04 PM
I do two things that are a bit controversial:

1. I don't post the source code - I think that a big part of the learning process is gained by typing in the examples. That way you learn how to recognize and fix compiler errors. You don't get that by cutting and pasting the examples. With that said, readers have posted the code to the forum. I still recommend every reader type the examples in anyway!

2. I don't publish "official" exercise solutions. Again, there's so much of the learning process to be gained by working through the exercises. I like the fact that readers have published different solutions, and I'm happy to review a posted solution from a forum member. I did "sticky" the exercise solutions from one particular forum member that I did review and considered to be excellent solutions. In the past I've posted answers to odd-numbered exercises for my other books and earlier editions. That was based on requests by instructors that not all the answers be published so that exercises could be given as class assignments. So this has not been a "static" position I've held. As for the third edition, the exercises are mainly unchanged, and the answers are not included in the text itself.

I realize that not everyone agrees with my methodology here. But I do spend a lot of time on the forum personally answering as many posts as I can. :).

Cheers,

Steve

tnsmart
Jun 15, 2011, 07:47 PM
Ok. Thanks!