Gladdening challenges (aufgaben)


just to been mentioned (I read the frustrated post before…): My enthusiasm for this book increases by every chapter and every challenge. First it seems like there are things asked from you you haven’t learned yet. but the things are only “details” on the surface, I think as further you’re with the book as more comes the basic logic and affect to the behaviour of the computer to daylight. every challenge shows the missing things for real, you can depreciate them and go on. eventually I think you can’t know every class and it’s methods, but you can take a look easely and you’ll know how to use’em.
I finished chapter 15, but not the challenges…so I don’t read the posts there yet…I just read the challenges and I’m pleased to do them, next time, now I need some sleep.
thanks for the book! great! :mrgreen:
(hope my english is understandable…)


Your english is excellent, and your words are appreciated. I’m glad you are finding the book useful.


I generally agree, but

  • (NSHost *)currentHost
  • (NSString *)localizedName

seemingly came from nowhere! Even a two paragraph explanation of what this means would have saved much headache.


I agree with frotty. I’m starting to question the reviews I read that prompted me to buy this book.
The +(NSHost*) currentHost has me puzzled and I’m the type of guy that doesn’t like to move on unless I 100% understand the presented material. I understand the notion of making a person do a little research but gesh…

None the less I will continue the challenges and rewrite them when I confirm my solution did not match those in the know.


[quote]…seemingly came from nowhere! Even a two paragraph explanation of what this means would have saved much headache.

Question your learning attitude first.

Don’t expect to be spoon fed; the challenge gave you enough hints to get you started.

Be inspired by Stefan’s gladdening challenges (aufgaben) poetic prose.

Here is what the challenge was asking for:

int main (int argc, const char * argv[])
    @autoreleasepool {
        // Verbose version
        NSHost *myMachine = [NSHost currentHost];
        NSLog (@"My machine's details: %@", myMachine);
        NSLog (@"My machine's name: %@", [myMachine localizedName]);
        // Concize version
        NSLog (@"My machine's details: %@", [NSHost currentHost]);
        NSLog (@"My machine's name: %@", [[NSHost currentHost] localizedName]);
    return 0;

NSHost is a class. It has a class method named currentHost, which (when invoked) returns an object (an instance of NSHost) to which we can send messages; we are sending it the message localizedName.


Wow. That was snotty lol. You know what. Your absolutey correct. I am the only one questioning the challenges Thank you for putting me in my place