views:

356

answers:

11

What do you think? What is the ideal programming language learning sequence which will cover most of the heavily used languages and paradigms today as well as help to grasp common programming basics, ideas and practices?

Edit: You can even suggest learning sequence for paradigms rather than languages.

+4  A: 

Decreasing level of abstraction ->

Python -> C#(or Java) -> C++ -> C.

Prasoon Saurav
Downvoter has downvoted every answer here.
Prasoon Saurav
WTF is the downvoter here? Please explain the downvote(s).
Prasoon Saurav
I agree with learning Python as a first language, but I'm not sure how much benefit there is to decreasing the level of abstraction down to C straight away. All you're really doing is "unlearning" the useful abstractions. Learning a *different* high-level language is probably more useful, you discover new ways to solve problems. Going to C, you just learn how to solve things the same way but with less help.
BleuM937
@BleuM937 : What if he likes to play with hardware? ;) I like C so I recommended C.
Prasoon Saurav
I like hardware too, and C is a good language for hardware. The sequence here is good if you want to do embedded/ systems programming. However the OP didn't mention that specifically, but instead asked for common programming paradigms, ideas and practices. C won't teach you new programming paradigms in the same way as, for example, learning a functional programming language.
BleuM937
@BleuM937 : That is why I mentioned Python and C# too. Hope you get my point. :)
Prasoon Saurav
@BleuM937 that way You learn how things actually work. And sequence shouldn't stop at C.
Arnis L.
-1 because my opinion is basically the opposite. Starting from C and ending with Python: from the low level to high level languages.
Andrea Zilio
I've been programming for 3 years, and although I'm not going to inflate myself to anything more than "beginner", I've still learnt plenty and written useful code in that time. I haven't needed C for any of it. My argument is not that C is not a worthwhile language to learn, but instead that it shouldn't be a high priority, and there are other languages that would be more helpful.
BleuM937
+1  A: 

I started with Java, then C# and eventually C++.

I'm not saying that I recommend this order to you. However, it does seem to answer your question as these languages do cover most of the commonly used paradigms today (being mostly OO).

Edit
I intentionally did not mention brief experiences with Basic and Pascal before learning Java. And I've dabbled in many other languages (mostly Ruby, Objective-C++ and Clojure).

StackedCrooked
So, who is the downvoter here? ಠ_ಠ
StackedCrooked
+1  A: 

I would say go with scripting first as it does not need to be compiled and it is a little easier at first. Something simple like VBScript, and Windows Shell scripting. This will get your feet wet in programming. Then you can move into Javascript/ecmascript where you will get a taste of some OOP (oject oriented programming), Then you can go to PHP, From there you will have all of the knowledge you need to move into any other programming language and grasp the concepts. There will be stepping points but it pretty much depends on what your end goal is (web, windows, linux/unix, cross platform ect.....)

John
A: 

Go to the point

C#

then learn at least 2 very different languages if you have time

Pierre 303
Use your time to build amazing things instead.
Pierre 303
+1  A: 

I first dabbled with Game Maker/ GML back in highschool, which many here would discount as a "real" programming language. It was kinda helpful to learn and get through the absolute basics of programming. Due to the very restricted scope of the language though, it's not necessarily something you'd want to play around with very much.

I learnt Python as my first "real" language, which is a nice language to get started with because it has a clean syntax and generally the concepts are quite easy to grasp. If you can visualise "blocks" of code, then you can read Python pretty well, and nicely-written Python reads like English.

I learnt VB and C# at around the same time, VB for class, and C# because I preferred the syntax and there was a bigger online community for C# than for VB (If you want to get the hang of a language, as well as writing code yourself, it's helpful to read other people's code as well). In terms of learning a language however, VB and C# are basically the same language in different clothes.

After that, I started playing around with Haskell. I still can't really say I've mastered Haskell yet, but learning Haskell really helped me write C# as well, using the functional programming features in LINQ.

None of these languages have manual memory management, which removes some complexity from learning, but manual memory management is still an important skill for some applications. When you start writing software for embedded systems or you need very high performance, it's worth learning a language like C. Until then you're better off playing around with high-level languages.

BleuM937
Drive-by downvoting? Downvoting without providing a reason helps nobody; if there's a problem with my answer that's fine, but leave a comment so the whole community can benefit!
BleuM937
+2  A: 
  1. Any language that allow making (graphic) games (good for exercising as it gives immediate reward en enjoyment)
  2. A very different language than the first one
  3. An "alien" language - that is so different than the two first that it makes you think programming very differently.
Klaim
Assuming the person asking is a beginner your answer doesnt exactly help them much. I believe almost every language allows making games? What does "a very different"/"alien" language mean?? Maybe some examples and what different/alien means (procedural/functional/[non]object-oriented/compiled/translated etc etc)
domino
I added "allow making games" because not every language allow access to graphic libraries. When you do graphic games, it's almost immediately rewarding and then it's a good way to help the newcomer enjoy the still hard craft of programming.
Klaim
+4  A: 

SPOILER: There is none!

For beginners, I'd suggest a language that implements most of the modern programming paradigms, but at the same time, it should be easy to learn the language itself! Pointer arithmetic isn't the most important thing, when you want to learn how you can fetch data from a network resource. Also, results should come immediately, dynamic typing and interpreted code is the correct way, I believe.

I'd therefore suggest Python or Perl6 as first language to learn. Then move on to Java and/or C++. I don't really see the need to learn C if you're not interested in kernel developing or programming micro controllers. Sure, You can program user application in C, but it's not a necessity.

After, or while learning Java, I'd suggest taking a look at pure functional programing languages like Haskell or Erlang.

Oh, and I didn't mention C# due to the fact, that it doesn't make much sense for me to program in C#. Since C# is so much alike to Java, I'd suggest simply sticking to Java and then reading about the additional features, that were influenced by C#, things like packing/unpacking, etc, and producing platform independent code from the start!

polemon
@polemon I think you can say just JAVA(you don't have to mention C#) or you can say JAVA/C#. But you should not say don't go for C# to a newbie. C# is very much different from JAVA. And platform-independence can be achieved with C# as well as many other languages.
Gulshan
I didn't say not to go for C# for a newbie. Judging by my experience, it is much more complicated to produce reasonable code in C# for Linux. like I said. Java is a good start, but what I wanted to point out, is that starting with a language like Python probably easier, maybe better, too, since you have an immediate result, lot's of comprehensive documentation, and a large user base. Also, Python gives you all components a modern programming language has. It is multi paradigm, things like list comprehension is there, but you don't have to take care of pointers, etc.
polemon
A: 

:-)

  1. machine code
  2. assembly language
  3. fortran
  4. lisp
  5. cobol
  6. c
aaa
> 3. FORTRAN> 5. COBOLWhile both languages are actually still in active use, it's mostly only for legacy purposes.Learning machine code to learn programing, is like learning to grow cotton and guard sheep before learning knitting.
polemon
@polemon there was :-), it is a joke answer
aaa
+1  A: 

From a web developers view:

  1. User interface and animations

    HTML/CSS/Javascript or Flash/AS3
    If first choice dont care about crossbrowser issues, test only on one modern browser(as of speaking anything else than IE).
    The use of Flash is decreasing but a good environment to learn visual scripting and the concepts will help you elsewhere.

    Why?

    I believe it's more fun for a beginner to try visual scripting than processing data.

  2. Server side

    Python/Django, ASP.NET or whatever
    Learn to handle data, save and send to client. Learn the language and object-oriented programming. These languages can then be used besides web developing.

amoeba
+3  A: 

I'd go with Python first, then D. Both are multiparadigm languages, so you'll be able to get a feel for procedural, object-oriented, functional and generic/meta/reflection-using programming. More importantly, you'll see how the paradigms fit together and how their strengths complement each other. IMHO this is preferable to learning a paradigm in isolation, and then being dropped into a completely different paradigm, being forced to re-learn how to do simple things from scratch and still never seeing how they fit together. Both languages also place a premium on making simple things simple.

I recommend Python first. It's a simpler and more mature language than D, is interpreted, and has less ways to shoot yourself in the foot. It's dynamically typed, so you won't need to worry about the complexities that satisfying a static type checker bring. It also has a huge standard library so you can actually make stuff work relatively early on. At the same time, it makes enough complicated things possible that you won't outgrow it fast.

Within Python, I'd say you should learn procedural programming first, because it's the most straightforward way to accomplish simple tasks. Functional and OO are overkill until you get to larger projects. You won't see the value in them until you've already written some procedural spaghetti code. After you're comfortable with procedural programming and have written some spaghetti code, you should learn OO and functional simultaneously, and focus on understanding the value of late binding/higher order functions.

Once you're comfortable with Python, there are bound to be cases where you need more performance, static type checking or the ability to do close to the metal work. D is the only language I'm aware of that enables this, but is truly multiparadigm and allows you to write higher-level code effectively within the same language as close-to-the-metal code. D has a mostly complete C-like subset (the only major exception being lack of a preprocessor) and its garbage collector is written entirely in D. You can get down and dirty with pointers and inline assembly language and manage memory manually via malloc() and free() when you need to. At the same time, D supports truly amazing compile-time reflection and metaprogramming, enabling you to do a lot of things you'd do using runtime reflection and duck typing in Python.

dsimcha
A: 

Starting from the very beginning this is my idea of the ideal sequence of things to study to "learn programming":

  1. Microcode excercises (just a bunch to get the idea of the very low level world and to understand that programming is not "magic")
  2. Assembly (no need to learn it very well, just what is needed to write simple math-based programs involving cycles but nothing like GUI or similar. Objective: understand that writing even easy programs in assembly is very difficult)
  3. C (studying it pretty well allows you to understand very well how data is managed in the memory and how data structures can be implemented. So it would be important to study pointer arithmetic, pointers usage, implementing data structures directly, etc...)
  4. Java (maybe at the high school) or C++ or C# (at the university because they are more complicated than Java). Objective: understanding the importance of abstraction and OOP with their implications: components reusability, coupling, cohesion. And maybe the idea of virtual machines if Java is chosen.

After this you can continue this way:

  1. GUI applications with Java or C++ (using Swing or Qt for example)
  2. Python or PHP (To understand scripting languages and more generally very high level languages, their motivation and usages)
  3. Using Python or PHP to build dynamic web pages

Things to add depending on specific needs:

  • Computational complexity theory (maybe when studying C and before C++ or Java)
  • SQL (this is a must)
  • Shell scripting (Bash scripting for example)
  • Security issues
  • Better understanding of software engineering issues (testing, debugging, maintainability, documentation, etc)
  • HTML/CSS/JS
  • Concurrent programming (maybe when studying Java and so using threads, etc...)
  • Distributed applications
Andrea Zilio