13
votes

What languages (or classes (as in paradigms) of programming languages, plus a recommended language of that class) should every computer science student be taught in college according to you? Motivate your answers; why that language? What use will one have from it? What concepts does it teach (better than language X does)?

Note/clarification: This question is about computer science with heavy focus on software engineering, not pure computer science. It is still computer science education and not software engineering education which is the focus.

11
  • 13
    Psuedo-code should be sufficient for CS.
    – Jé Queue
    Commented Feb 24, 2011 at 15:07
  • 12
    @Xepoch - disagree. It's not particularly natural to express eager vs. lazy evaluation semantics, covariance / contravariance in type signatures, category theory, etc. using pseudo-code. Pseudo-code is great for describing algorithms and data structures, but there's a lot more to CS than that. Commented Feb 24, 2011 at 15:13
  • 6
    Moreover, the vast majority of CS students are hoping to get a non-academic job after graduation. Pseudo-code isn't going to be worth much in a competitive job market. I don't think that a CS degree should primarily be job-training, but it has to make some accommodation in that direction. Commented Feb 24, 2011 at 15:18
  • 2
    ALL OF THEM. If time is limited, start into the letters of the alphabet. A+, B, C, C#, D, E, F#, J, K, Q, R, T... That's not a bad list, actually. Commented Feb 24, 2011 at 15:46
  • 6
    Congratulations on discovering yet another version of the "Which Language?" question. I can't wait to read all of the opinions. Don't forget the reference to SICP. Oh wait, there it is. Commented Feb 24, 2011 at 16:27

20 Answers 20

21
votes

I'm going to give a list:

  • Assembly (a relatively simple dialect): It's important to understand at least a little of the fundamentals
  • C: Procedural language, used in many places. Does not burden new students with whole new concepts like OOD all at once.
  • Java / C# / Eiffel / C++: Something Object-Oriented is good, any one of these would accomplish the goal of teaching the students OOD and once they understand one of these languages, they should be able to learn the others.. There are many good languages, I listed Eiffel because it also has design-by-contract.
  • LISP and Prolog: Teaches students a whole new way to think, which is imporant, even if they never use either of these "in the real world".
  • SQL and XML: Introduces new ways to think about data and how to retrieve it and manage it.

Students should be exposed to all of these paradigms at the very least. Not just one or two.

I suppose many people will suggest Python to cover the procedural style, OOP style, and maybe others, but I don't have enough personal experience with Python to be able to confidently recommend it.

10
  • I really wish my school had gone into more detail on XML and SQL, we had one class that went into both and it was terribad.
    – user6791
    Commented Feb 24, 2011 at 15:52
  • i'd add modern dynamic languages, like Lua, Python, Javascript, etc
    – Javier
    Commented Feb 24, 2011 at 16:42
  • 4
    ah, also some hardcore functional, like haskell and erlang are very educational
    – Javier
    Commented Feb 24, 2011 at 16:43
  • 1
    +1 for listing SQL. At least you're thinking of relational algebra.
    – Jé Queue
    Commented Feb 24, 2011 at 22:24
  • 1
    I would separate managed from unmanaged OO too, C++ and Java. While I have never used C++ since uni without learning about malloc, the heap and the stack, you will never be as good understanding OO.
    – markmnl
    Commented Feb 28, 2011 at 1:00
45
votes

I personally find it somewhat sad that functional languages aren't taught as predominantly as they used to be. I think that at the very least comp sci students should be exposed to a language from all of the major paradigms: procedural, object-oriented, functional, and dynamic.

9
  • 2
    +1 My programming languages class was easily the most valuable class I took. Commented Feb 24, 2011 at 15:23
  • 1
    As an IT student I definitely agree. I have the benefit of working full time in the real world while I go to school as a junior level web app developer, but I feel like even if I went with a full fledged CS degree I would be missing a lot of coverage of the different paradigms.
    – Ken
    Commented Feb 24, 2011 at 15:25
  • 1
    Somewhat related: youtube.com/watch?v=Ps8jOj7diA0 Stanford has their complete Programming Paradigms 2008 lectures up on YouTube.
    – Inaimathi
    Commented Feb 24, 2011 at 16:07
  • 4
    Add declarative to the list (Prolog). Also some languages are explicitly parallel (Occam). Teaching students how parallelism works would be good (nobody get it correct). Commented Feb 24, 2011 at 16:33
  • 1
    @Martin York: Prolog is a logic programming language, which is a type of declarative language. (I mention this as functional programming languages are also declarative, generally speaking.)
    – mipadi
    Commented Feb 24, 2011 at 17:20
33
votes

I think a well balanced CS student should be taught a language in each of the 4 programming language types:

Functional - Lisp/Haskell/PostScript. I don't have much experience with Haskell, but I've heard other programmers who do rave about it. Understanding the constructs of functional programming and why they're useful in many situations will help a programmer become better at organizing algorithms in other languages as well.

Object-Oriented - Take your pick. C#/Java/Python/Ruby/yadda yadda yadda. This type needs to be taught simply because that's what modern business wants.

Imperative - C/Fortran/Pascal. These are less common these days, but they should still be learned from a practical/historical perspective. The methods they employ still have practicality because in every language, it all boils down to an instruction. And imperative languages are very good at listing and following instructions.

Logical - ProLog. I have never found a good practical use for any of these languages, but I have found some of the concepts behind the logical languages handy when trying to figure out how to write some of my methods in more object oriented languages. I didn't get to focus long on the logical languages during my college years, and I think a stronger focus there might have done me some good then.

8
  • 6
    You might want to add prototypical to that list - for example, JavaScript.
    – stusmith
    Commented Feb 24, 2011 at 15:42
  • @stusmith - Prototypical is worth a mention, but it's really a subset of object-oriented languages, and javascript is a limited example at best. I would consider it perhaps a homework assignment in a programming languages course, but not a focus. Commented Feb 24, 2011 at 15:45
  • 1
    +1 for Prolog. I have seen its practical use and I regularly use to prototype algorithms.
    – Fred Foo
    Commented Feb 24, 2011 at 15:48
  • @larsmans - I'd be interested to hear about your usage of it. I haven't touched it in several years so I'm fuzzy on good practical applications of it. Do you have any links to whitepapers or similar articles? Commented Feb 24, 2011 at 15:49
  • Check out ECLiPSe (eclipseclp.org), an open source Prolog dialect used industrially by several large European companies (a.o. the French railway company SNCF, if I recall correctly; I'll try and find a reference).
    – Fred Foo
    Commented Feb 24, 2011 at 15:59
6
votes

The #1 language that every graduating CS major should know is the one that maximizes their potential for landing a great job. That's going to change over time, it's going to change based on the individual's definition of great job, and it's going to vary by geographic region.

For the moment, I'll say that English is the #1 language every CS major should know (this, of course, varies by region.)

3
  • A great job is a side-effect of a CS degree. A CS degree is for just that, knowledge of computational theory. I could easily have obtained a better job in vocational schooling instead of busting my head in maths & CS for all those years.
    – Jé Queue
    Commented Feb 24, 2011 at 22:26
  • 2
    +1 for English. Computer languages are implementation details. Commented Feb 25, 2011 at 0:39
  • +1. If someone can learn English well (s)he can learn the manuals well. I knew English well. I had no problem learning any language. Commented Oct 26, 2012 at 14:07
4
votes

I think it changes with time, but ideally - 3 languages from 3 very different perspectives. In my day it was procedural, OO, and functional - Pascal, C++, and LISP. I'm not so so sold on particularly those three. But when I interview I look for:

  • Some level of experience with a language where you have to pay attention to memory management (C/C++ and many others)
  • Some level of experience with an object oriented language with expectations on API use and the various abstractions available (C++/Java)
  • A "stretch" language - something that is weird, hard, and challenging. I'm not going to hire because someone knows LISP, assembly, or some other challenging language, but I want to see that the engineer faced some sort of challenge that involved serious problem solving and plenty of "what the heck is this?" moments.

As another trade - I think CS programs do need to train students on prominent languages in the market place. At any given time, I think 2-3 languages have serious prominence for the majority of jobs. I think a school owes it to students to provide the opportunity to learn 2 out of 3 of those language with a depth of training available in at least one.

4
votes

For a CS student, look for programming languages that are closely mapped to the CS concepts being discussed. I'd suggest:

  • Scheme, to better understand the lambda calculus
  • Erlang, to understand the actor model
  • Prolog, for predicate logic and proof systems
  • Haskell, for type / category theory, and because lazy evaluation is so fully expressed in the language
  • at least one assembly language -- if you want to count it under this banner, I'd also throw in a byte-code language, like the Java or CLR byte-codes, and the LLVM IR
  • probably a hardware definition language, like Verilog, or VHDL
  • Bison for a compiler-construction class
  • something with a dynamic type system (Ruby comes to mind)...

The list could go on in this way, but the fundamental idea is pretty simple: Teach the students the programming language that will be best suited to the way you want to teach the concepts.

3
votes

yacc

in order to get an idea of what is going on behind the scenes, whatever programming language you are using. it helps grasp basic concepts like dead code, and various types of optimizations that a (good) compiler will be able to do for you.

2
votes

Lisp (with CLOS for OOP) and Haskell. This question is not restricted to students. New fancy programming languages have borrowed (copied, stolen? ... no, it is not bad) a lot of features from this two. You can prepare yourself for the future. Functional programming (style) is more important today and is introduced in imperative programming languages like C# (LINQ) or C++ (lambda) and many more. It is too bad that some students are learning Java only.

1
  • 1
    While I agree with both of them, you may want to put down some reasoning (I'll also note that it wouldn't be particularly useful to know these as your only languages).
    – Inaimathi
    Commented Feb 24, 2011 at 15:34
2
votes

I think the language is not as important as people believe.

Yes, you need to know how to program etc, but many great programmers are self-taught drawing on their real-world experiences which help them when developing.

Students could do with some lessons about how to programming in the real-world and not just the book methods, this would make them more "rounded" and in my option better developers/graduates.

I learnt more about programming and software development after I left university and started work!

2
votes

DOES IT REALLY MATTER ?

Usually the itch behind this question is "What buzzwords can I put on my resume that will land me the most lucrative/interesting/challenging/easy jobs ?". Though the question has merits as most resume are first screened by HR people that hat no comprehension of what they are looking for. but it is very shallow, as once you have passed the gates you need to deliver the goods.

It's not what languages you know that make you a good or bad programmer, it's how you can use it. For this there are basically two categories of programmers :

  1. The ones that concentrate on learning a language to it's core. The most important is the language and how to use it. At extremes they tend to super optimize every little speck of code and will often use obscure features just because they can.

  2. Then there are the ones that want to learn about techniques and paradigms. What language they use does not really matter so long as it can express their mental picture elegantly. At extremes these will tend to use UML or other such systems hoping others will do the grunt work of coding it.

In my opinion you need both. # 1 will provide short term skills and when wisely chosen will ease you through the HR gates but #2 will stay with you all your career and will define you as a programmer.

#2 will provide guidance and organize your train of thought towards a working solution to the problem at hand but without 1 it remains an idea, forever floating in the limbos of vaporware heaven (or hell depending on where you look at it from).

#1 will give you the means to implement ideas into real working systems but without 2 your systems will tend towards cancerous shapeless monsters.

1
  • Yes, it matters. The first language you learn molds your brain regarding how you will look at future languages.
    – user1249
    Commented Mar 11, 2011 at 18:27
1
vote

I believe you partially answered your question yourself.

Of real importance is to give students the opportunity to come into contact with several paradigms, the actual languages shouldn't matter.

Ofcourse, it is important to primarily teach those paradigms which give most work opportunities (probably OOP at this moment). Accordingly, it's also better to teach a broadly used language for this paradigm, as this is more useful than learning something you will likely never use. Therefore I also hated having to write pseudo code on my exams. Pseudocode is fine, as long as it doesn't have a 'fixed' syntax. You should just be able to bring concepts across.

So concretely:

OOP: .NET or Java

At least 1 additional programming paradigm, to make the student aware of other approaches.

Functional: Lisp?

1
  • functional, no, please, not LISP. rather: haskell.
    – mariotomo
    Commented Feb 24, 2011 at 17:05
1
vote

Choosing 3 or more languages from different paradigms isn't that hard, many good answers have been given. But if I had to choose only one language, I'd go for Scala, because it's both functional and object oriented. You can explain and compare different approaches within the same language.

1
vote

Don't forget the stack-oriented/concatenative languages! They can be real mind-benders. They emphasize building complexity using small, easy-to-understand primitives. You can use them to write pointfree (or tacit) code which feels so darn clean.

The classic language is Forth, but my go-to these days is Factor. Also worth checking out are Joy and Cat. Don't miss the concatenative language wiki. It's more fun than a bag full of hammers!

0
votes

Something functional, Haskell or Lisp would be my first choice, but maybe Erlang. Functional languages really teach you how to build abstractions in a very powerful way.

2
  • But should the students be limited to one paradigm? What about functional OOP languages like Scala?
    – Anto
    Commented Feb 24, 2011 at 15:13
  • 1
    No of course not, I was assuming other people would pipe in for those!
    – Zachary K
    Commented Feb 24, 2011 at 17:35
0
votes

Assembly language and microcode. A CS student should understand all the foundation layers of abstraction between boolean state machines and the latest high-level functional/OOP/etc. programming language paradigm.

Basic or Logo or Squeak (et.al.), if they ever want to be able to understand how to teach small kids some computer literacy.

Fortran, Cobol and Lisp, if they want to understand the history of programming languages, and what the actual problems are that modern practices fix.

1
  • And C, so you understand 90% of all open source code you can study.
    – user4595
    Commented Feb 28, 2011 at 1:12
0
votes

Despite its lack of mainstream-ness, I find that D, specifically version 2, provides some interesting lessons that can't be easily learned elsewhere. It makes a more serious attempt than any other language I can think of to get imperative/procedural, object-oriented and functional programming to play nice with each other, and to allow programming at a very low level (pointers, manual memory management, inline assembly language) and a very high level (generic and generative programming) in the same language.

This is valuable because, rather than seeing paradigms in isolation as if they existed in different universes, you get to see the forest through the trees. You get to see the strengths and weaknesses of each paradigm at a fine grained level as you blend them into your programs. You get to see how major aspects of paradigms can be implemented in libraries in terms of lower-level code. The standard library module std.algorithm implements important functional programming primitives, yet is straight, simple D code with no magic. Similarly, std.range implements lazy evaluation, but again is fairly simple D code. You get to understand the costs involved in the primitives of each paradigm, because D's close-to-the-metal features make what's really going on under the hood relatively transparent. You can even write something low-level that looks like C, and then create a pretty, high-level interface to it, in the same language, with no magic glue layers getting in the way.

0
votes

Pseudocode.

People in the field should be able to explain their ideas in a coherent, structured way without and framework- or syntax-specific jargon. I shouldn't have to know the difference between your square brackets and braces in order to understand your algorithm. I shouldn't need to know what ?? means, or what the grep switches are.

Write in in plain language, but structure and format it like code. Anyone can then implement it in whatever language they like.

edit: This answer is partly motivated by the inabililty of some programmers to write pseudocode.

"Just write the algorithm in pseudocode"

"What's that?"

The benefits of pseudocode is that non-programming stakeholders can understand it. I'm not suggesting that you want BAs and users proofing your code, however it can help when a non-programmer has an understanding of the required algorithm. Psuedocode removes the need to explain for (int i = 0; i < j; i++) and what is essentially boilerplate jargon.

2
  • Many programming languages are powerful enough that there is little difference between actual code and pseudo-code. Which syntax elements of actual programming languages do you object to? Commented Feb 28, 2011 at 1:35
  • @kevin cline - I'm comfortable with the syntax elements that I know of - it's the ones that I don't know of that I might object to. Of course I'm able to decipher them, but the point is that pseudocode shouldn't have those issues (I'm yet to see a programming language that really looks like pseudocode) Commented Feb 28, 2011 at 2:00
0
votes

C.

  • First of all, it's still used (widely used !), and not only for kernels. I'm currently maintaining a business application coded in C. So, even with pure and simple C, you still can get a job. In big companies, in industry, almost everywhere (but in web dev).
  • If you're going to work in a Unix / Linux environment, not knowing at least a bit of C is a bit like going shopping and not being able to read the prices on the tags.
  • Pointers ! Everybody should understand pointers (cf. Joel Spolsky). Plus, once you've grabbed the malloc concept, you know exactly what kind of things happen when you carelessly type a "new" in an OOP langage.
  • Most "popular langages" syntaxes derives from C.
  • Yes, it's not always clear. Yes, it's difficult to learn. Yes, strings are somewhat of a nightmare for the beginners. But programming is not always clear and is difficult to learn, and you'll really understand what is great about OOP when, after studying C, you try C++ and discover std::string.

Of course, one should know more than one language, and not only an old procedural language. But if I had to go on a desert island with only one compiler, I'd go with my good old gcc. You can understand high-level programming if you know about low-level programming. I think it's not true the other way around.

0
votes

Some of the programming languages that applied to acquire general problem solving skills, and programming concepts are Logo and Karel, they should be taught before C/C++/Java/Lisp/PERL/Assembly/whatever programming paradigm.

Students get a very practical introduction to programming.

-1
votes

Anything with objects. Just make sure they learn it well.

I would hire a great java programmer for c# anytime, but I would have a lot of doubts hiring someone who never wrote real code

Not the answer you're looking for? Browse other questions tagged or ask your own question.