Skip to main content

Learning to Code: The Tool(s)

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.)

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

Popular posts from this blog

Practical Technology Skills

This blog is a revision to a column I wrote for Direct Media publications. Normally, I wouldn't repost something I wrote for hire, and I certainly don't wish to anger one of my publishers. However, since this blog is primarily accessed by one of my graduate seminars, I think the publisher will appreciate that I am extending my thoughts for educational purposes. I'm also more than willing to encourage businesses to visit the Direct Media home page . Page numbers seemed to be a half-inch lower on each successive page. I stared at the mid-term paper, handed in to me by a junior at the university, and thought back to my fights with dot-matrix printers. When I was an undergrad, my Epson FX/80 printer jammed often and would sometimes rip pages after the sprockets slipped out of alignment with the punched holes of the perforated paper. Surely the undergraduate author of this paper suffered the curse of a similarly possessed printer, I told myself. “I guess when I changed the ma...

Pursuing a University Degree Online

Visalia Direct: Virtual Valley February 2008 Issue January 7, 2008 Pursuing a University Degree Online When a star high school student graduates in Tulare County, the difficult reality is that he or she most likely will leave to attend a four-year university. For an eighteen-year-old student, leaving the Central Valley, or at least Tulare County, is part of the educational experience. But, after returning to Visalia some of us find out that our undergraduate educations are not quite enough. For those in education, Fresno State, Fresno Pacific University, Chapman University, and others have offered courses in Visalia for a number of years. This makes it possible to work and still complete a teaching credential or an advanced education-related degree. I have been thankful for the options we have in the Central Valley. But, as others have learned, if you are interested in some fields you must commute to Fresno — or even further. With the drive to Fresno taking just under an hour...

MarsEdit and Blogging

MarsEdit (Photo credit: Wikipedia ) Mailing posts to blogs, a practice I adopted in 2005, allows a blogger like me to store copies of draft posts within email. If Blogger , WordPress, or the blogging platform of the moment crashes or for some other reason eats my posts, at least I have the original drafts of most entries. I find having such a nicely organized archive convenient — much easier than remembering to archive posts from Blogger or WordPress to my computer. With this post, I am testing MarsEdit from Red Sweater Software based on recent reviews, including an overview on 9to5Mac . Composing posts an email offers a fast way to prepare draft blogs, but the email does not always work well if you want to include basic formatting, images, and links to online resources. Submitting to Blogger via Apple Mail often produced complex HTML with unnecessary font and paragraph formatting styles. Problems with rich text led me to convert blog entries to plaintext in Apple Mail ...