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 (http://www.realsoftware.com/). 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 (http://www.microsoft.com/express).

"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 (http://www.bluej.org/). There is also another education edition of Java tools, Project Greenfoot (http://www.greenfoot.org/).

Many programmers now use Eclipse and NetBeans for C, C++, and Java development. While Eclipse (http://www.eclipse.org/) is the better known of the two IDEs, I prefer NetBeans (http://netbeans.org/). 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.

Comments

  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.

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

    ReplyDelete

Post a Comment

Popular posts from this blog

Comic Sans Is (Generally) Lousy: Letters and Reading Challenges

Specimen of the typeface Comic Sans. (Photo credit: Wikipedia) Personally, I support everyone being able to type and read in whatever typefaces individuals prefer. If you like Comic Sans, then change the font while you type or read online content. If you like Helvetica, use that.

The digital world is not print. You can change typefaces. You can change their sizes. You can change colors. There is no reason to argue over what you use to type or to read as long as I can use typefaces that I like.

Now, as a design researcher? I'll tell you that type matters a lot to both the biological act of reading and the psychological act of constructing meaning. Statistically, there are "better" and "worse" type for conveying messages. There are also typefaces that are more legible and more readable. Sometimes, legibility does not help readability, either, as a type with overly distinct letters (legibility) can hinder word shapes and decoding (readability).

One of the co…

Let’s Make a Movie: Digital Filmmaking on a Budget

Film camera collection. (Photo credit: Wikipedia) Visalia Direct: Virtual Valley
June 5, 2015 Deadline
July 2015 Issue

Every weekend a small group of filmmakers I know make at least one three-minute movie and share the short film on their YouTube channel, 3X7 Films.

Inspired by the 48-Hour Film Project (48hourfilm.com), my colleagues started to joke about entering a 48-hour contest each month. Someone suggested that it might be possible to make a three-minute movie every week. Soon, 3X7 Films was launched as a Facebook group and members started to assemble teams to make movies.

The 48-Hour Film Project, also known as 48HFP, launched in 2001 by Mark Ruppert. He convinced some colleagues in Washington, D.C., that they could make a movie in 48 hours. The idea became a friendly competition. Fifteen years later, 48HFP is an international phenomenon, with competitions in cities around the world. Regional winners compete in national and international festivals.

On a Friday night, teams gathe…

Edutainment: Move Beyond Entertaining, to Learning

A drawing made in Tux Paint using various brushes and the Paint tool. (Photo credit: Wikipedia) Visalia Direct: Virtual Valley
November 2, 2015 Deadline
December 2015 Issue

Randomly clicking on letters, the young boy I was watching play an educational game “won” each level. He paid no attention to the letters themselves. His focus was on the dancing aliens at the end of each alphabet invasion.

Situations like this occur in classrooms and homes every day. Technology appeals to parents, politicians and some educators as a path towards more effective teaching. We often bring technology into our schools and homes, imagining the latest gadgets and software will magically transfer skills and information to our children.

This school year, I left teaching business communications to return to my doctoral specialty in education, technology and language development. As a board member of an autism-related charity, I speak to groups on how technology both helps and hinders special education. Busin…