Skip to main content

Learning to Program

Late last night I installed the update to Apple's OS X programming tool suite, Xcode 4. This summer, in my "free" time I intend to work my way through my old copy of Teach Yourself C and the several Objective-C books I own. While I do play with various languages and tools, from AppleScript to PHP, I've never managed to master Objective-C — which is something I want to do.

As I've written several times, knowing simple coding techniques is a practical skill and one that helps learn problem solving strategies. Even my use of AppleScript and Visual Basic for Applications (VBA) on a regular basis helps remind me to tackle problems in distinct steps, with clear objectives from step to step.

There are many free programming tools that students should be encouraged to try. On OS X, the first two tools I suggest to non-technical students are Automator and AppleScript. These tools allow you to automate tasks on OS X, similar to the batch files of DOS or the macros of WordPerfect and Lotus 1-2-3. Automator and AppleScript are great for taking routine tasks and converting them to one-step actions.

An example use for AppleScript or Automator might be creating a folder that instantly resizes and converts images into JPEG thumbnails. I also have an Automator action attached to a "rename" folder. I use this folder to append prefixes or suffixes to files I am going to archive. Learning these tools saves me hours of time each year.

Programming Environments
When I introduce students to VBA, I explain that Microsoft Office macros are programs. You develop, edit, and debug VBA code in an Integrated Development Environment (IDE). Most modern programming suites are built around an IDE, so VBA offers a great starting point. You edit code using a special editor that provides "code completion" (called by different names in various IDEs) and syntax checking. The user interface is created visually, often with drag-and-drop ease.

If you are comfortable with VBA macro editing, then moving to another IDE experience isn't that difficult.

What if you do decide to to learn "real" programming, beyond macros and scripts?

Programming on OS X
I do suggest sticking to C/C++/Objective-C on the OS X and iOS platforms. Plus, free is a good price — which is what Apple's tools are. Xcode is a good IDE, though it can confuse people familiar with the VBA environment or Microsoft's Visual Studio. The Xcode experience is improving with each update, thankfully. Some developers prefer Xcode to other IDEs, but I'm still not persuaded. It is a matter of preference.

I do want to offer a link to REALstudio, though ( Formerly REALbasic, RS supports OS X, Windows, and Linux. Not a bad product, but you have to consider the fact that Apple is notorious for leaving third-party tools behind. If a school wanted to teach object-oriented programming using a tool that is flexible and cross-platform, RS should be considered. The fact REALstudio supports Web development makes it worth a look, too.

Programming on Windows
If you want to learn to program on Windows, Microsoft offers free "Express" learning editions of their tools. I happen to like Visual Basic (I know, blasphemy) as a starting point for many people. To obtain the free editions of the Microsoft tools, visit the Express website (

"Universal" Programming Tools Java remains an important alternative on all major platforms, though I'm not sure I'd teach Java to beginning programmers. If you do want to learn OOP using Java, try BlueJ ( There is also another education edition of Java tools, Project Greenfoot (

Many programmers now use Eclipse and NetBeans for C, C++, and Java development. While Eclipse ( is the better known of the two IDEs, I prefer NetBeans ( Either way, what you learn will be easily transferred form one to the other.

Some "old-fashioned" programmers have suggested teaching to code using a text editor and command line compiler instead of some fancy IDE. The reality is, today's applications are generally visual. Also, the IDE editors are a better experience. You could teach C/C++ from a command prompt, but why?

Learn a Language!
I encourage everyone to learn something about coding on his or her platform of choice. You will gain a great deal of appreciation for how the technology you use daily is developed. You will also gain new appreciation for the need to analyze problems in "chunks" to solve them consistently and accurately.


  1. I completely agree that the key to success in programming is learning to think about problems in the "right" way - to break the problem down and consider the steps required to solve each part.

    The choice of programming language does influence the way you think about problems, and I would highly recommend making the effort to become fluent in more than one language: preferably languages that are significantly different. This will give you the tools to solve a wider range of problems that require different approaches, in much the same way as having more than just a screwdriver allows you to tackle different jobs around the home. I would recommend choosing programming languages that are widely-used because these benefit from better on-line support through various websites, forums and blogs.

    I started programming as a hobby, progressing to making a living from it. I use IDEs (Eclipse and Visual Studio) as well as text editors with command line tools. I recommend using a modern IDE when learning because the built-in tools make for a much richer experience and it is so much easier to explore the facilities of whatever language you are writing in. By all means, once you have gained a degree of proficiency, explore the command line tools that underpin the majority of IDEs because that will improve your understanding of how it all works, but that is not something you need to know to get started.

  2. I am an English instructor, so getting the students to master one language would be an accomplishment. I consider it important, though, just as I consider learning calculus or physics important to the development of problem solving skills. Nothing bothers me more than hearing a student in an English class say, "I hate science" or "I hate math." The reality is, knowing a bit of everything helps one see the connections around us.


Post a Comment

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…