ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Best Beginning programing lanquage?
Actually, no, although I know what you mean. The Llama book is 'Learning Perl', definitely more suited for a beginner.
For anyone else, Camel book is 'Programming Perl', more or less lang definiton, plus some advice and examples.
These days (assuming net access) I'd go with Llama + link I supplied previously, although I must say that the Bighorn book (Perl Cookbook) is worth it's weight in gold for example probs/solutions & reasons why.
I did a bit of visual basic at the start but havnt touched it since.
C was the first serious language I learned. Its good to start at the bottom before
you do any object-oriented stuff.
Scheme (or Lisp in general) is great fun but you have to think hard cos its so abstract (no loops, only recursion) and it isnt the most productive language.
Perl is overrated.
I heard lots of good things about python from friends, but I havnt taken the time to learn it myself.
the beauty of c++ is once you have learned that, your done
the book i used to learn c++ was (and is) C++ From the Ground Up (publisher: osborne, author: herbert schildt)
I now know vb (6 and .net) java, and javascipt
If you start c, then any book you buy will tell you nothing about objects (object oriented programming is the future) so start c++ and you will start writing programs that are basicly c, then later you will be introduced to objects.
I love that i started C++, whatever programming language i turn myself to i already know.
Hmm some people think you should learn the high-level, object oriented stuff first, others prefer learning basic procedural languages before using more abstract ones. Top-down versus bottom-up. C definitely teaches you more about how a computer works, manually allocating memory and having to write your own data types, interfaces etc.
I definitely agree understanding C is a good idea, for background knowledge if nothing else.
OTOH though, might be a little heavy going for a complete beginner.
A slightly 'higher-level' lang might be easier to start with whilst learning basic concepts like variables, loops, decisions, subs/functions.
I say C++, because it's object-oriented, wide-spread and at least I think it's easier to comprehend than Java which would otherwise be the thing to learn first. I dunno, Java just seems cluttered, or maybe I've been reading the wrong book.
The question is about best, for someone who doesn't know programming.
Any language with simple syntax would do.
C++ is not very simple like BASIC, but IO is pretty straightforward
and not frightening(to a beginner) like C.
Idea of datatypes is important, BASIC has it really screwed up.
C++ has a really strong typing system.
PHP/Perl etc are not really general purpose, of course those can be
good too for a beginner due to ease of use. C++ is general purpose
Interpreted languages won't teach enough basics of a compiler, so
first guy should preferably go with C++. I learned in BASIC,
found it strange to compile code before running it when I learned C++.
I say the language is an interesting angle but so is looking at the beginner. If the beginner is more interested in web development than desktop programming, for example, advising C++ may well lead to disappointment while PHP may lead to more interest in programming in general. If learning about the internals of a computer is the goal, then C seems more appropriate than Python imho.
Another point is how much 'backup' the beginner can get. When I started with BASIC on the first computer my dad bought, a guy in the neighborhood who was a little older was in the same situation. At first we both went slow but then a mix of competition and cooperation made us cracks in GW-BASIC (yay! ) in no time. He'd figure out something cool, show it to me and I used it for something differently and went back to him to proudly show my findings, which he then... etc.
Being a bit more experienced now, I'd want to recommend a language that is very versatile. What I mean is that for learning programming essentials, most languages will do. It gets more interesting if you can use the strengths of other languages once you're past the beginners level. You can teach C++ to a COBOL programmer but it takes more to make a C++ programmer out of a COBOL programmer so I think it helps if a beginner is not locked-in into a certain way of thinking. The COBOL way of dealing with data is going through it sequentially where the C++ programmer would perhaps juggle some objects and the Lisp programmer processes lists. Ideally a programmer understands the problem and applies the best solution, where a given language (among other things) obviously places some boundaries on what's possible but I think the ability to look beyond a typical approach is important and it helps to start with a broad scope as early as possible.
So what then? I guess C and C++ because it covers a lot and other languages are relatively easy from there on (well, try Befunge or so ) or start 'easy' with Java, Python or Ruby and if the need for more power arises then the essentials are covered well and moving to C(++) isn't such a huge leap anymore. I'd prefer starting with C++ but it depends imho on the beginner.
I believe just because someone is beginner doesn't mean he need not deal with real world problems in programming. At the same time, if too much of complexity is thrown at him he may hate programming and leave it altogether.
Python and other dynamically typed scripting language suffer from the first problem. Due to loose type checking a beginner may overlook the maintenance problems caused by it.
On the other hand while C and C++ are extremely powerful and have the best syntax in my opinion, they are too complex for a beginner. He might not find it easy to learn pointers and other problems caused by lack of boundary checking in arrays.
Java strikes the balance between the two scenarios. It is strongly typed and still much simpler than C/C++. But it does lack the access to bare metal.
So a beginner can start with Java then move on to C/C++. Later he can learn and use python and other scripting languages for quick prototyping of programs.
Another advantage of learning Java is its widespread acceptance. Even if the person learns nothing more than Java he can do pretty powerful programs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.