Beginning
programmers have a lot of language options to choose from. Here are
the best 5 programming languages for those just starting out.
I
recently got a request from a reader who asked for some advice about
which programming language to learn for somebody who's never done any
prior programming. As is the case with many seeming simple questions,
it's a lot easier asked than answered. And as is also typical with
such loaded questions, the answer begins with the familiar two word
phrase: "it depends." So let's talk about what the choice
of programming languages to learn first might depend on, after which
we can chew on some of the top choices for beginning programmers.
Choosing A Programming Language
I
took my first programming class at UT Austin in 1979, which I realize
is probably well before the birth date of many of the readers of this
blog post. Back then, the philosophy that guided learning to program
was much like that practiced by some parents teaching their kids to
ride a bike: "start 'em out on training wheels, and when they
get comfortable tearing around with four points of stability, take
the training wheels away and let 'em learn to ride all over again."
Back
in they day, they tended to teach "training wheels"
languages designed to illustrate certain features and functions that
programmers should know and understand, or that combined features
from lots of different languages so that programmers can get to know
them all at the same time, rather than piecemeal. For me, the
training wheels language for explicit typing and data declarations
was Pascal, and the training wheels language for assembly was MIXAL
("mix all," get it?), a synthetic assembler created by a
computer science genius still at Stanford today named Donald Knuth.
By the time I found out that nobody used either of these languages in
commercial environments, I'd already branched out to learn FORTRAN
and C/C++, both of which I used quite extensively in the seven years
I worked full-time as a software developer, along with a handful of
other languages and scripting tools.
These
days, the prevailing approach is to start programmers out on
languages they're likely to encounter in the workplace, and provide
enough introductory training and information so they can sink or swim
on their own. This makes perfect sense to me, because most students
will already have had some exposure to programming (sometimes, quite
significant exposure) by the time they get to the point where they
take an introductory, college-level programming class. For some kids,
this can come as early as the 8th grade, and many such students will
routinely take introductory, college level programming classes in
high school through a local community college, one of the many
vendor-sponsored IT academies (Microsoft, Cisco, and so forth), or
online from a four-year college through some kind of partnership or
affiliate program between the local school district and an
institution of their choosing.
What
then, does the choice of a starter programming language depend on? I
made a quick visit to the course listings at my local community
college (cis.austincc.edu) and learned that they offer C# and C++,
Python, SQL, Java, and a variety of web programming (Ruby), scripting
(JavaScript), and markup (HTML5, CSS) languages in their curriculum.
Checking the Computer Science Department at the University of Texas,
I see a primary focus on Java, with exposures to AI languages (LISP
and variants thereof), concurrent languages (Smalltalk, Linda, and
more), functional languages (Scheme, Haskell, and others), with
something more of an ivory tower bent in the discussions and
selections involved. In general, the consensus in the industry is
that it's best to learn the language one will spend one's time
programming in most, but perforce given the forward looking nature of
education and the only-come-later nature of landing a programming
job, that may seem a bit easier said than done.
LifeHacker has
a very nice article that gives some useful clues to solving this
dilemma. They put five languages out for a survey to their
readership, and came back with an equally useful and interesting best
of the best recommendation.
1. Python
One
of the older items in this collection, Python is the work of Guido
van Rossum who has turned the reins for this language over to the
Python Software Foundation, which is responsible for its development
and standard documentation, and keeps it open source and free for any
and all to use. Developed in the 1980s as a scripting language
designed for quick and dirty but powerful programs, it enables
developers to crank out large volumes of readable and usable code
quickly and relatively easily. Python includes object-oriented,
procedural, and functional elements, and supports all of those
programming styles. Python also got the nod from the LifeHacker
survey respondents as the best of the five for a first-time
programmer to learn, because of its ease of learning and use, and its
immediate utility for a wide variety of purposes and applications.
2. Ruby
A
language from computer scientist Yukihiro Matsumoto, it was designed
with a simple, readable syntax that makes sense to human programmers,
but also translates well into computer instructions. The language
includes object-oriented, procedural, functional, and imperative
elements, which makes it flexible and incredibly all-purpose in
nature. Ruby is known as easy to learn (reminds me of the tag lines
from the gambling channels on cable about Texas Hold'‘Em: "Minutes
to learn, and a lifetime to master"). It has also attracted a
large and enthusiastic group of proponents (some would call them
zealots) and is widely adopted and used for all kinds of
applications.
3. Java
Originally
the brainchild of a whizbang group of engineers at Sun Microsystems
in the mid-1990s, Java is now part of the Oracle empire of IP. Java
sits at the heart of many web-based applications across the entire
panoply of platforms, OSes, and devices. It's a class-based,
object-oriented language that's built for portability and usability,
though it is a bit tricky to learn, and it's even trickier to learn
how to write efficient and effective programs in Java. It is probably
the most widely-taught programming language in academic programs of
any kind, from high school up through graduate level education.
4. C And C++
C
traces its origins back to Bell Laboratories in the late 1960s and
early 1970s, where it was developed by Dennis Ritchie as a go-to tool
to reimplement the UNIX operating system. It is uniquely well-suited
to so-called "kernel programming" (basic, important,
constantly run code elements that make up the heart and soul of
operating systems, drivers, file systems, and other key runtime
environment components). C++ is an object-oriented reimplementation
of C built by Bjarne Stroustrup at Bell Labs in the late 1970s who
sought to combine the efficient and flexible capabilities of the
plain-vanilla C language with strong high-level features for program
organization and structure. Either or both of these languages are
arguably among the most important ones around, because more operating
systems and basic, essential facilities (file systems, networking
protocols, device drivers, and so forth) are built using them than
any other languages. Many serious programmers see either or both of
them as foundational and irreplaceable for these reasons. C was the
first "real programming language" that I learned after
Pascal and Mixal, and definitely proved more important to me as a
software developer than any other language during my seven years of
work as a developer (I also used FORTRAN, Pascal, SASL, Lisp and
CLisp, various UNIX shells, and numerous command languages during
those years as well).
5. JavaScript
A
scripting language developed in the mid-1990s with the specific
intention of enabling web pages to incorporate dynamic, interactive
content, JavaScript has gone on to become a foundational language for
the server and services side of networked computing, as well as a
boon to web developers in search of dynamic, object-oriented access
to web document models, user input and interaction, ongoing
calculation and interpretation and a whole lot more. JavaScript is
dynamic, but also lets programmers use object-oriented programming,
along with functional and imperative capabilities. Somewhat loosely
based on C, JavaScript is THE go-to language for anyone interested in
web development. JavaScript is simple enough to be easy to learn, but
offers a wide variety of add-ons and packages, as well as outright
development environments, to make it a powerful, general programming
tool in its own right. 99 percent of the programming I've done since
I quit being a full-time developer has been in JavaScript, thanks in
large part to digging into HTML and CSS in 1994, and writing 14
editions of HTML
For Dummies from
1995 through 2013.
For
those who have been thinking about learning to program, I hope this
gives some useful input and guidance. Before making any serious
decisions, dig into Wikipedia and other online resources to read
about the history, utility, and best applications for those languages
that catch your fancy. You could certainly learn all of them (I know
something about all of them except Ruby on the basis of commercial
programming experience, and have read and played enough with Ruby to
believe that it is a worthwhile item in the list provided above).
When
it comes to programming, there is no substitute for reading as much
as you can, but also for rolling up your sleeves and writing code to
understand -- and eventually master -- the capabilities that these
languages can provide.
No comments:
Post a Comment