Cocoa Programming for Mac OS X
Intro to Cocoa
If you're interested in programming for Mac OS X, you've
definitely heard of Cocoa by now. Cocoa is the name of the library of
frameworks that gives you the ability to write advanced applications with ease. The Cocoa frameworks enable you to perform tasks that used to take a decent amount of code and implement it in a very straightforward manner. The hardest thing about learning Cocoa is that because it's so simple, it takes some getting used to.
Until today, there was only one book if you wanted to learn Cocoa. That book is Learning Cocoa , which is published by O'Reilly and written by Apple Computer, Inc. The new kid on the block is Cocoa Programming for OS X, which is published by Addison-Wesley and written by Aaron Hillegass of the Big Nerd Ranch. With two books out, Cocoa programmers now have an actual choice of which book to buy. Which brings us to the point of this review -- which book is better?
Is it really O'Reilly?
Since Learning Cocoa was out first, I'll start with my
analysis of it first. When I heard that O'Reilly was going to start publishing
OS X programming books, I was stoked. O'Reilly books have historically been amazing -- very complete and straightforward sources that any programmer would be proud to have in his or her arsenal of knowledge. Unfortunately, Learning Cocoa falls short of the O'Reilly tradition, and makes me wonder if O'Reilly actually supervised the printing of this book.
There are some good points about the book. It was the first and only Cocoa book, so when I got my copy back in May, I was looking forward to learning the language. It does provide some good examples on how to write Cocoa applications, which allows one to dive straight into Cocoa programming. The introduction to Cocoa is really good -- it gives a very in-depth description of Object-Oriented and Cocoa program design, which I really like. Additionally, it gives a very good background to the concepts and techniques of using Cocoa.
However, there is a real problem with this book. This book reads more like it was meant to be an internal reference at Apple, rather than a book for the beginner. Another problem is that the layout and order of the content is confusing. Unlike past O'Reilly books and other quality programming books, it seems like this time they took a bunch of internal technical documents on Cocoa, and sent them to the binding machines without further editing. That the book credits "Apple Computer, Inc." as the author provides good evidence for my theory.
The heart of the problem is that the reader has to really dig and explore through this book to find that info that he or she wants. When learning a new language or programming concept, a book should be easy to follow and it should allow the reader to focus on learning the actual concepts, and not having to figure out the flow of the book.
Aaron hits a home run
The "flow" statement is a perfect segue into my analysis of
Cocoa Programming For Mac OS X. Right away, I could tell that I was going to like this book. The author, Aaron Hillegass, wrote this book like he is a friend
speaking directly to the reader -- he takes you through each concept like he is right there with you. This book teaches you Cocoa by specifically having you write applications, and in each new chapter, you add new features. As you add each new feature, you'll learn an important Cocoa concept.
O'Reilly's book also has the reader write applications and add features, one by one, but it does so in a very sporadic way. I was never really sure what the purpose of adding a certain method was, whereas with Aaron's book, each chapter is focused on an ordered and very specific concept, making it very clear what I was about to learn, and why.
Another part of this book that I really appreciate is the chapter on Objective-C. In just one chapter, I understood Objective-C. You must already know C and at least one object-oriented language (like C++ or Java,) but after reading this chapter, you will be able to write Cocoa applications in Objective-C.
This book comes with an online counterpart, powered by Techstra. Techstra is an online engine that allows you to enter any page of the book and get "extras." The extras include examples not in the book, solutions, errata, and even input from readers. It's very cool and very helpful.
A final and very strong point of Aaron's book is that it reflects the latest update of the Mac OS X development tools, Project Builder and Interface Builder. Apple just updated the development tools to version 10.1, substantially changing the UI and functionality, and the latest version is reflected in Aaron's book.
Conclusion
It's clear to see which book I'm giving the nod to. I know
it appears like I'm being biased towards Cocoa Programming For OS X, but if can get to your local bookstore and actually compare the two books side by
side, you'll see why I'm so enthusiastic about Aaron's book.
I think having both books is a good choice, as the O'Reilly book does offer very in-depth information, which is useful once you learn Cocoa using Aaron's book. If O'Reilly changed the title to After Learning Cocoa, I think my perception of the book would be different.
Cocoa allows programmers to write powerful applications in a very short amount of time. I am amazed at the power and simplicity of the Cocoa frameworks, and can't wait to see what myself and other programmers end up creating in the future. I'm sure other books will come out in the future, but for now all we have is two. The one I'd recommend is Cocoa Programming for Mac OS X, but you already knew that. :)
You can purchase this book at Fatbrain. Want to see your own review here? Read the book review guidelines first :)
First post to say "Mmmmmmmm ... cocoa"
Du Kannst mich am arsch lecken? Ich sollte mit etwas oben kommen, das neu ist zu sagen
(This is on topic because it's nearing the Xmas season...) Is it "hot cocoa" or "hot chocolate"? What's the difference?
Got Rhinos?
. . , . , . .
Will I have to buy several add-ons to change the colors in the IDE? And will they be translucent?
Cocoa allows programmers to write powerful applications in a very short amount of time
Working in an office where my fellow software developers have had the 'joy' of working with mac OS X... I can assure you the above statement is about as false as they come.
But don't take my word for it... Go ahead and actually look at the library... It's worse than microsoft's MFC... sure it's simple at first, but you can't do anything advanced with it, without ending up directly accessing memory registers (to set the mouse position in OS X for example)...
---
Programming is like sex... Make one mistake and support it the rest of your life.
they finally have admitted it, the mod system here is now worthless. get modded up but the people who run this site don't like it , too bad. hyprocricy in action here folks...here's the admittal, right here!
the NeXT Programmer's Manual (by Simson Garfinkel, i believe) is a very useful Mac OS X programming resource (although it doesn't help with Cocoa). the OS X programming environment is substantially the same as the NeXTSTEP/OPENSTEP environment. they're both based in Objective C, and even many of the windowing calls are the same (most of whose names still begin with "NS" for "NeXTSTEP"!).
Since the rest of the world uses C++ wouldn't that have made a TEENSY bit more sense or even
given that OS X is BSD Unix at its core just put all the APIs in C and have wrappers in a language-u-like?
Objective C is a kludge of a language, syntactically it looks like a language from a completely
different paradigm was parachuted into C with little or no attempt whatsoever at merging the
syntax so you end up with something that looks
IMO similar to embedded SQL and just as ugly.
For all their faults , at least you can see that Java and C++ are a natural progression from C
syntactically.
Weeelllll -
my cunt is a'drippin',
your lips are a'sippin',
my ass is a'crappin',
your mouth is a'lappin'
all that comes out of an oracifce
you eat for a main course-ifice
poop and pee, all a'yummy
Sitting proud inside your tummy!
Thank you, thank you very much. I'll be here all week. Tip your waitstaff.
Hot cocoa is made with cocoa powder (2 tbs each cocoa and sugar per 8 oz milk). Hot chocolate is made by melting chocolate in milk. (IIRC)
Best Slashdot Co
Shit, I just tried to post a witty reparte in Japanese and the FUCKING lameness filter prevented me; said I'm using too many caps. (Obviously Slashdot is fucking USELESS when it comes to UNICODE. Not that I'm surprised, knowing the quality of the so-called programming talent behind this site.)
Objective-C is uglier than Brainf$ck.
Is there any reason why they chose Objective-C
over C++?
Thanks in advance.
Two resources I've found useful in Cocoa programming are stepwise.com and O'Reilly's Mac Devcenter.
Lies about crimes
Apple's Cocoa or cocoa, the computation in commutative algebra system?
is a fucking CENSOR.
For anyone interested in developing for Apple's platform, the Apple Developer Connection is an indespensable resource. I haven't read the O'Reilly book on Cocoa, but I suspect that, since it was written by Apple, most of the information there can be found, for free, on Apple's site. Apple has provided well-documented APIs, sample code and several tutorials for both Objective-C and Java (despite what the reviewer said, check here). Also, for those who want to develop for Mac OS X, once you have it installed, and the developer kit from Apple (after all, you won't be able to develop without it), you will find that most of the tutorials, API documentation, etc. are on your hard drive. This includes extensive documentation on the changes that Apple made to the BSD development tools (gcc, gdb, ld, ...).
In short, my point is that if you are already familiar with programming in C, C++ or Java, you don't need a book to learn Cocoa. The information is all provided for free by Apple.
I prayed about it, and God said, "Don't do it!" But I thought, "I know better."
Here is my ass
Which you may kiss.
Take time and aim well
You don't want to miss.
For if you aim low
And your lips they do fall
Then you will find
You'll be sucking my balls.
If you aim high
Despite your true heart
Sucks to be you
Now you're eating my fart.
Thank, you're too kind. I'll be in Vegas next week. Please, remember you waitstaff.
Well, maybe not, but as a everyday user of OSX its easy to see how Cocoa apps are the future. They interact better with the OS, they seem less bloated, and they just seem tighter. Cocoa apps like Okito Composer are compelling reasons to move to X... it blows away MS Word.
"Smokey, this isn't Nam, there are rules." -Walter
For each cup:
Mix 2 tbs cocoa powder with 2 tbs sugar.
Slowly add 8 oz milk while stirring.
Heat on stove, but do not allow to boil!
Add 1 shot of either orange liquer, creme de menth, or Irish Cream.
If you don't like those froo froo 'liquers' but instead prefer real liquor, add 1 shot Southern Comfort Bourbon or Rum
Best Slashdot Co
Hello my friends. My neighours son has dug up his odyssey2 now that the kind american troops have given him a watchman to use as a display. He is planning to use it to run OSX as he has been very impressed by the BBSD liike interace, and the very cool accessories. When wwe get iPods we will use it too load up our tunes for when we go to the market to look at girls. Can we program with thhis cocoa? If we pput firewire in the Odyssey2 will cocoa support this? Thank you.
making the most of the Commodore since 1982 http://www.ij.net/rmscomp/cbm.html
Make a desktop theme that looks like apple - that's a lawsuit.
Send death threats to Steve Jobs - that's a lawsuit.
No sense of humor for such a 'fun' company. I assume the only reason all the commie, longhaired, fat linux freaks like slashbots still love apple despite that is their common bond - raging homosexuality.
My dad just got a new G4 with OSX on it. He wanted to network it with his Win2K box so I thought I'd just build Samba on it. After I figured out how to get root on it, I discovered the most basic UNIX tools were not there (e.g., Make, gcc, etc.). There was nothing on the disks that shipped with it, so I went to apple.com and what they put you through to download the GNU tools is unbelievably bad. I like OSX, but it seems to me if they want people to develop for it they would want to make it easy to get the tools to do it. I had to fill out form after form after form and at the end there was still no obvious link to download the GNU tools. It was late and maybe I was just tired, so if anyone knows an easy way to get these let me know.
You can set the mouse position through Core Graphics. No, it's not Cocoa per se, but the CG APIs can be called from Cocoa. "Direct access to memory registers" isn't required.
The review is right. It's not layed out well, it's difficult to navigate. Worst of all, most (if not all) of the examples from the book are taken from Apple's web site. Save yourself some money and time and get the book by Aaron.
Ahh my first computer. The COCO. 16k of ram, cassette player for storing programs, 300 baud acoustic coupler. Ahh yes. Oh wait, COCOA - nevermind.
Don't Tread on Me
I think Mojo Nixon would approve.
Emperor Norton would probably be embarrassed such adulation, even for such a great man as himself.
Norton Is Everywhere
When I look out into your eyes out there,
When I look out into your faces,
You know what I see?
I see a little bit of Emperor Joshua Norton
In each and every one of you out there.
Lemme tell ya...
Weeeeeeeeeellllllll...
Norton is everywhere
Norton is in everything
Norton is in everybody
Norton is still the king
Man o man
What I want you to see
Is that the big N's
Inside of you and me
Emperor Norton is everywhere, man!
He's in everything.
He's in everybody...
Emperor Norton is in your jeans.
He's in your cheeseburgers
Norton is in Nutty Buddies!
Norton is in your mom!
He's in everybody.
He's in the young, the old,
the fat, the skinny,
the white, the black
the brown and the blue
people got Emperor Norton in 'em too
Emperor Norton is in everybody out there.
Everybody's got Emperor Norton in them!
Everybody except one person that is...
Yeah, one person!
The evil opposite of Norton.
The Anti-Norton
Anti-Norton got no Emperor Norton in 'em,
lemme tell ya.
Michael J. Fox has no Emperor Norton in him.
And Emperor Norton is in Joan Rivers
but he's trying to get out, man!
He's trying to get out!
Listen up Joanie Baby!
Norton is everywhere
Norton is in everything
Norton is in everybody
Norton is still the king
Man o man
What I want you to see
Is that the big N's
Inside of you and me
Man, there's a lot of unexplained phenomenon
out there in the world.
Lot of things people say
What the heck's going on?
Let me tell ya!
Who built the pyramids?
Norton!
Who built Stonehenge?
Norton!
Yeah, man you see guys
walking down the street
pushing shopping carts
and you think they're talking to allah,
they're talking to themself.
Man, no they're talking to Emperor Norton!
Norton! Norton!
You know whats going on in that Bermuda Triangle?
Down in the Bermuda Triangle
Norton needs boats.
Norton needs boats.
Norton Norton Norton
Norton Norton Norton
Norton needs boats.
Aahh! The Sailing Norton!
Captain Norton!
Commodore Norton it is.
Yeah man, you know people from outer space,
people from outer space they come up to me.
They don't look like Doctor Spock.
They don't look like Klingons,
all that Star Trek jive.
They look like Emperor Norton.
Norton!
Everybody in outer space looks like Emperor Norton.
Cause Emperor Norton is a perfect being.
We are all moving in perfect peace and harmony towards Nortonness
Soon all will become Emperor Norton.
Everything everywhere will be Emperor Norton.
Why do they call it evolution anyway?
It's really Nortonlution!
Nortonlution!
Norton is everywhere
Norton is in everything
Norton is in everybody
Norton is still the king
Man o man
What I want you to see
Is that the big N's
Inside of you and me
That's right ladies and gentlemen,
The time has come!
Time has come to talk
To that little bit of Emperor Norton inside of you.
Talk to it!
Call it up!
Say "Emperor Norton, heal me!"
"Save me, Emperor Norton!"
"Make me be born again
in the perfect Norton light"
That's right!
You've got that Norton inside of ya
and he's talkin to ya
He says he wants you to sing!
Everybody's got to sing like the king!
Like the king
Get that leg going now
Get your lip too.
Not no fool Billy Idol lip either
Everybody!
Yeah, we're rockin now!
Norton is with us.
He's with us and he's speaking to us.
He says "Peoples!"
"Peoples!"
"Everybody!"
"Everybody got to sing!"
Norton is everywhere
Norton is in everything
Norton is in everybody
Norton is still the king
Man o man
What I want you to see
Is that the big N's
Inside of you and me
Norton is everywhere
Norton is in everything
Norton is in everybody
Norton is still the king
Man o man
What I want you to see
Is that the big N's
Inside of you and me
Emperor Norton!
No it's not a "marketing thing." If you know anything about OO and Java programming, it's actually very easy to write a Swing program that uses the Aqua look and feel. And you can place Cocoa-access code in its own objects so that you can remove / change that code later.
I find that it's actually very good for prototyping complex GUI apps. And the reason there isn't much information about it is that the Java API is simply a name-for-name bridge to the Objective C api. The objects (almost all of them) are provided in Java as bridges to the actual Obj C objects.
They essentially did the Visual J++ thing but they did it __right__. Their classes are in addition to the Java 2 platform, not a sneaky replacement for it. I personally wish __more__ vendors would provide platform-level access in bridged Java classes.
"I think there is a world market for, maybe, five computers." __ IBM Chairman, 1943 __
For those interested in learning Objective-C (assuming a working knowledge of C), look no further than
this PDF.
Slashdot's first reaction to VMware
Add a touch of ceyenne instead of the booze. It will intensify the Cocoa. Trust me, it does work.
This comes from Central America, it is not my idea.
photosMy Photostream
...and it's Mac OS X Developer's Guide by Jesse Feiler. It's probably best described as "a developer's introduction." It is very broad, covering topics from the Mach kernel to the Interfact Builder. It's at least worth a look.
Java applications that only run on Windows are *bad*, and Cocoa-Java apps are... well, no one said they are good per se, but you'd think Sun would have to object on the same grounds. 'Cept that it is Apple.
But you'd think it's Unix, too, so it potentially steals market share...
ZOMG I WOULD LOVE TO KNOW ABOUT YOUR FEELINGS ON MACINTOSH VERSUS WINDOWS, VI VERSUS EMACS, AND HOW YOU'RE NOT A DORK
This page contains a list of applications that are either already Carbonized or Cocoaized or are in the process of being Carbonized or Cocoaized. Check it out at Xappeal
Support Texas Troops use TXGoogle
IMO, there's a MUCH better book on Carbon programming out now, which is about 1.75" thick and darned heavy - I think it's called "Carbon Programming" or vice versa... D'ohhh.
Keep in mind, too - what the difference is between Cocoa and Carbon. The former being Objective C (object oriented and much like C++) and the "real deal" for MacOS X programming, and the latter being based on C. The benefit of the latter being that it will run on either MacOS 9 or X. Then again, there's higher level languages that you can use like RealBasic or Applescript - or hell, Perl. :)
Be sure to check out Everything Mac for loads of MacOS X goodness.
There is work being done to let Python be another Cocoa language by enabling python to access Objective-C objects. This is a great idea as it would let Cocoa apps be built and prototyped very fast.
Even if you don't favor making your releases in Python few people disagee that Python is great for rapid prototyping.
If you are interested in helping out visit the sourceforge project where work is just beginning on a rewrite to take advantage of Python 2.2's new class/type system.
I can't spell or type, but that doesn't mean I'm unusually stupid.
There are tons of posts here saying Objective C has an ugly syntax.
;), but these people are too ignorant or blinkered to realise this.
.NET runtime or at least the Base Class Libraries. C is limited without sdtlib, C++ needs the STL or on MS platforms (shudder) MFC to get the full benefits.
What they mean is it doesn't look like C and C++ and Java.
Of course, how it looks has no bearing on how useful a language it is (heh, think Perl
Who cares what the syntax for calling a function is? So long as its not 3 pages of code its irrelevant.
Do we see any insightful comparison of the truly powerful language features from these people? Do we see discussions of how C, C#, C++, Java and Obvjective-C's approach to types and bindings work? How they support dynamic behaviour?
eg, I'm prepared to state that Objective-C makes generic types unnecessary, whereas C++ relies on them and Java is introducing them (slated for JDK 1.5). This is a good thing in C++, will be a good thing in Java, and I expect to see them in C# one day, because of commonality between how these languages are defined. Objective-C doesn't need them, it has another solution, more akin to Smalltalk.
We don't see this sort of comment (shallow though my example is) from most of the posters here because frankly all that they're experienced enough to comment on _is_ the syntax.
Even all that said - the features of the language pale into insignificance next to the quality of the class library. Java is nothing without the java.* and javax.* classes, C# is useless without the
This is a review of a book about Cocoa, not Objective-C. The class library, not the language. The class library will dominate any concern over the language used to program it. Learning a language takes days (or weeks if its something completely new to you like your first declarative functional or logical language). Learning a class library can take months or years (depending on the size).
Do yourself a favour and learn some more languages. Learn about languages. Use real class libraries. Then open your big mouth!
Lord Pixel - The cat who walks through walls
A little bigger on the inside than out
But now that Red Hat is doing it, Slashdot refuses to tell the story. In fact, I don't believe I've ever had a submission get rejected so quickly.
Perhaps Slashdot is Red Hat's little bitch.
But anyway, here's the story. Red Hat is not allowing people to distribute Red Hat Linux. If you do, they insist you call it something else. A clear violation of the GPL if I ever saw one. I guess if its someone like Red Hat or VA, they can violate the GPL as much as they want and Slashdot could care less.
Read about it here
If you want to know more about objective c, or to prepare before reading the books above, or to gain more depth of understanding of the language if the chapter or so spent in the above books doesn't explain enough, then look no further than this:
Object Oriented Programing and the Objective C language. Originally a Next Step book, now available free (HTML/PDF) at Apple.com or thru print on demand at Fatbrain.
Lord Pixel - The cat who walks through walls
A little bigger on the inside than out
There's a free ~40 page tutorial + sample code available at http://www.areax.net that covers both an introduction to Objective-C for C++ programmers as well as Objective-C++, the new (well, recently revived) language that lets you use C++ libraries in Cocoa. Check it out! link
the "MAC" in MacLisp stands for "Multiple Access Computers", the department at the MIT AI Lab in which MacLisp was developed.
MacLisp was developed in 1966, over ten years before Apple Computer got it together.
I'm thankful for a clear review of a book that has proved very useful. Its always hard to attract a broad audience without alienating someone yet "Programming Cocoa" has achieved a nice balance. And the reviewer is right: The frameworks are extensive (the usual learning curve) but you will be surprised at how much is taken care of for you - if you don't choose to override it. Other nice sources for programming Cocoa are Jesse Feiler's new book "Developing for OS X" and a fine series of articles geared toward newbies (but not without solid insights) at O'Reilly Mac Devcenter written by Mike Beam.
How much of this is applicable to GNUstep or NeXTStep? Any of it?
-- Ed Avis ed@membled.com
First we had Java Beans, now Cocoa Puffs?
Ignorance is the root of all evil.
I much as I dislike community-bashing, I have to agree with you on this one. The final exam for my programming languages class in in two hours and this course definitely opened my eyes to the irrelevance of syntax.
I only knew C/C++ before taking the class. At first glance, languages like ML, lisp, and Prolog seemed ugly and stupid. Then I made a fully functioned binary search tree in 32 lines of ML code (including comments). Or how about a program that does symbolic derivation and integration in 50 lines of Prolog. The syntax didn't matter. I just adapted my programming style and got some rather impressive results.
Syntax doesn't matter when it comes to the power of a language. Just because Japanese has a subject-object-verb sentence structure and complicated verb conjugations doesn't mean it can't express the same ideas English does. After some practice the grammar and conjugations come natural. Learning programming syntax happens the same way.
Okay, I'm rambling and should be studying for my final.
so this is the first community developed patch for the opensource cocoa project :)
"Shit, I just tried to post a witty reparte in Japanese and the FUCKING lameness filter prevented me; said I'm using too many caps. (Obviously Slashdot is fucking USELESS when it comes to UNICODE. Not that I'm surprised, knowing the quality of the so-called programming talent behind this site.)"
or maybe you lie about your ability to actually speak Japanese let alone write it? Just a thought
The death of one man is a tragedy; the death of a million is a statistic --Joseph Stalin
Sie wissen dAS fuhurer DOS nicht wie fröhliche Leute. Und Sie saugt nur fucking.
"(This is on topic because it's nearing the Xmas season...) Is it "hot cocoa" or "hot chocolate"? What's the difference?"
Hot choclate is really more of a water based beverage then you add powder. Hot cocoa really (at least for me) is more like a milk based one.
Hope that helps.
"Objective-C is uglier than Brainf$ck. Is there any reason why they chose Objective-C over C++? "
Reseume building?
Did you know that there is a nice little guide that discusses object oriented programming in straight C? really cool.
The death of one man is a tragedy; the death of a million is a statistic --Joseph Stalin
Apple does not include the compilers in the default install. The retail box of Mac OS X includes them on a seperate install disk. If you order a new computer, you don't get the disk. I wish Apple would change that.
However, I would not say that what they put you through is unbelievably bad. You go to ADC, get a free account, download. Sure the website could use a nice reorg so it's easier to find the tools, but it's not _that_ bad. It's much easier if you know that you have to sign up for ADC first.
I've heard though side statements from some developers (not directly from Apple, and not directly to me, I've no inside info from Apple at all) that the reason that Apple does not include the dev tools by default is that Apple does not want to make GPL software part of the default install to avoid any possible license conflicts.
Apple's being paranoid, but it is their property that they'd be risking if someone claimed that the GPL tools pulled in the rest of OS X and source needed be released. Apple does support Open Source projects (including GPL Software), so it's not like they are so paranoid they won't use it at all. I don't know what Apple does for Mac OS X Server.
I'd like it if apple put a shell script in place of cc that gave instructions on how to get and download the tools. It still would be a pain that the tools aren't there, but at least anyone using the tools would know what happened, why, and how to fix it.
the mac api did have a c binding but you had to specify a pascal binding to all your functions
To the extent that this is sort of true, it is still true. Pascal has a different stack convention from the one in C. The convention that Pascal uses was shared by most other languages at the time, but C originated as a system language. C is organized such that functions like printf could take a variable number of parameters using a kludge involving pointing directly to the stack.
However, C and C++ compilers for the Mac all accept the "pascal" keyword, which is included in all the header files for the API. Besides that, you can ignore it, except in the special case where you need to pass a pointer to the API for a callback function. Then you need to declare your function as pascal, too. You have never had to declare all your functions pascal.
Also, the majority of the API calls are not bindings in the strict sense of the word. They use compiler extensions to produce inline traps in the code.
Does everything in the Unix world have to have "g" in front of it for you to know what its called?
Here are some more books on MacOS X / Cocoa / Carbon Programming:
.. and you can develop "X-only" applications with this)
Java: "MacOS X Java" Wiliams, Albert, Hart, Hopkins and Steinberg, Wrox press. (Just got this one, reading it now)
WebObjects 5 for Java: A Developer's Guide (With CD-ROM)
by Jesse Feiler (Paperback)
Java & ObjC: "Mac OS X Programming" by Dan Parks Sydow (got this one on order)
Mac OS X Developer's Guide by Jesse Feiler (Paperback) (this is an OK text, some good examples with ObjC & Java, but lacks a lot of detail on many Cocoa topics)
Mac OS X Carbon Developers Black Book (With CD-ROM) by Dan Parks Sydow (Paperback) (don't have this one)
REALbasic: "REALbasic: The Definitive Guide" by Matt Neuburg (good book, but only covers development with REALbasic
Steve Job's NeXT Step was 500% better than this new Crap from Apple.
They butcherred it all.
The NeXT was great. It was nearly perfect, though one time I had trouble using their standard tools compiling a program that had one file name with ASCII spaces in the file name.
That was so many years ago I am sure that one defect was fixed.
But Apple killed off "Yellow Box" NeXT Step after shelling out nearly 400 million dollars to buy it.
They broke it dead. It worked on most pc midi sound cards, most pc network cards, most good scsi cards, most common video cards, etc etc.
It even had a huge shared 20 megabyte file that allowed your NeXT Step programs to run on Windows NT and Windows 95.
It was glorious.
Then they (apples morons) ripped out the OS, added incompatibility and byte endian order nightmares at the CD-ROM and hard disk volume level (pre 1997 NeXT Step OS stored all file data in only one endian order not two)
Then they broke the ability to compile for chips easily emulated on intel such as the MC68030 code the tools used to support perfectly.
Then they decided to kill and break everything, butchered display postscript to avoid adobe lawsuits, renegged on every promise to developers, never released a working carbon 1.0 according to official spec promised to Board of Directors at Apple and Shareholders.
(Carbon 1.0 was promised to run on System 8.0 and offer SCSI commands and many other services apple nevber got finished without crashing or at all).
Carbon 1.0 (whatever number you want to use) never shipped.
Read the official original spec Apple promised if you do not believe me.
No wonder Mac developers I know now program Windows Win32 stuff nowadays.
Apple killed the OS by making it slower and slower every year. And then the death sentence... Mac OS X is buggy and so glacially slow of a UI that apples "equal opportunity" "quata" based hiring must have really paid off.
Cocoa takes a damed ETERNITY to launch a hello world and blit a pixel or two to the screen.
Cocoa is pure bloatware crap.
The NeXT originally was so fast it was astounding. Truly stupefying.
Now its all buggy slow polled crap.
No interrupts, polled everything from the Carbon side of things.
They cant even play sound without skipping.
Heck, the first version of Mac OSX could not play sound from a pure RAM buffer without hiccups!!!
Its the most useless crap of an OS ever.
The best OS Apple ever shipped was System 7.5.5. It ran on everything and had no serious bugs or defects.
The best OS Apple ver bought was OpenStep. Too bad they never shipped it.
They should have purchased "Executor" for 20 million dollars and bundled it with OpenStep and shipped 5 years ago.
Apples is dead. Only making sure they support System 8.1 or 8.6 on all shipping new hardware will keep them afloat.
Otherwise people will just run Mac On Linux style emlators and VMWAre style hacks and Apple will be a footnote.
Even their hardware is cruddier each year. The Blue and White G3 Tower's ports write Firewire (IEEE 1394) data at only 50% transfer speed vs the read speed! Its limited by firmware.
The computer boots slower than a Quadra 840AV. (A old computer with awsome video blending and a much larger speaker).
The Blue and Hhite CMD ATA-IDE controller chip is buggier than all hell (random lockups and xfer bugs) if you try to attach a second hard disk on the same ribbon as the DVD drive.
The thing cant even boot from a RAM disk like all the older macs could.
The G4s are very fast, admittedly, and in Bytemark 2.X source code beat the pants of any intel processor up to twice the megahertz, always, and in parrallel vectorized code benchmearks the ingenious C-based language compilers make altivec code run circles around most photoshop plugins that Intel paid adobe to optimize.
But what good is a fast OS if all the offended MAc developers switch to MS Windows one by one, week after week from shame.
This is slightly offtopic, but Apple had another project called Cocoa which was supposed to be a visual programming language for kids to use. Anyone know about what happened to it?
Nice try, maybe next Apple article you can troll too!
See you at the next Apple article, troll.
AW has historically published all of Apple's toolbox books, etc.
However, they decided to use OReilly for OSX and beyond (Apple wrote and edited the book, OR just prints & binds it). It's really just the newest Mac Toolbox book, which is why it reads like one.
Which makes it interesting for a 3rd party OSX programming book to be published by AW!
Also, add a beaten egg to thicken it up a bit (actual Mexican recipe)
Translation ala babelfish:
"It receives first point under the light it will be extensive in your speed and agility there is the first which it does to me, permit. In order to attain the top of the rainwater inside our arrangement ability us by your specialty and will decrease a gratitude motive. Truly, candle call leys by the item which puts out a taste it expresses a pleasure, is a value. Again, the barn as soon as in your first point of the rainwater. Our fields which it spreads out all it is a beaconing of ability"
'The other Cocoa' eventually found a new home and became known as Stagecast Creator.
-Mark
On the other hand, this has everything to do with trademark law. Red Hat is a registered trademark, and therefore if they don't want anyone else to use it, they don't have to.
You can stil reproduce RedHat ISOs verbatim...just don't call it Red Hat...call it something similar...if people are too stupid to figure it out, they are WAY too stupid to use linux in the first place.
Slashdot, the site where everything's made up and the points don't matter
Have a look at his web site at
http://www.bignerdranch.com/
He's been in the business of training people on OpenStep and Cocoa for quite some time.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
You know, watching these Objective-C vs. C++ is interesting. In general, the Objective-C supporters also have a lot of experience with C++ too (who doesn't?), but they prefer Objective-C. On the other hand, the people defending C++ are generally the ones who themselves have not done any substantial development in Objective-C. So perhaps it says something that the people who have used both languages extensively tend to prefer Objective-C?
Much in the same style as Visual Basic, or RealBasic...
or if you're a Mac oldskooler.........HYPERCARD!
I always thought Apple should have taken HyperCard and just upped the technology, I mean it still ran in black & white until the day it died (96? 97? Too much ganja...), it was an amazing piece of software WELL ahead of it's time featuring things like user-authoring of programs and full scriptability, and even things we take for granted today such as hyperlinking! Everything from custom databases to slide shows, and even games, where created for it. I even saw a LaserDisc player-controlling stack once!
APPLE! BRING BACK HYPERCARD! ;-)
If you don't I really am going to go STAK-WILD
CAn'T CompreHend SARcaSm?
Actually, the reason why the mac mouse had only one button is that the guy who first started the Macintosh project at Apple, Jef Raskin, thought more than one button would be confusing to people (he might have actually done some usability testing to confirm this. I'm not quite certain). This seems like an oversight today, but remember that in the first years of the 80's when the mac was being designed, you didn't really have mass produced computers making extensive use of *any* pointing device as part of their basic UI. The concept of using a mouse was confusing enough with one button (see Star Trek IV if you don't believe me). Raskin had actually wanted a trackball instead of a mouse because "they don't pick up those oreo cookie crumbs that are the hallmark of a good programmer".
> or maybe you lie about your ability to actually speak Japanese let alone write it? Just a thought
Chigau yo. Ore ga itta toori, kana de mese-ji wo utteitara, yappari re-munesu firuta- ni jama sarete, ore no po-sutingu ga abo-to sarete shimau yo. "DON'T USE ALL CAPS" to iu era- mese-ji ga dete shimau.
There, satisfied fuckface? I'd type that in kana, but Slashdot gives me the error message when I try. God, I hate little pissante know it all fuckfaces who are so easy to prove wrong.
Before some other fuckface points out the obvious, "mese-ji" should have been spelled, "messe-ji". I usually don't work with romaji, it's too grade 6.
Here are two ways that I'm aware of to do it without touching Low Memory:
Mac OS X Only -- CoreGraphics routines.
Mac OS 9 Only -- Cursor Components SDK.
I believe, however, that the only was I know of to do this on both Mac OS 9 and Mac OS X (10.1+ only) is to mess with Low Memory like you're probably talking about. I can't be sure, though, since you're misusing terms. Try the above links and see if they help.
If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
You know, if we make the assumption that OSX developers actually want to be paid for their efforts, it will be interesting to see if OSX spawns more imaginative, innovative apps the Linux or the BSD's.
-- Slashdot: When Public Access TV Says "No"
Hi,
iDevGames.com has an interview with the author, Aaron Hillegass of the Big Nerd Ranch here:
Interview
You can read about why the Apple/O'Reily book was "thrown" together.
My site has Cocoa code and will be adding some Cocoa game code soon. I also recommend http://www.cocoadevcentral.com/ for more Cocoa info.
Cheers,
Carlos Camacho
Editor
iDevGames.com
Does anyone know of any other Cocoa dev books coming out in the near future (6-9 months)?
The idea behind Objective C is the messaging of Smalltalk and the efficiency of C. If you're in a tight loop, drop back into C (or C++ if you're using ObjC++). This will only be necessary (or desired) for computationally-intensive loops (in which case the need for OO is questionable). For the remaining 99.99% of your program, the speed hit is negligible.
If you have spaces in filenames, you have to go and put everything between quotes. That's why I always rename my mp3s using underscores. mpg123 is easier to type than "MP3 Player", too.
Duct tape, XML, democracy: Not doing the job? Use more.
Readme.txt:
"Just type:
./configure
./make
./make install"
Apple doesn't want to expose users to this. Including gcc will only tempt developers to take the easy route. They should make mac-software==user friendly.
PS. The developer tools are much more than just gcc, there is a lot of Apple's software that you get for free (ProjectBuilder IDE, InterfaceBuilder, etc). It's only a download away! (I do agree that they should include the devtools with new Macs, but I don't think there is much reason to complain with the current situation, at least not until M$ gives away Visual Studio).
.
The Drowned and the Saved - Primo Levi
Fuck
As a long time NeXTStep, OpenStep, Webobjects (yes, WebObjects also uses ObjC) programmer I'd like to point out a few things about ObjC and the NeXTish frameworks, without religious bias.
ObjC was a very nice language when it first came out. For a hybrid language (object semantic hacked on top of ansi C), it is much more powerful and clean than c++, which is why I made the switch. However, it is absolutely erroneous to say that there are things you can do in ObjC that cannot be done in c++. You just have to jump through hoops of fire in c++ to achieve the dynamism of ObjC. On the other hand, it WAS a hybrid language: fundamentally still C. So it was no Smalltalk. Programmers are still fundamentally responsible for memory management (there's a refcounting scheme for helping) and this requires a high skill level. In large programs, tracking memory leaks could take time. Also, ObjC was not nearly as clean as Smalltalk in other respects. Some of the object semantics in ObjC were hacked on through the use of cpp macros. You could not stay entirely in the object world-- the facade of OO was not complete. In dealing with the low level of the runtime you would have to handle c structs.
The state of the art moves on. But ObjC doesn't, for the most part. ObjC has some features that Java is lacking: method forwarding, posing, categories, etc. Still, there are no circumstances under which I would now choose ObjC over Java. Why? Advantages of Java over ObjC:
- Automatic memory management.
- No direct memory access. Because of this, I can feel comfortable working with junior programmers. Not the case under ObjC.
- Only Objects and a few sensible primitives. No other data types.
- Unicode based.
- Strongly typed (yep, it's an advantage, good ObjC programmers type as much as possible anyhow)
- Exception handling first class citizen of language (it's hacked on in ObjC)
- Fully integrated threading model (much more difficult on ObjC)
- multi-platform. I know java isn't perfect in this respect, but ObjC and the Foundation framework was much, much worse. Basic things like threading could work differently on Solaris vs. windows under OpenStep Foundation.
- multi-vendor.
- A tremendous number of third party tools.
- A tremendous amount of third party information.
I can go on and on. I really don't see the point of Apple pursuing Cocoa, except as far as they are locked into it for legacy reasons.
I don't disagree with the review. This does look like a much better beginner's book than the O'Reilly/Apple Developer Connection book (though I think that O'Reilly made the right decision to get a book out early by working with Apple to put some of their online material out in book form--this was the only Cocoa information in print for a long time and helped people get started.) But it seems a bit off color to write a review praising a book you worked on and attacking a competing book without acknowledging the connection. If this isn't the same Michael Simmons, I apologize.
A big strenght of ObjC is that it integrates wonderfully with scripting languages. This is really great!
Look at this article at O'Reilly:
http://www.oreillynet.com/pub/a/mac/2001/11/30/sc