Tuesday, December 28, 2010

The Best Teaching Programming Language?

I ran across an article today that attempts to explain the merits of using BASIC as a teaching programming language. While the author makes some valid points, specifically at the simplicity of BASIC, I believe that BASIC is a bit of an archaic language that should probably not be considered as a teaching language. I believe learning this language would espouse some bad habits (GOTO, GOSUB nightmares inherent in BASIC) and would promote design concepts that wouldn't have any application in the real world.

In terms of context, I was trying to think of what would stir someone to pursue programming as a hobby and potential career path. Sure, the very fundamental idea of programming is to send instructions for your computer to execute, but why would someone (assuming in younger generations) pursue this seemingly droll craft?

Thinking back on my younger days as a script kid/amateur hacker, what really appealed to me initially was actually videogames. I was astounded at the "black art" of sending instructions understood by a computer that somehow turned into the gaming experiences I loved as a child. Of course, over time, my interest eventually evolved to my current interest in data driven applications, but what really hooked me first was definitely the flashiness that could be achieved in programming in videogames.

That being said, I tried to think of what language out there would be the best teaching language for someone of my demographic when I was younger -- a language that would be readily accessible, relatively easy to pick up, and a person could steadily expand his/her skills through a learning process. Also, the ability to do some flashy things wouldn't hurt; let's face it, at the end of the day, a programmer would like to see something with a little pizazz versus some boring command line outputs.

Taking these factors into account, if I were younger today, I'd probably want to pick up Java as my first language. The learning curve of object-oriented design may be a turn off for beginners, but you can certainly use Java without having the full knowledge of OOD (though the architecture inherently will drive you to understand it). It is:
  • A free, readily available platform
  • All the basic OOD goodies like polymorphism, inheritance, and recursion for advanced learners
  • Type safety, i.e., an integer is an integer, a String is a String, etc (some schools of thought consider type safety to be a hindrance -- I am still a believer in it)
  • A huge community from which to absorb knowledge
  • Multiple platforms for development -- Java 2 SE, J2EE, Android, etc
Some may say that Java may be too formidable a platform on which to start, but I feel that the wealth of resources available for one to learn Java, coupled with the strong community and great tools that aid in learning would make Java the best candidate for a teaching programming language.

So, what about the aforementioned flashiness that will hook certain people? Java's got tools for that too. Specifically, I still remember an intermediate Java class in college that I thought would've helped drive the concepts of OOD home for a lot of students in a high school programming course. We used a great Java application called RoboCode as our course-long project. The final exam? Having all of our classmates' robots go at it in a battle royale on the last day.

Certainly beats solving abstract problems and was more educational if you ask me.

No comments: