On Sat, Feb 25, 2006 at 08:13:34AM +0900, Timothy Goddard wrote:
} My order was Quick BASIC, then C++, PHP, then Ruby. I found the
} following things:
}
} 1. Don't learn any of the BASIC family. My knowledge of this was a
} severe impediment to learning C++ a few years later. It teaches you
} really bad habits.
I mostly agree with this, but I will both expand and contract that
category. Most forms of Basic are, indeed, impediments to learning to
program well. This specifically includes all Visual Basic forms through VB6
and VBScript. It does not, however, include VB.NET. VB.NET is pretty much a
dialect of C#, rather than the horror that is VB6. I include Perl in this
category, however. I will name this category "Languages that play fast and
loose with syntax, types, and APIs without any coherent underlying sense."
It is because of this lack of basis that it impedes learning other
languages.
I learned AppleSoft BASIC as my first language. Thankfully, I bridged the
gap between this category of bad languages with Logo, Pascal, many years,
and puberty. I consider Logo an excellent first language, and not just for
moving the turtle around to make pretty pictures.
} 2. C++ is extremely useful to know. It provides a very good launching
} point for understanding OO design while at the same time providing an
} understanding of low level details of how it all works under the hood.
} The easy Ruby-C(++) integration also makes this useful for speeding up
} the slower parts of your Ruby code later.
C should be learned before C++. Everything useful and powerful about C++
(other than employability) is brought into sharp relief by contrasting it
with C. I don't think it is a good language for learning OOP, however. C++
is slightly better at providing OO features than straight C (yes, I'm
serious), but its real power lies in its libraries and its facilities for
generic programming (i.e. templates).
} 3. Ruby is truly incredible in its simplicity and ease of expressing
} quite complex concepts. I started using this about 3 months ago, just
} before beginning my first job designing a web application. I used the
} Rails platform (built on Ruby) and would choose it over PHP for web
} applications any day.
Ruby is great. Rah rah rah. I mean, it's true, but you aren't going to get
much dissent about it on this list.
} After using Ruby you will feel handicapped writing in any other
} language. For this reason, I would thoroughly suggest learning at least
} the basics of C or C++ in parallel with Ruby. Learning two languages at
} once is not nearly as daunting as it sounds as the basic concepts
} translate nicely between them. After building up a basic knowledge of
} each of them, you will have a nice base to launch off into the
} specifics.
I've said it before and I'll say it again. Learning your first language is
*hard* because you are also learning concepts of programming. Learning your
second language is somewhat difficult because you will spend most of your
time thinking in your first language and trying to translate that to the
second, and often getting hung up on syntax. Learning your second paradigm
is *hard* because you must make your brain think in a way that it hasn't
before. Learning your third, fourth, or fifth languages is a bit of a
challenge. Learning your tenth language is a weekend of geekiness. Learning
your twentieth language is a day of playing around.
I think the ideal progression of learning languages would be:
1) Logo as a preteen, or AWK and/or Bourne shell scripting at any age
2) C (second procedural language)
3) Ruby, Python, Java, or C# (first OOP language)
4) C++ (kitchen sink language)
5) Scheme, Haskell, or ML (not OCAML) (first functional language)
6) SQL (first declarative language)
7,8,9) Whichever of Ruby, Python, Java, and C# has been missed previously
10+) Anything at all
} Please note that I am completely self taught in programming and have
} never taken any formal education in any language. My experience may not
} be typical.
I learned BASIC, Logo, and Pascal on my own. I took a high school CS course
which used Pascal, so what I learned was good programming. I learned C,
C++, Bourne shell scripting, and AWK before entering college.
In college, as part of a CS major, I learned (in no particular order) Lisp,
ML, SQL, Java, make (fantastic declarative language, BTW), and lexx/yacc.
Outside of coursework, I also learned JavaScript, a bit of AppleScript,
VRML (both 1.0 and 2.0, but 2.0 was sort of a dataflow language), and just
enough Perl to modify other people's scripts while hating it.
In grad school I taught C++, both as a TA for the software engineering
class and in a week-long minicourse; this meant that I had to learn it
deeply, and I learned to appreciate its subtlety, power, and specific
safety nets. (I could go into the relative advantages and disadvantages of
C++ for pages. I will spare you all.)
} My personal choice for application development would be Ruby, using C++
} extensions for the heavy lifting. I believe it is essential to
} understand both a compiled and high-level language, preferably that
} integrate easily with each other, as this will let you effectively
} partition tasks based on speed requirements while retaining the clean
} overall logic of the higher language. For this, I believe Ruby and
} C(++) are an ideal pair.
The right tool for the right job. Ruby is nearly the same size and shape
tool as Perl and Python. It is good for many of the same things. In
addition, Rails makes Ruby ideal for standalone, database-backed web apps.
For a GUI app, however, I would choose C++ and Qt/KDE or C#. For a major
enterprise app (e.g. the mission-critical, proprietary, special-purpose,
in-house application with which a company performs its work, such as the
retirement management software I am working on now for an actuarial firm) I
would choose C#. For a numerically intensive application, particularly one
that is paralellizable, I would use C. For simple scripts I continue to use
Bourne shell and/or AWK.
The really valuable thing about knowing lots of languages is that you can
think flexibly and work efficiently. Granted, I haven't found a use for a
functional language for ages, but I've certainly use functional idioms that
would not have occurred to me if I hadn't learned a couple of functional
languages. My dayjob involves programming VB.NET, but you better believe I
use a variety of other languages (particularly SQL, AWK, and Bourne shell
scripting) to aid me in my work. Furthermore, I take great joy in playing
with Ruby (and Rails in particular) and JavaScript on the side.
} My advice to you is to get an introductory book on C++ and a book on
} Ruby (the Pragmatic Programmers' guide is excellent). As you work
} through the books, try to write the equivalents of the C++ examples and
} the Ruby examples in the opposite language. This will rapidly teach you
} both the upsides and the downsides of each language.
Gah! I could not disagree more. Learning more than one language at a time
is a recipe for confusion. My advice is to choose a simple toy task that
you will attempt to implement in each language you learn. For many years I
used an abacus (which I implemented in Java 1.0, Java 1.1, VRML 1.0 w/ CGI,
VRML 2.0, C++, and JavaScript/DHTML). For BASIC, Pascal, and C I used a
simple bubblesort. For Ruby (and Rails) I used a Firefox "live bookmark"
generator <
http://www.anthropohedron.net/bookmarkfeeds/>.
Start with shell scripting and awk. There are excellent books on it out
there, the technology isn't changing, and you can keep pretty much the
entire language in your head. Failing that, there are good man pages. If
you are on Windows, get Cygwin. If you want to jump straight into Ruby from
there, well, that's almost as good as the progression of languages I listed
above.
For someone who is starting out with no programming experience, I consider
Why's Poignant Guide to be the best introductory Ruby text out there. Yes,
really. It introduces concepts gently and humorously.
--Greg