If you want to learn Objective-C, it helps to know C. Learning C — or reviewing it — is a good way to become familiar with Apple's development tools, too.
Learning to program is a cause of mine. I advocate teaching programming to all students, not merely a handful of geeks, hackers, or nerds. When we teach everyone about coding, it demystifies how computers work and it introduces students from a wider variety of backgrounds to what could be an excellent career path.
Years ago, educators would use LOGO or BASIC in elementary school classrooms. Then, along came HyperCard. There are still introductory programming tools based on LOGO, BASIC, and HyperTalk languages. You can learn to program using AppleScript or by writing Microsoft Word macros in Visual Basic for Applications (VBA). Personally, I'm for using whatever tools a teacher might enjoy at the earlier ages (K-6). In high school, though, I am biased towards plain, simple, C as a foundation for future coding skills.
If you learn the basics of C, you can adapt to Java, C++, C#, or Objective-C. The skills you learn coding in C are portable — much like the language itself. C is not a fancy language. It has quirks, too.
I would advocate for Delphi or Free Pascal (both using Object Pascal), and I am a passionate defender of the Pascal family of languages. But, realistically the computing world today is dominated by "curly-braces" and languages influenced by C. (I wish Apple would embrace Pascal again, which was once the language of choice for high school programming courses. Apple helped create the Object Pascal standard. Pascal… well, that's a tangent I'll take in some other post.)
https://developer.apple.com/xcode/
Note: The basics of the next few posts will help anyone, on most any operating system platform. However, since my coding journey is from C to Objective-C on OS X and iOS, these posts will have a decidedly "Apple-centric" focus. You do need to use the Apple tools to create a proper iPhone or iPad application, and I'm convinced that most Apple computer users also want a "native" look-and-feel application, instead of the not-quite-right experience of Java of C++ apps that don't use the Cocoa frameworks.
There are other free IDEs that are ideal for learning C. On the Mac, Windows, and Linux, I often use NetBeans. When you download NetBeans, be sure to obtain the "All" bundle, which enables C, C++, Java, and PHP programming. Download NetBeans from:
https://netbeans.org
Eclipse might be the most popular free IDE for Java and C/C++ development. Eclipse is also available for Windows and Linux. I don't happen to like Eclipse as much as some of my colleagues, but it is only a matter of preference. For the topics I'm going to discuss, be sure to download the "C/C++" bundle of Eclipse. Download Eclipse from:
http://www.eclipse.org
Though I am not discussing the "how-to" of NetBeans or Eclipse, you can code and test any of the C applications I include on the blog. Technically, you can learn Objective-C on a platform other than Apple's OS X, too. For more information on free Objective-C tools for Windows and Linux, visit:
http://www.gnustep.org
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
(You can search for "Microsoft Express" if the link above doesn't work.)
Clair, Robert. Learning Objective-C 2.0: A Hands-on Guide to Objective-C for Mac and iOS Developers. 2nd ed., 2013. 9780321832085 / 0321832086
Learning to program is a cause of mine. I advocate teaching programming to all students, not merely a handful of geeks, hackers, or nerds. When we teach everyone about coding, it demystifies how computers work and it introduces students from a wider variety of backgrounds to what could be an excellent career path.
Years ago, educators would use LOGO or BASIC in elementary school classrooms. Then, along came HyperCard. There are still introductory programming tools based on LOGO, BASIC, and HyperTalk languages. You can learn to program using AppleScript or by writing Microsoft Word macros in Visual Basic for Applications (VBA). Personally, I'm for using whatever tools a teacher might enjoy at the earlier ages (K-6). In high school, though, I am biased towards plain, simple, C as a foundation for future coding skills.
If you learn the basics of C, you can adapt to Java, C++, C#, or Objective-C. The skills you learn coding in C are portable — much like the language itself. C is not a fancy language. It has quirks, too.
I would advocate for Delphi or Free Pascal (both using Object Pascal), and I am a passionate defender of the Pascal family of languages. But, realistically the computing world today is dominated by "curly-braces" and languages influenced by C. (I wish Apple would embrace Pascal again, which was once the language of choice for high school programming courses. Apple helped create the Object Pascal standard. Pascal… well, that's a tangent I'll take in some other post.)
You Need an IDE. You Need Xcode
To start programming on the Mac, you first need to obtain Apple's Xcode integrated development environment (IDE). Even if you wish to use another editor, you'll need Apple's tools eventually. Thankfully, Xcode is a free download from Apple's App Store:https://developer.apple.com/xcode/
Note: The basics of the next few posts will help anyone, on most any operating system platform. However, since my coding journey is from C to Objective-C on OS X and iOS, these posts will have a decidedly "Apple-centric" focus. You do need to use the Apple tools to create a proper iPhone or iPad application, and I'm convinced that most Apple computer users also want a "native" look-and-feel application, instead of the not-quite-right experience of Java of C++ apps that don't use the Cocoa frameworks.
There are other free IDEs that are ideal for learning C. On the Mac, Windows, and Linux, I often use NetBeans. When you download NetBeans, be sure to obtain the "All" bundle, which enables C, C++, Java, and PHP programming. Download NetBeans from:
https://netbeans.org
Eclipse might be the most popular free IDE for Java and C/C++ development. Eclipse is also available for Windows and Linux. I don't happen to like Eclipse as much as some of my colleagues, but it is only a matter of preference. For the topics I'm going to discuss, be sure to download the "C/C++" bundle of Eclipse. Download Eclipse from:
http://www.eclipse.org
Though I am not discussing the "how-to" of NetBeans or Eclipse, you can code and test any of the C applications I include on the blog. Technically, you can learn Objective-C on a platform other than Apple's OS X, too. For more information on free Objective-C tools for Windows and Linux, visit:
http://www.gnustep.org
Microsoft Freebies!
If you are a Windows user, Microsoft's basic programming tools are also available for free. That's right, you can get something for nothing from Microsoft. I won't be discussing any of those tools in this series of posts, though I might write a bit about them in the distant future. You can download the Microsoft Express tools from:http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
(You can search for "Microsoft Express" if the link above doesn't work.)
Nothing Else Required
After you download and install Xcode, you're ready to program. That's it — nothing else is required on a Mac. You're ready to write a program. Seriously. We're ready to discuss C programming in the next blog post. In the meantime, launch Xcode and feel a bit overwhelmed. You might also rush out and buy a few books. I'm using:Clair, Robert. Learning Objective-C 2.0: A Hands-on Guide to Objective-C for Mac and iOS Developers. 2nd ed., 2013. 9780321832085 / 0321832086
Comments
Post a Comment