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

Slowly Rebooting in 286 Mode

The lumbar radiculopathy, which sounds too much like "ridiculously" for me, hasn't faded completely. My left leg still cramps, tingles, and hurts with sharp pains. My mind remains cloudy, too, even as I stop taking painkillers for the back pain and a recent surgery.

Efforts to reboot and get back on track intellectually, physically, and emotionally are off to a slow, grinding start. It reminds me of an old 80286 PC, the infamously confused Intel CPU that wasn't sure what it was meant to be. And this was before the "SX" fiascos, which wedded 32-bit CPU cores with 16-bit connections. The 80286 was supposed to be able to multitask, but design flaws resulted in a first-generation that was useless to operating system vendors.

My back, my knees, my ankles are each making noises like those old computers.

If I haven't already lost you as a reader, the basic problem is that my mind cannot focus on one task for long without exhaustion and multitasking seems…

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 and then format th…

Screenwriting Applications

Screenplay sample, showing dialogue and action descriptions. "O.S."=off screen. Written in Final Draft. (Photo credit: Wikipedia) A lot of students and aspiring writers ask me if you "must" use Final Draft or Screenwriter to write a screenplay. No. Absolutely not, unless you are working on a production. In which case, they own or your earn enough for Final Draft or Screenwriter and whatever budget/scheduling apps the production team uses.

I have to say, after trying WriterDuet I would use it in a heartbeat for a small production company and definitely for any non-profit, educational projects. No question. The only reason not to use it is that you must have the exclusive rights to a script... and I don't have those in my work.

WriterDuet is probably best free or low-cost option I have tested. It is very interesting. Blows away Celtx. The Pro version with off-line editing is cheaper than Final Draft or Screenwriter.

The Pro edition is a standalone, offline versio…