Skip to main content

Learning to Code: The Month (and More) of Cocoa Begins

This week I am beginning a month (and more) of intense "Cocoa" immersion. Cocoa, for those outside the OS X/iOS development realm of Apple, is the framework created by Apple's wizards to make programming for Apple hardware a (tiny) bit easier.

Since I want to develop applications for Macs and iOS devices, I need to learn the Cocoa frameworks. It's going to be a long journey, and a fun one. On this blog, I'll be posting about programming as an educational experience. I'll also continue to explore programming as a form of writing.

I'm surely not going to do the topic justice, but allow me an attempt to explain how computer languages and frameworks are similar to other languages. When we write in any language, we start with a core of basic words and grammar. Computer languages are more concrete and simplistic than living languages, but you might compare them to the languages children speak.

I am not going to go über-geek in this post and explain the translation of a computer language to executable code. Let's just accept that the simplistic brain (CPU and other computer components) does like the human brain and converts words to thoughts and actions. (I will in a later post, which I have already outlined.) I'm going to keep this discussion at the higher level (relatively speaking) of the programming languages most mortal coders use. The art of assembly language coding is limited to a sect of high priests of hardware in the modern coding universe.

Most programmers developing for Apple hardware use the Objective-C programming language. As with human languages, Obj-C represents an evolution from other languages. Scholars can trace the family tree of English, and we can trace the family tree of Obj-C. Most programming texts for OS X/iOS include a short history of Obj-C, explaining that the language was developed as an extension of the "C" programming language, borrowing ideas from Smalltalk and other object-oriented languages.

See:


Computer languages evolve, even after they are initially designed. Objective-C, already C with ideas from Smalltalk, continues to pick up words and syntax elements from other languages. American English adds words from other languages, and new words are created. Objective-C has done the same. And, sometimes, a language loses a word or the syntax changes over time. The original Obj-C was extended when Apple introduced OS X, based on the NeXTSTEP (or NextStep) operating system. Obj-C was updated again significantly in 2006, but overall the language core has remained relatively stable (unlike the cores of some other languages).

By itself, Objective-C is okay but not very useful for creating complex OS X/iOS application. Apple developers need to use the Cocoa frameworks to craft applications. Because Cocoa is so fundamental to Apple programming, many refer to all coding for Macs and iOS devices as "Cocoa programming" — an accurate description, since calling Cocoa code is essential to the process. The Cocoa frameworks are numerous and seemingly ever-expanding as Apple adds to their libraries.

For example, Apple's Cocoa frameworks include the "Cocoa Touch" framework for touch-screen development. Instead of creating a new way to deal with touch screen interactions, a programmer uses the Cocoa Touch framework. Again, when I write about computer languages later this month, I will explain how frameworks (for better and worse) extend programming languages. For now, you can read Apple's pitch to developers:


This first post is short; you can expect me to explore the preceding topics in greater detail throughout the month. Writing about what I learn and observe will help me — and my readers.

Comments

Popular posts from this blog

More Than a Typewriter: The Power of Word

Visalia Direct: Virtual Valley March 3, 2014 Deadline April 2014 Issue More Than a Typewriter: The Power of Word Typewriters still amaze me, especially the antique mechanical models. There’s something wonderful about the feel of levers, gears, springs and rollers working together to transmit thoughts into words. Typewriters possess a romance computer keyboards and touch screens lack. But, please, stop using your word processor like a typewriter. Word processor abuse mars many otherwise good documents. Bad habits people develop over time lead to documents that are ugly and difficult to edit and revise. The numerous excuses for improper word processing deserve dismissal. It does not take days or even hours to learn to use tabs effectively. Paragraph styles take minutes to understand and appreciate. Even a complex looking table of contents takes only a few mouse clicks to create if you construct a document properly. When you know more about your software tools, you also kno...

Digital Writing Ideas

Online composition and participation are always a requirement in the courses I teach. When I began teaching at Fresno State as a graduate student in 2004, I was one of the few instructors who required students use Blackboard on a weekly basis. I believe there are several reasons to use tools like Blackboard / WebVista: Students can read and respond to the thoughts of their classmates. I have a record of how writing (and thinking) improve during a semester Peer editing can occur online, in small groups. Students less vocal in class discussions tend to participate more online. Normally, I post a " Weekly Response Question/Topic " based on class discussions during the week. Students can then extend the in-class discussion online. Those who were unable to speak up during the class have time to reflect and post their thoughts, too. By requiring every student to post at least 50 to 100 words a week, they soon engage each other in discussion. I always use threaded discussions...

Word Macro for Word Abusers

I overuse some words and phrases in my writing. Most writers have some problem words. It isn't that the words should never be used, or that we use them incorrectly. We simply use them too frequently. The following Microsoft Word VBA macro marks words I should check for overuse. Also included are words and phrases I should avoid. Feel free to copy and modify this macro. I encourage my students to try this macro, too. Once you have the macro in Word, you can alter the word list to reflect your preferences and habits. Sub macWordsToAvoid() Dim vFindText As Variant Dim txtWord As Variant 'list the exceptions to look for in an array vFindText = Array("about", "all", "almost", "a lot", "already", "always", "along with", _ "anxiously", "absolutely", "as well", "believe", "certainly", "clearly", "definitely", _ "eagerly",...