Programming for Mac OS X


Recommended Posts

Hello All,

I started a thread before asking for help to start programming for Mac OS X, and many of you said I should start by going to cocoalab.com. Anyways, i wanted to ask few more questions:

1. If I do not have any programming experience for any platform...where do I start in Mac OS X? Objective-C first or Cocoa or? Which one comes first? Whats the difference? Do I have to learn both Objective-C and Cocoa?

2. What book would anyone recommend for Objective-C (no prior experience at all) and for Cocoa (no prior experience at all). I know there isn't a "best book", but what would you all recommend.

3. Aside from cocoalab.com for tutorials and books, is there any other websites that I can always refer for help and read free tutorials and books?

4. My college don't have any Apple Groups, but how would I find such a thing around Houston, TX probably at other colleges or facilities?

Thanks,

-Eagle101

Link to comment
https://www.neowin.net/forum/topic/673142-programming-for-mac-os-x/
Share on other sites

I'm not a programmer but on the ADC website developer.apple.com they state that you should have a knowledge of Objective-C before using Cocoa.

Getting Started with Cocoa

Also, you might want to check out Introduction to the Objective-C 2.0 Programming Language

And Apple Developer Connection home.

And download a copy of Xcode 3 if you haven't already done so. If you have a Mac OS X installation disc it can be installed from there.

Edited by HellScream63
I'm not a programmer but on the ADC website developer.apple.com they state that you should have a knowledge of Objective-C before using Cocoa.

Getting Started with Cocoa

Also, you might want to check out Introduction to the Objective-C 2.0 Programming Language

And Apple Developer Connection home.

And download a copy of Xcode 3 if you haven't already done so. If you have a Mac OS X installation disc it can be installed from there.

Thanks for your help and suggestions...I already checked the Apple website for info but looking for actual books which they should make it easier for me to learn Objective-C and Cocoa...

Any other suggestions? Thanks for your help!!!

-Eagle101

Assuming you're already a competent developer and not jumping in to Macintosh programming without prior experience:

Refreshing your understanding of various OOP concepts and design patterns?specifically MVC?is a good idea. The Gang of Four's "Design Patterns: Elements of Reusable Object-Oriented Software" is considered standard reading. The book's examples are in (among other languages) Smalltalk and so I'm sure you'll see some of the similarities between that and Objective C.

Aaron Hillegass' "Cocoa Programming for Mac OS X" is considered the premier introductory text on Cocoa development. A good understanding of the underlying architecture is important and to that end "Mac OS X Internals: A Systems Approach" by Amit Singh is a solid high-level overview of the major components of the platform for a technical audience.

If you don't have any programming experience for any platform then it's time to start with "computer science basics". A introductory C, Ruby, Python (or any other language that tickles your fancy) is a good place to learn about the basics of programming. Programming is more-or-less just glorified math: the concepts you learn for one language are generally applicable in others. That having been said, you don't start by learning multi-variable calculus without having first practiced algebra, trigonometry, and "what the heck a whole number is anyway".

Once you've got your basics worked out, studying general principles is a good idea. Donald Knuth's "The Art of Computer Programming v.1-4" is as relevant today as it ever was. It's a hefty collection, but worth the read. Assuming you're still with us, you should have a solid background in problem solving and a good understanding of general computer science principles, so picking up the "Design Patterns?"book mentioned earlier is a good next move. At that point you should be ready to learn the syntax of Objective C (assuming you haven't yet), and Cocoa: Hillegass' book is a good next choice. From there you'll probably do most of your learning by trolling through the ADC documents and watching the WWDC presentations.

If you're serious about learning to write Mac OS X software then picking up a first-year computer science course form a local community college/university is a great idea. 1-2 credits are dirt cheap and an instructor-led course is likely to teach you more of what you need to know than just trolling book stores & the library and reading whatever has a pretty cover. If you can spare the time and a couple hundred dollars for weekend courses, i think it's a good idea.

Assuming you're already a competent developer and not jumping in to Macintosh programming without prior experience:

Refreshing your understanding of various OOP concepts and design patterns?specifically MVC?is a good idea. The Gang of Four's "Design Patterns: Elements of Reusable Object-Oriented Software" is considered standard reading. The book's examples are in (among other languages) Smalltalk and so I'm sure you'll see some of the similarities between that and Objective C.

Aaron Hillegass' "Cocoa Programming for Mac OS X" is considered the premier introductory text on Cocoa development. A good understanding of the underlying architecture is important and to that end "Mac OS X Internals: A Systems Approach" by Amit Singh is a solid high-level overview of the major components of the platform for a technical audience.

If you don't have any programming experience for any platform then it's time to start with "computer science basics". A introductory C, Ruby, Python (or any other language that tickles your fancy) is a good place to learn about the basics of programming. Programming is more-or-less just glorified math: the concepts you learn for one language are generally applicable in others. That having been said, you don't start by learning multi-variable calculus without having first practiced algebra, trigonometry, and "what the heck a whole number is anyway".

Once you've got your basics worked out, studying general principles is a good idea. Donald Knuth's "The Art of Computer Programming v.1-4" is as relevant today as it ever was. It's a hefty collection, but worth the read. Assuming you're still with us, you should have a solid background in problem solving and a good understanding of general computer science principles, so picking up the "Design Patterns?"book mentioned earlier is a good next move. At that point you should be ready to learn the syntax of Objective C (assuming you haven't yet), and Cocoa: Hillegass' book is a good next choice. From there you'll probably do most of your learning by trolling through the ADC documents and watching the WWDC presentations.

If you're serious about learning to write Mac OS X software then picking up a first-year computer science course form a local community college/university is a great idea. 1-2 credits are dirt cheap and an instructor-led course is likely to teach you more of what you need to know than just trolling book stores & the library and reading whatever has a pretty cover. If you can spare the time and a couple hundred dollars for weekend courses, i think it's a good idea.

Thank you very much for your reply. I really appreciate your time and effort!

Let me mention few things:

I do not have any experience on programming for any platform...I never programmed before...But i really really want to start programming for mac. I am ready now. I have time now. So you are saying first I should learn the basics by learning C, python, Ruby? Are you sure?

I am saying this because many people told me to start with an Introduction to Objective-C (recommended: Programming in Objective-C by Stephen G. Kochan) and learning it. Then, to go ahead and learn Cocoa (recommended: Cocoa Programming by Aaron Hillegass)...Is this correct, or do I first need to learn the very very basics of programming?

Please guide me. Thanks

I recommend starting off with Python, especially since there is a Python-Cocoa option in Xcode. While Python isn't necessarily as fast as Objective-C, or as powerful, it is a very good starting point for basic programming theory.

Just keep in mind this is not an overnight thing. Once you start learning, you'll need to invest a few hours every week just improving your skills and doing new things. It takes years to master, I'm not even close yet.

I do not have any experience on programming for any platform...I never programmed before...But i really really want to start programming for mac. I am ready now. I have time now. So you are saying first I should learn the basics by learning C, python, Ruby? Are you sure?

Yes, I think learning the basics and having a good grasp of things is very important. I'm a fan of Ruby and Python: they're both more expressive languages than Objective C, but not so much that you'll feel crippled when you pick it up. It really doesn't matter which language you learn because the concepts are all the same.

Think of it like learning to play an FPS: the basic skills of moving, shooting, aiming, jumping, grenades, etc can be learned in any game. Once you have those mastered you can become proficent at a new game quickly. Imagine trying to play Portal having never used a mouse or keyboard: jumping in to Cocoa & Objective C would be even more complicated.

I am saying this because many people told me to start with an Introduction to Objective-C (recommended: Programming in Objective-C by Stephen G. Kochan) and learning it.

My take on Objective C is that while it's a good language for development, there's enough quirks that I think using another language is a better choice. Your mileage may vary. Also, the more languages you learn, the better a programmer you'll be: and by that I mean not just syntax but the strengths and weaknesses of a given language.

Programming is about syntax and languages in the same way that astronomy is about telescopes: it's the visible part of computer science, but not really the most important.

Then, to go ahead and learn Cocoa (recommended: Cocoa Programming by Aaron Hillegass)...Is this correct, or do I first need to learn the very very basics of programming?

If you can already program and have an understanding of OOP principles then picking up Objective C is pretty straight forward. The syntax is a direct superset of C and there aren't a whole lot of funny rules or quirks to learn. I don't think it's a very beginner friendly language and I think that the time you spend fighting the syntax (like making sure to next your []'s properly) is better spent dealing with the subject matter at hand.

Python or Ruby are great choices as beginer languages but the 'cost of entry' to learning a language is so low that it really doesn't matter which one your start with. A good ruby book is "Programming Ruby: 2nd edition" by Dave Thomas, unfortunately I can't recommend a Python Book. (FYI: all of the ones I've mentioned before I own, I don't want to recommend one without liking it enough to buy).

Kochan's book is quiet good, though I'm not sure if it's been updated for Objective C 2.0 or not. I own the first edition and found it served its purpose well.

Another good book was "Learning Cocoa with Objective C" by James Davidson. Again, I'm not sure if this has been updated for Objective C 2.0 and Xcode 3. The first edition was a solid text: not enough to stand on it's own, but if you were already a programmer then it provided a good jumping-off point.

EDIT: adding to what simon says:

I've been programming almost my entire life (long enough to have my first programs stored on a tape). It's a huge field and the best way to be successful is to realize that no matter how much you know, it's never even close to everything. Think of how long it took you to learn the math you know now - and think about how much there is that you don't know: computer science is even more complex than mathematics because it encompasses so many different fields.

Edited by the evn show

Thank you everyone for the replies. I really appreciate it.

Now, Lets get to the point. I already bought "Cocoa Programming for Mac Os X" by Aaron Hilliegass, and Programming in Objective-C by Stephen Kochan. However, as many have sugested that I start to learn the basics first.

Ok, i will put these books away. But help me get started please. Tell me what books can I read to fully understand the introductions that later on I can pick up on Objective-C then Cocoa. I really want to program for Macs. So please help me out here.

Thanks

Bump...any recommendations on a good book or place to start learning Python?

Thanks

Sadly, I don't have a good 'first book' for Python. I went to that language after Ruby (and a dozen others) so my first book (Dive in to Python by Mark Pilgram of 'dive into XML' and 'dive into mark' fame was it.

On the plus side, the book is available for free online as a PDF, HTML, etc. if you don't care much for dead-tree books.

  • 2 weeks later...

Hey dude, nice to see you :)

In relation to python, with my modest experience in that language, I would recommend you to first read the python manual that comes with the python distro itself. It's a nice start, has practical examples and most importantly the module index.

After that done read some code done by others will help allot. Best regards, Lechio.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • As I've been usually saying lately - we all can thank "AI" for this.
    • Friday Windows 11 preview builds are here. Insiders in the Experimental (formerly Dev) and Beta Channel can download builds 26300.8697 and 26220.8690. My Windows11 device on the Preview Channel just got 26220.8728. My guess is this build is a nightly update from 26220.8690.
    • Traffic has a surprisingly unexpected impact on your surroundings by Sayan Sen Image by Radik 2707 via Pexels A collaborative study by researchers from several Israeli institutions found that everyday pollution from traffic and industrial activity measurably changed the atmospheric electric field over the Tel Aviv metropolitan area, providing new evidence of how human activity can influence the lower atmosphere. The research was led by Dr. Roy Yaniv of the Hebrew University of Jerusalem and the Gertner Institute at Sheba Medical Center, Dr. Assaf Hochman of the Fredy & Nadine Herrmann Institute of Earth Sciences at the Hebrew University, and Prof. Yoav Yair of Reichman University. The study also involved Itay Froomer, a student from Hadera High School and the Israeli Museum of Medicine and Science (Technoda), who carried out the work as part of the Ministry of Education's 5-unit physics research track. The researchers focused on the atmospheric electric field under fair-weather conditions. Even in the absence of storms, a weak electric field naturally exists between Earth's surface and the atmosphere. One of the main ways scientists measure this field is through the Potential Gradient (PG), which is the inverse of the vertical component of the electric field. PG is a key part of the global electric circuit, a planet-wide system of electrical currents maintained by thunderstorms and electrified clouds around the world. Scientists have long known that the atmospheric electric field can be influenced by factors ranging from large-scale atmospheric processes to local weather conditions such as dust, fog and clouds. Human-made pollution is also known to play a role, but understanding exactly how urban emissions affect the electric field close to the ground has remained an area of ongoing research. To investigate this relationship, the team analyzed measurements from a newly installed electric field mill, an instrument used to continuously monitor the strength of the atmospheric electric field. The instrument was installed at the Center for Technological Education (Roter House) in Holon and became operational in August 2024. It was funded by Israel's Ministry of Education and the Holon municipality. The electric field mill forms part of a broader monitoring network that includes nearby meteorological stations and air-quality monitoring sites. This allowed researchers to compare electric field measurements with detailed weather data and pollution records to better understand what was driving changes in the Potential Gradient. The study focused on two major urban pollutants: fine particulate matter (PM2.5) and nitrogen oxides (NOx), both commonly produced by vehicle traffic and industrial activity. PM2.5 refers to microscopic airborne particles small enough to remain suspended in the atmosphere for extended periods, while NOx is a group of gases released during fuel combustion. Researchers examined daily, weekly and seasonal patterns in the atmospheric electric field and compared them with changes in pollutant concentrations. Their analysis revealed a clear relationship between NOx levels and changes in the Potential Gradient, particularly during morning and evening rush hours when traffic emissions were at their highest. “What we observe is a direct physical link between emission peaks and electrical variability,” explained Dr. Roy Yaniv. “NOx reduces atmospheric conductivity very quickly, so the electric field responds almost instantaneously during traffic rush hours.” Atmospheric conductivity describes how easily electrical charges move through the air. According to the researchers, nitrogen oxides rapidly alter this conductivity, causing a near-immediate response in the electric field. PM2.5, however, was associated with a delayed response. The researchers attributed this difference to the particles' longer atmospheric residence time, meaning they remain in the atmosphere for longer periods, as well as their different microphysical interactions with surrounding air and atmospheric components. The study also identified a pronounced "weekend effect." In Israel, traffic volumes and some industrial activity decline significantly on Fridays and Saturdays. During these periods, concentrations of both NOx and PM2.5 dropped, and corresponding changes were observed in the atmospheric electric field. “The weekend signal demonstrates just how sensitive the electric field is to changes in human activity,” the researchers noted. “When emissions decline, the electrical environment adjusts at once, providing a high-resolution indicator of urban atmospheric conditions.” The findings showed that pollution levels can influence not only the chemical composition of the atmosphere but also its electrical properties. Researchers said the results strengthened the case for using atmospheric electricity as an additional tool for environmental monitoring, particularly in densely populated urban areas where anthropogenic, or human-caused, influences are most pronounced. The study also pointed to potential public health applications. By combining air-quality measurements with observations of atmospheric electricity, researchers said they could gain a more complete picture of how urban atmospheric conditions change over time. “Integrating air-quality data with electric-field measurements gives us a clearer picture of how the lower atmosphere evolves moment by moment,” the researchers added. “It’s a framework that can support both scientific insight and practical environmental decision-making.” Beyond the scientific findings, the project highlighted a collaboration between universities, public institutions and secondary education. Researchers said the work demonstrated how students could take part in real-world environmental research while contributing to studies of air quality, atmospheric processes and their potential effects on society. Source: Hebrew University, ScienceDirect This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing
    • We aren't even at the all-star game and Microsoft is talking about an update that will most likely be released during the World Series if not after. A lot can happen in the world between now and the 2026 World Series, including the 2026 FIFA Cup. Tell me about it again after the FIFA Cup is concluded. That should allow plenty of time to prepare for it.
    • Great, tell me when I have a "Bad Pool Caller" elsewhere not in Windoze.
  • Recent Achievements

    • Week One Done
      AMV earned a badge
      Week One Done
    • One Month Later
      AMV earned a badge
      One Month Later
    • Collaborator
      ryansurfer98 went up a rank
      Collaborator
    • One Month Later
      Eurosoft10 earned a badge
      One Month Later
    • Week One Done
      Eurosoft10 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      541
    2. 2
      +Edouard
      186
    3. 3
      PsYcHoKiLLa
      79
    4. 4
      Michael Scrip
      77
    5. 5
      Steven P.
      71
  • Tell a friend

    Love Neowin? Tell a friend!