[wplug] Best programming language for beginner?

Vance Kochenderfer vkochend at nyx.net
Fri Feb 22 02:50:03 EST 2013


I'm going to buck the trend here and suggest looking at PHP.  Yes,
there have been innumerable crimes against good programming
committed with PHP, but that's true for any language that's had
wide use.

The major benefit is that it's easy to get stuff done.  As
packaged by every distro I've used, it comes with a whole lot of
functionality built in, so you don't have to worry about locating
and importing modules or extensions to do most tasks.  You can
simply search the documentation for what you want to do, and
you'll probably find at least one function that is relevant
<http://www.php.net/manual/en/indexes.functions.php>.

The key to self-directed learning is being able to make progress
toward a goal quickly enough that you don't lose interest.
Languages that require you to construct a lot of scaffolding
before you even get started attacking the problem you want to
solve are discouraging to new users.

Of course you won't want to expose your initial attempts at
writing code to the open Internet, but it's easy to set up a
practice web server on a virtual machine or spare system, and you
can run programs on the command line after a quick 'apt-get
install php5-cli' (or equivalent).

PHP has all the expected control structures, includes a rich set
of data types, and the syntax is similar to other C-like
languages.  Of course like other high-level languages you don't
have to worry about memory management; you just assign stuff to
variables and go.  The principles you learn can be applied to
many other languages.

Unfortunately, I don't know of any good tutorials to recommend.
One downside to PHP's popularity and ease of entry is that a lot
of people write up bad examples of how to do things, and it's hard
for a beginner to tell these apart from the good.  If someone else
knows of a good resource, please chime in!

Vance Kochenderfer        |  "Get me out of these ropes and into a
vkochend at nyx.net          |   good belt of Scotch"    -Nick Danger


More information about the wplug mailing list