Possible Duplicate:
Which language should students start with?

If you did the CS (or equivalent) track in college, what was the first computer language they taught you in the intro course at the start of the degree plan?

Also, what computer language do you think SHOULD be the first one you teach college students as an introduction to allow them to get their feet wet without overwhelming them, but also prepare them properly to handle more advanced concepts to come later in their education/careers? Finally, what is it about the language you suggest that makes it ideal in this environment?


Don't focus on immediate commercial usability for a first programming language. Focus on a language that allows for quickly and clearly learning the underlying principles of programming. This way you will have a solid base for (self) learning the different programming languages and paradigms you will encounter throughout your entire career!

Our first programming language in college was a functional language called Scheme. Some strong points of Scheme as a first language :

  • very simple syntax, only basic data types and control structures : don't waste time on learning syntax and constructs.
  • use of recursion for loops : directly learn a fundamental construct that people sometimes find difficult to understand afterwards
  • a Scheme program is a valid Scheme data structure itself : this opens up writing a meta-circular Scheme interpreter (Scheme interpreter written in Scheme)

I'd like to say C since it is the origin most languages are based on today (or even have their tools coded in it - interpreter, compiler etc). It also has one of the best books tied to its name from Kernighan and Ritchie.

These days with all of the OO languages emerging it seems OO is the way to go, and it will be for a long while. Going with C or Java will benefit a class either way. The language itself isn't the most important factor, it's the concepts taught with it which can be applied in other languages.


I don't think it matters what the first language is. On the other hand, I think it is very important to expose students early on to different programming paradigms, such as imperative, functional, object-oriented, and logical, before their brains freeze into a single way of thinking about programming.

I learned BASIC first on my own. In college I learned data structures in C, then I took a course in programming language concepts in Scheme, then a course called Programming Paradigms, which used C++ for OO and Prolog for logical programming. Then a course in x86 Assembly. I think this was a pretty good mix. Specifically, doing data structures in C first let me appreciate the advantages of OO.


Just to stir the pot up I'm going to say ANSI C would be my first choice.

Yes, it is not Object Oriented. Why should it be taught first? Developers are getting lazy. High level languages and constructs are eroding the low level knowledge and understanding of logic. I completely agree that OO is a prevalent feature in the newer languages, but for a new student I wholeheartedly believe we should go back to the basics.

Teach pointers. Teach memory management. Teach them to never rely on garbage collection alone, and to remember to close streams, files, connections.

So many developers these days rely on their language of choice to do their work for them. Sure, that works, but what do you learn from it?

Having been taught ANSI C, and later Java, I believe our curriculum had the best of both worlds. It really teaches you to respect proper code, and to do away with the zealotry of new concepts and methodology.

That said, I do believe that as a developer matures they need to learn all there is to learn, including patterns, unit testing, etc. I just don't think OO is a 101 concept, in fact, it should be class of its own to give a proper medium to teach it in. So many developers think they know OO, myself included, but they really haven't even scratched the surface.

Just an opinion, and certainly not a mandate. To each their own. :)


Here at Berkeley we use Scheme, and like a few other people have said, I think it's an excellent introductory language.

1) It has an absurdly simple syntax.

2) The text we use, The Structure and Interpretation of Computer Programs, is an excellent introduction to the subject.

3) It's multi-paradigm. Scheme is much better equipped to teach, say, functional programming, than C or Java.

4) Like somebody else mentioned, every Scheme program is a valid scheme data structure. This allows students to write their own Scheme interpreters without having to deal with writing an advanced parser

5) Everybody ought to leave college with a healthy respect for Lisp.


This question was asked here, which also pointed to it being asked here, and at least a third time it was asked here.


None specifically.

It should be as language agnostic as possible.


When I was in college, it was Pascal.

Now it's Java. And I think I agree with this approach, especially since my alma mater teaches Python in the follow up course.


I'd still have to recommend Pascal as the very first. Although, BASIC does let people with no computer background get up and running a little quicker.


I was taught using C++ but wish it had been Python.


I was taught C++ and it gave me a very good grounding for learning other languages. I have met way too many programmers who have learned in Java, C#, VB, etc and have no idea what a pointer is. If you jump straight into a managed language you should at least be made aware of issues you had to contend with in unmanaged languages.

You need practical experience of an unmanaged language to put everything into context. I also feel that you need practical experience of non OO languages for the same beneficial reasons. You don't always appreciate what you've got until you've been made to live without it...

I also remember doing the classic "implement your own standard container" project where we had to make a double linked list. :) Those were the good old days. I love learning, and my early programming years were some of my most fun memories :)


I started in C++. My alma marta has now moved to Java, which seems to be the current trend. While both are well suited to teaching basics, I think that can be said for almost all programming languages.

However in C++, you gain a better understand of low level data structures and concepts like passing by value versus reference. It certainly isn't impossible to teach these concepts in Java, but I think C++'s approach of allowing you to shoot yourself in the foot is advantageous for students. I learned alot by doing things incorrectly, and then correcting my code.


Whatever language is used, it needs to be a language in which the "core" concepts of computer science -- particularly algorithms and data structures -- can be tackled with a minimum of fuss. Ideally, this is a language with a minimum of features (or, at least, a language in which intermediate and advanced features need not be utilized by beginners) and a simple syntax.

I've TA'ed intro CS courses before that used Java. Java's a nice language with a great library and some decently nice features, but I found it a bad choice for intro courses. Java's syntax is inelegant and overly verbose, so even doing simple things often takes several lines of code. Moreover, you have to cover a lot of intermediate topics to do anything in the language, or at least do some handwaving in the beginning. For example, since everything in Java happens in a class, you already have to touch on some OOP stuff just to get started. You can gloss over a few questions ("What's a main() method" "What's a class?") at first, but eventually you have to deal with them. All of this subtracts from time spent on actually learning CS concepts.

I'd recommend Python or Scheme as a language for an intro course. Scheme has a simple syntax and allows you to easily address CS concepts with a minimum of fuss; Python allows the same approach, but has a slightly less awkward syntax (although I personally love the regularity of Scheme's syntax) and a better standard library. Python also has a nice REPL that can greatly aid in learning.


Even though I don't use it much, I think Python is a good language for CS 101. It's a clean, object oriented, imperative language; it's got well-designed standard libraries; everything you need to introduce people to programming.

I'd leave C and assembly for CS 102. People who already have a handle on the programming thing can skip the Python course; it's important for programmers to learn what goes on down at the bottom, but basic programming concepts are a prerequisite to that -- you don't want to try to teach them both at once.

Then, functional languages (i.e., one Lisp-style and one ML-style) and intermediate computer science concepts could constitute CS 103...


We were taught Pascal, but we were expected to already know C for the Operating Systems course. Luckily, I taught myself C & Pascal before starting college.


Ruby would be a nice language to start coding in.


I started with Fortran. Using punched cards. In 1966.

Today, I'd prefer starting in C or C++. These languages work well for teaching algorithms and data structures. C++ also is a good choice to teach basic concepts of object oriented programming. Once you know them, learning a lot of other languages such as C#, Java, etc.. is a lot simpler.

Languages such as Lisp, Haskell, or F# should be used to teach advanced programming only. Functional programming is a little too intimidating for beginning programmers.

To teach scripting languages, use Python. For total beginners, Python is a lot easier to learn than many of the alternatives.


I took two such courses and they taught Java and C++.

I'd prefer C to C++ because it has a slightly easier syntax and you don't have to wrestle with the compiler. People taking the C++ course spent most of their time on resolving linker issues with code the compiler compiled without any warnings. Thinking about this, I come to the conclusion that Java might be the better choice, after all.

While I do agree with @Marko, I have to point out that such a course would be useless without teaching a particular programming language in parallel; people need the hands-on approach.


I'm finishing up my degree now and all core courses were in c++. I'm glad they were as it prepared me for what most lanugages could throw at me and made learning java, and c# very easy... As for overwhelming them goes - well maybe the language should and weed out the students that don't really want to learn... ps I have a friend that learned on Java and is now using c++ at work and wished he'd learned it in school!


I would be very interested to see two very different compatible languages used together, say Java and Clojure. If you want to emphasize that algorithms don't change between general-purpose languages, and yet different languages are appropriate for different jobs, that would be a good way to start.


I recommend Java or C#. In an introductory course, students need a language where they can focus on core concepts and problem solving, rather than syntax.

As an undergrad in engineering, all engineering students took an introductory programming course which used Pascal

As I was a grad student, I was a teaching assistant for Engineers who were learning C++. I think it was a horrible burden to inflict on poor unsuspecting engineering students, many of whom were taking degrees in mechanical engineering, civil engineering and the like. As a teaching assistant, I observed that about 10% of the students 'got it' right away and breezed through the course, and about 10% of the students still had trouble understanding the difference between a variable declaration and a function declaration halfway through the course. I don't think they got a lot out of the course.


They taught Java in my intro to computer science class. I never enjoyed java, and once I learned C++ I felt that learning java in the intro class was a joke.

I would whole-heartily suggest C++ as an intro programing language, at least you can write a program from scratch on day 2 of the class. With Java, the class was mostly altering pre-written code to fit the lab exercises. Terrible idea!


None specifically but as many as possible, ideally with as different a set of characteristics as possible. It almost doesn't matter whether it's C++, Haskell, D, F#, C, C#, Ruby, Perl, PHP, BASIC or whatever - do them all.

Understand the concepts and the languages will follow.

Are you learning languages in university to understand Computer Science or to get a job? C++ is a great place to start, but C# or JAVA would be useful to get a real life programming job.

So in a university, C++ and YACC.


I was taught C++, Assembly, and Java. One class taught LISP.

I actually think this was a really good mix in terms of curriculum. I expect in the coming years you will see Ruby make inroads where Pascal, LISP, and Ada came in. I'd also love to see F# make an appearance in CS curriculum.

I think its important that C, C++, and Assembly stay in the curriculum. A lot of programmers don't have a fundamental understanding of performance/memory consumption because of being spoiled by Java and C#. At least one course should cover unmanaged code IMO.


I'm currently taking an introductory course to programming, and we use Java. Personally i think its a joke, going right at OOP without the basics is just stupid. Sure, you get a running start but in the long run it would be best to start with C.


I would avoid C and C++ and any other language with manual memory management or languages which require pointers for a lot of data structures. I'd focus on teaching the concepts of programmer first and I think having to deal with memory management and pointers hinders this. Yes, I would aim to introduce both of these, but not until the student is pretty good at programming in a garbage collected pointer-free language. Also, C++ is far from a beginner language. There are too many things left undefined or simply hard to understand that would only confuse the student programmer, or worse: give them bad habits.

I would also avoid Java for a number of reasons. Firstly, a simple hello world program in Java introduces too many features which need to be ignored (classes, public, static, void, String, arguments, System package etc) which can be a little confusing and secondly, while I find OO to be both useful and beginner friendly, I do not believe that forcing everything to be OO is a good idea, especially if all you are trying to do is teach simple statements.

I quite like the simplicity and power of Scheme and personally, I quite like the syntax too, however, I probably wouldn't use Scheme to teach beginners, since I think it's important to teach a somewhat mainstream language to encourage the students to build programs for themselves and others in their own time.

Having said all that, I would probably choose Python because:

  • It has an easy to understand (and IMHO clean) syntax
  • It has an interactive interpreter, an excellent learning tool!
  • Simple programs are simple, complex programs are possible (and IMHO often simpler than in C++ or Java)
  • It supports OO and some functional programming techniques
  • Its a real world programming language which is in common (common enough) use
  • Theres a large online community, wealth of articles, tutorials, books etc

After they have learnt basic programming, algorithms, OO, basics of functional programming, data structures and generally have a good enough grasp of programming to complete reasonably large assignments on their own, I'd probably introduce them to C or C++, perhaps allowing them to write Python extensions, though probably not.

I would also introduce them to assembly language. Preferably concurrently (in a computer architecture course) alongside C/C++ or even alongside Python.


Djikstra wrote an excellent article called "On the cruelty of really teaching computing science " in which he argues that introductory courses should teach a language for which no implementation exists (but please read the paper as that's by far not the only interesting point and Djikstra presents those points them much better than I could ever present them).

It seems to boils down to "teach a low-level language so they learn the gritty details" vs. "learn a high-level language so they learn the pure concepts" (*). While I think both are equally valid goals for a CS degree, I have a feeling that it's easier to learn the gritty details once you wrapped your head around the pure concepts than doing it the other way around.

(*) plus the usual which-lanuage-is-the-best within both of these camps


We used ADA. It was a pretty simple language, which helped. The best part was that it was already pretty pseudocode-like, so we were really taught the concept a lot more than the method.


This might be an odd suggestion, but it seems like shell scripting would introduce students to some programming concepts without overwhelming, while also giving them a very valuable tool.


I learned C++. I think choice of starting language is dependent on whether the person wants to be an academic programmer or a business programmer. Starting with C++ is a nice idea in that it helps give programmers an understanding of pointers. A lot of that stuff may be hidden behind the scenes, but it's a good idea for users of APIs and the like to know about things like references and pointers. That said, C++ might be easier to learn after first learning Python.


C++ aka "C With Classes" was what I was started on.

It's a perennial topic of rumination a friend and I go over.

What is the essential complexity of programming, and what language syntax provides the least additional complexity?

There is a certain complexity to programming, in the abstract. Creating a given process, altering it to meet the needs of the given system, plugging it into another process. That is the essential complexity. But, this complexity has to fit into the complexity of a specific language, with its(usually somewhat irregular and crufty) syntax, semantics, libraries, and compiler(neglecting any OS variants like making students use Unix).

My experience teaching suggests that syntax is a huge hurdle for students, and problem solving is an even bigger hurdle. Students who can't make that first syntactical jump are prohibited for being able to do the second jump, due to the nature of actually needing to implement a solution to a problem. (who'da thunk!)

I argue for Scheme as an introduction to programming, due to the minimal syntactical complexity.

For a more pragmatic approach, Java is good, because it is a fairly regular language with good compiler/runtime errors.

For a more "let's get stuff done" approach, C# is good, because it easily interfaces with Windows(although I would not prefer to teach C# and Forms to newbies in 3 months).

For a introduction to the machine, C(not C++) is good.

I would suggest that curricula that don't incorporate C/C++ as the standard language need to have a strong architectural course in the lower division to teach them the machine(Make them write in ASM!)


In our intro course, we now use Python for the programming component. The nice thing about Python (besides being very nice as a first language) is that in later courses, where we teach Java, you can switch easily from Python to Jython and basically integrate the two languages.

Your first programming language should "stay out of the way" as much as possible, and not require you to write many lines of code just to get a framework in which to express your algorithm. For example, C, C++, C# and Java all have basic requirements that force you to write several lines (includes/imports, the main method, curly braces) before you can actually write code. While this is no problem to those who've programmed before, it's quite a hurdle to the very beginning programmer.

The big learning curve in intro programming is NOT the language, it is the mental shift required to express problem solutions as algorithms, and algorithms in terms that can be programmed.

My first programming exercise used to be a simple average of 3 numbers (say 3, 6, 8). But rather than write a program, I had students find the algorithm/solve the problem with pencil and paper. Getting students to think in algorithmic terms is the first step.



I was taught Modula-2 in my Computer Science degree, which I hated at the time but in hindsight think was fine.

What should people use? I would suggest that it shouldn't be anything too high level -- they hide the details that you really need to understand if you're doing a Computer Science degree. Python and Ruby and C# are all great for using in Real Life but they don't really let you see what's going on "under the hood."


Assembly. Everyone should have an basic understanding of how the code is dependent on the hardware.


I started in C++, and that's what I would suggest.

However, there are some downsides that make me consider starting in C instead. For example, we started all of our programs with "#include " and "using namespace std" without having any idea what those lines of code did. (From my perspective, starting in Java compounds this problem 50-fold -- why does main() have to be in its own class? and what the heck is a class anyway?)

Further, starting in O-O counter-intuitively makes it harder to understand what o-o means, because you don't have a baseline from which to compare.

Still, despite those downsides, I'm glad that I started in C++, and now I'm glad that I use it every day.

ps. Do people really equate learning C with learning assembly?? If so, people wasted a lot time writing C compilers....


First, two very important questions:

Is Computer Science the right course of study for prospective software developers?

I believe the answer to this question to be no.

I'm not convinced that an "engineering" discipline is the right track either, but certainly most CS grads are ill-prepared for industry and the time they spend in college is largely spent learning the wrong things.

Which is better for prospective software developers: a college degree or a trade-school degree?

Personally, I believe that a college education is far more worthwhile, even though colleges are ill-serving prospective developers (hands on experience at any level would be vastly superior to any sort of trade-school type developer degree).

Ironically, people are working very hard to make the CS degree even less worthwhile for developers. Rather than create a new course of study which educated students in software development fundamentals and theory (to be distinguished from computer science theory), colleges have been working very hard to lower their graduation standards and morph their programs into little more than trade-schools which turn out blub-programmers.

Finally, the most important question:

When fresh out of college, is it better to know a "marketable" language or to know the fundamentals well?

I'd say knowing the fundamentals will almost always serve you better long term. Though there's still the bootstrapping problem. You almost certainly want to have marketable skills right out of college. However, there's a question of whether it makes sense for a college degree program to impose upon all of its students a particular marketable skill. I would argue that this is the responsibility of the student and not the responsibility of the college, except in the case of a trade-school.

This leads to the natural conclusion that the programming languages taught in colleges should be those which best facilitated understanding fundamentals of computer science or software development, rather than marketability or practicality. I propose this set of languages:

  • Assembly (for any processor, or even pseudo-assembly for a virtual processor)
  • Lisp (or some other simple, functional language)
  • Any good object oriented language (even smalltalk)

As long as the student learns what a pointer is and how to approach problems mathematically the language doesn't matter much. Those two fundamentals are very important basic steps. Even in languages where pointers are GC'ed you still need to understand them.

Of course you should learn control statements and loops, but that's in almost every language.


I'd go with Pascal. Effectively the same as C, but with less syntactic gotcha's, which will ensure a higher percentage of the time will be spent on the assignment, avoiding people not completing assignments because of problems introduced due to syntax.

For math or CS majors, Modula2 would even be better (they ought to be able to manage the stronger typing conceptually), but I don't know if there is a decent enough compiler nowadays.

I'd avoid object orientation in a first class. It confuses the hell out of them, partially also because an initial program requires more principles to explained for the initial program (why is that "xxx" there?... euh, you just have to take that granted for now), partially because the program is often fragmented more, and harder to follow for total programming virgins. (and those set the pace!)

Also pick your compiler/IDE on simplificity. If you must do GUI programs, avoid systems that require more complex concepts as separate listener creation etc.

It can be worthwhile to cut down an open source IDE and runtime library so only the relevant (simplified) libraries are exposed. This will also avoid students playing hours in class with the designer and dolling up the interface unnecessarily (making verifying the assignments harder)


Pai H. Chou would recommend Python: http://www.ece.uci.edu/~chou/py02/python.html

On the successful side of the story, most students appeared receptive to Python, and most of the 35-40 students from each class were able to successfully complete the programming assignments without much difficulty. At least one student became a Python fan [...]

Not all students had a smooth experience with Python, though [...] [problem A] [...] [problem B, leading up to:] This was not really a problem with Python, and in fact it is motivating us to introduce Python earlier in the curriculum.

My own take:

There's very little friction or overhead. No public static void main, just print "hello, world". There's read syntax for your most common data structures (lists, sets, hash maps), and you can easily represent more complex data structures as primitives which have read syntax (see the link). Also, you can teach both imperative, object-oriented and functional programming with python (though it may not excel at the latter), so it's very versatile.

It's also a very handy tool to know for your day-to-day programming tasks where shell scripts are insufficient.


I would suggest C#.

Young potential programmers aren't interested in making console applications, which is pretty much all they'd make for a while if they started with Python or C++. C# makes it easier to write "cool" apps right away. I think it's important to get students interested in programming before trying to teach them the drier fundamentals.


In college (late 90's), first programming course was in Pascal. Then when I switched majors to CIS (computer information systems) it was lots of C++, which weeded out about the class, then C, which weeded out half of the remaining class. VB was offered as an elective.

I don't believe which language matters as much as the teacher. If the teacher can't help someone grasp the basic concepts, then that student will be lost, discouraged and end up losing interest.

Not everyone is able to just grab a book and be able to learn a new complex concept without some instruction. Even those that have that ability to learn on their own are usually not sure where to start.


In high school I was taught Java, but here at my college it's Python.


I agree with Marko, but there needs to be some implementation language and it doesn't matter what it is. However, the class should be taught using pseudocode and the labs should be taught using any language the instructor wants to use.


In high school, it was WATCOM Basic. This was useful in that it simplified a few things, e.g. variables were mostly integers or strings and there were some array functionality.

In university, first year was spent in Pascal on a Mac if you used the labs with Turbo Pascal on a home PC also being accepted for answers. Second year was Modula-3 which seems to be rarely used these days.

As far as what language should be taught, I think it depends a little on what kind of depth you wish to give the users. If someone wants very basic programming then a language like Pascal or BASIC should be fine in doing fairly simple things and not allow someone to shoot themselves in the foot. At the same time, if one wants to go for something deeper then C/C++ may be better in terms of doing more with pointers and what may appear to be odd syntax for some.


As many people here say, C# is a great starter. It doesn't have the same pitfalls as C++, and motivates people to create own projects with the easy to use UI designer.

When the basics of programming have stuck in the student's brain C++ would be a good second language for learning the importance of proper resource management.


In highschool the first course that was taken was for QBasic and then they moved on to Visual Basic 6.0. For highschool students I'd say that was okay.

For an introductory college level class for computer science I would say that Java or C# would be the best choice. Since its introductory, some students will have a hard time 'getting' it and confusing the matter with memory allocation won't do anyone any good. Basic just doesn't give you enough to understand the actual concepts that are in most 'modern' languages either.

After the class has 'mastered' the basics of Java or C#, then I think they would be able to move on to other languages such as C or C++.

I really don't think Scheme is a very good introductory language at all. From what I've seen, it has little to no understandable structure at all, at least for someone new to programming all together. A language full of parenthesis' is a sure fire way scare scare a new programming away. Even Java has confused people with them!


When I was in college we had to chisel our programs out onto stone cards that fed into...

Oh, no, not quite that bad. I was doing a dual-major in Math/Comp Sci at University of Pittsburgh in the late 80's and we used Pascal. It was everywhere back then. (Ever tried to find a Delphi programmer today? Ha!)

The reason it was chosen is probably the same criteria that are used today, which is why Java and C# are going to be so popular now. It was the clearest representation of the state of the art of programming techniques and methodologies of the time.

I think that is the standard by which any language should be chosen. Everyone has their own favorite, but that is a different question than which one should be used to teach programming. My favorite language is the one I prefer to use to solve problems. In learning/teaching programming you aren't trying to solve problems; you are trying to communicate concepts. The language that allows you the most flexibility in teaching common concepts is the one that is best.

But this also presupposes that you only need one language. I would think that with the plethora of development methodologies and approaches available today that only using one language would be pretty limiting.

That being said, I would probably pick Python. I say that because its really easy to get past the syntax and it interfaces with everything else there is out there. It would be really easy to move to almost any other language from Python.


When I learned, it was load-and-go Fortran 2 for the IBM 1620, and it was sink or swim.

I have taught CS101 in college, using Basic and Pascal. It really helps if it's kind of a nanny-language. Maybe Java is the current equivalent.

If you start students in C or C++ you have headaches over pointer arithmetic and that kind of stuff when they barely know the difference between A and "A".

I really wish instructors would soft-pedal the religious aspects of C.S. I mean, OOP and functional programming are good things to know, but they're not the Second Coming. It's amazing how rigid young programmers are in their "beliefs".


Eiffel is the first one they taught me once I got into actual CS. Fully object oriented. great learning tool.

Over the 3 years course, there was C, Java, SQL, SML, assembly...


I first self-learned programming with TI-57 (Texas Instrument programmable calculator), which was a kind of assembly language with unsurprisingly good features for number crunching...
I also learned Basic myself. Not that I would recommend it, despite its name. Even less 8bit Basics of the time.

I first followed electronics courses, so I learned assembly language (6800 processors) and automaton coding.

When taking computer science course at university, I think they first taught Pascal, it was THE learning language of the time... Now, it is probably Java.

What I would advise for teaching? I always thought Lua would be a very good language to start with: simple, readable syntax, yet lot of power and some advanced concepts, plus you can see procedural, functional and OO concepts with it.

Otherwise, something like Processing could be nice to start with (or to continue) as it has the feel of interpreted languages (click Run and get a result) and it allows to get quickly a nice, visual result. It is, actually, using Java, but hiding some of its complexities (using main, spawning frames, double buffering strategy, etc.).


We started out with C++ and stuck with that for the first few programming classes in the CS track. We later learned Perl in a required class, but only worked with it briefly. The class that teaches you Java is not required, so you can get your B.S. without ever having touched Java. I took a web programming class and we worked with JSP, PHP, Javascript, etc. I think this semester they introduced Ruby on Rails to that class.

I think starting with C++ was fine since it goes along with learning about the hardware and memory, but I hate writing in it. I think it should be required to touch on Java or another fully object oriented language before graduating.


Whatever the first language is - Scheme, C, Java, whatever, they're all fine choices - there should be a different one used for the second course, of a different paradigm. It's vital that students learn early that learning a new language is NOT that big of a deal, and that they should do it as often as possible. And being exposed to different paradigms will make them better programmers


If they're taking their first programming class and they do not have previous experience, then they should quickly jump in and see if they can handle it. A lot of people left my program because it didn't click. Luckily we were taught Java in our first two terms so they had plenty of time to switch majors.


At my university, our Intro to Programming class is taught in Java. It used to be in C++. The reason that it was changed to Java was because it is a class that is meant not only for CS majors. It's also there for Engineers, who need to take it. The other course that non-CS students need to take is also taught in Java. I believe this was done to simplify the curriculum for students who probably won't ever use the stuff ever again, and to get rid of pointers. Teach the fundamentals, and some java specific stuff, and the intro students are fairly well set.

The first real CS class goes over C a little bit, and dives into MIPS R2000.

I never took the intro course at college though, and my first language was QBASIC back in High school, followed by Visual Basic (not .net), C++, then Java. It worked pretty well for me.


We started with the Oberon language at our university.

I think it is best to start with C++ and provide only the basics,
this makes it easier to extend the knowledge later on without having to switch language.

Once C++ is known it isn't hard to learn a new language.
If you are good you can learn the basics of a new language in some hours.

Starting with C or a simple language with limited features looks like a bad idea.
(This will make more advanced languages look more hard)


I went into university having learned BASIC in high school. In my first semester, I learned a language called PL/1 (an IBM creation that was supposed to combine the best of FORTRAN and COBOL into one language), because this was the language that most of the first year classes would be using. Simultaneously, I was learning Pascal for another one of my classes. (You try picking up two similar but different languages at the same time sometime. :-) ) In my second semester, I got bold and learned APL, because of how easily you could get it to do things with arrays. (This was back in the days before OO languages came along. And I never even heard of C until I began using it in 3rd year. I did some assembler in a 2nd year hardware course and had to learn LISP for a 3rd year course.)

Looking back on all of this and including the languages that I've picked up since (C++, Python), I would have to say that first year students should be taught C as their first language so that they can use it to learn the basic concepts (pointers, data structures, etc.) and then learn an OO language such as Python or C# that enforces good OO practices. (In C++, it's too easy to fall back on procedural programming techniques.) Also, students should have to learn at a language from at least one or two different paradigms than that of the more mainstream languages (APL and LISP come to mind right away) so as to keep them from getting locked into just one set of concepts. (For example, when working with arrays in C/C++, quite often, I try to think of how I would do it in APL and, IMHO, often end up with a better implementation as a result.)

Someone else said in their post that students should be taught languages such as Java and other mainstream languages so they can work in the real world. (In other words, they should be taught how to do what's done in the real world.) That's not the job of a university; that's what tech schools, trade schools, etc. are for. A university's job is to teach students the whys and wherefors of their chosen field so that they are better prepared to learn the how-tos for themselves. (I once heard a saying that states that a {substitute your non-university post secondary type of school here} teaches you how to do it, whereas a university teaches you how to learn how to do it.) And with the fast pace of change in today's high tech world, a person who can easily cope with those changes on their own or with minimal tutelage is a lot more valuable in the long run than someone who always has to go back to school to learn a new version of the same stuff they learned before.


Mine was Pascal.

More important than a first language is that students should learn the programming languages by themselves.

IMHO CS 101 should be tought in pseudocode and mathematical specs.


It was Pascal (UCB Pascal) and I just missed having to do Algol on punched cards (I started college in 1981).

It was a good foundation and worked for compiler writing and some other classes. But I quickly learned C-Shell and C and put those to work.

After I learned C and C-Shell, everything I did from then on out was built on these two.

I agree with those around here who make the case that C should be the foundation for everyone going forward.


Honestly, it shouldn't matter. I think the root of this question is "how can you teach fundamental Computer Science concepts to first year students". Languages come and go (with the exception of COBOL, har har), but it is the concepts behind the languages that matters most.

Using this definition, the question is "What language best illustrates fundamental Computer Science concepts?". Personally I've found that procedural languages, such as C or ADA, to work the best. Using an Object-Oriented or Functional language forces the students to learn the concepts of Computer Science at the same time as the concepts of the given language (be it Object-Orientation or what have you).

I've found the simplicity of procedural languages very helpful when teaching at an introductory level.


The one that I was started with - Java.

The one that they use now is Java and/or Python.

Before I tell you my choice, I'll tell you my observations. So a bunch of these students, who only did Java with OOP, they did ok in their first 2 years. Usually out of laziness and requirements, the first 3rd year course they take would be Operating Systems 1. And they smack themselves right into a brick wall because OS 1 requires them to use C calls, and they understand NOTHING about pointers, or C-style strings, or stack/heap space, or stack frames.

I recall helping this poor girl debugging his assignment, which was a simplistic multithreaded app (that I've also written whne I took OS1). She was having problems because if the input string was 16 character or less, the program "ran fine", but anything more, it would give this mysterious "Segmentation Fault". It should be obvious to many here that someone's probably writing a char* pointing to nowhere...

OOP isn't too hard of a concept to understand. I started programming before I've heard of this OOP stuff, and mentally it wasn't hard. As an observer, I noticed that people tend to have problems when they go from a language where everything's a reference to a language that has pointers.

Or maybe that's just the failing of the education system where they can't seem to be able to make people understand it.

I'd start them on C, or C++, and I'm quite sadistic, so I'd want them to have an assembly primer that explained stack frames, and linking. I had an incredible lecturer who actually taught us about that, but not many actually understood it.


I had Fortran for my introductory language, as late as 1979. Today, I think Java would be a good language, because you can learn algorithms, data structures, and throw in a little OO near the end. Brian


First language they taught me in uni = Java

First language they taught me in highschool was technically VB, but it was really just "copy this printout and run it" so I didn't learn a thing. Then they taught me C++

I think C or C++ is the better choice. It's probably better to work from a lower level language to a higher language if your students can handle it... will make them really appreciate everything the language does for them and give them a better understanding of how it all works behind the scenes. Plus, there are way too many Java-only students in my university.


I learned Java in my high school Computer Science course, and I think nicely introduced the nature and structure of programming. Still, when I think back to how I taught myself basic Perl in seventh grade, and how I relished the immediate ability to do incredible things, it makes me wish that more schools used Perl, Python, or Ruby when first exposing students to programming. Sometimes inspiration is the most important component of education.


I thinks it's important to start with something where it's easy to get good results very quickly - Pascal is easy to understand but you won't see anyone who would build up a real-world programm with that - maybe Python, Ruby or Java are good things to get started... within 5th grade we learned Logo which was quite nice too ;)


Java is used for the AP Computer Science curriculum in high schools. It's a good approach to OOP and a good place to start. The difficulty of creating GUI applications is its major weakness. Many high school students are visual learners and want to SEE something that they made other than text.


If it's not specifically chosen programmers but general students who might find interest in programming, maybe Small Basic would be a neat starting point. The IDE is very simple to use so you can get started without much overhead.


I'd say C to learn about pointers. Even thought it's not used a lot by most of programmers, it's a solid base that everyone should have.

Then move on to C++ or Java to get OOP notions.


Python - because it's an easy-to-learn language with little syntactic overhead, but at the same time it is very powerful, relevant, and useful with tons of libraries. It is also a terrific multi-paradigm language.

I can also understand the arguments for C or Lisp. Java has way too much mental overhead and is way too "enterprisey" for an intro programming course.


Really doesn't matter what specific language you start with, what matters is learning the process required to write programs. The logic involved. This is definetly a "walk before you run" scenario. Learn how to read code and you will in time become a better coder. Whether you use C, C++, C#, VB has no real bearing on how good a programer you will be. It's all about the syntax.


I didn't see my answer here, but my thinking is that you should either be taught a very high-level, but usable language like Python first, or you should learn the "portable assembly language" known as C.

If it's to weed-out folks who can't think in multiple levels of abstraction simultaneously, and won't ever "get" pointers, then go for C.

If it's to introduce people to programming concepts, and make sure it's really really hard to shoot yourself in the foot, then use Python.

I don't know which is the better route - but I am convinced that starting with an "intermediate" language like Java is bad because sometimes the language does stuff for you, and sometimes it doesn't - it depends on the particular library you're using at the time, and what you're doing with it.

Being able to sit down and just Start Doing Something is a blast - it's what I loved about BASIC way back when I started.

On the other hand, if you're going to go past CS 101 into a full-fledged CS degree, you're going to need to know the deeper issues, and C (or C++) is the perfect tool for that, in my mind.


Functional languages are inherently different from procedural languages, and I think both should be taught at an early phase. However, most computer languages in use currently are procedural rather than functional, so I don't know if teaching a functional language as a first language is really a service or not. It probably doesn't matter as long as the person gets exposed to both at an early phase.

Because of the rarity of functional languages, perhaps the advocates of this approach feel that this way everyone will get at least some exposure to a functional language.



It has objects, pointers, templates and forces one to think about memory management. After that one can move to any language and hopefully become language agnostic.

In my CS studies, the only taught language was C++ and on more advanced classes it was expected that you can do an assignment in Java, Python, SmallTalk, PHP etc. What ever language fits the course subject.

I believe teaching the basics of programming (data structures etc.) with C++ is like how art students are taught to draw naked people with a stick of coal. The skill itself is not marketable but the deeper understanding it gives is important.


Hitting this one very late, but you really shouldn't be focusing on teaching a language at all; you should focus on programming.

Variables, conditionals, loops, function calls, recursion.

Probably classes and OOP, followed with linked lists.

Possibly memory management and garbage collection, although I think that should be skipped for non-CS majors. Same with pointer arithmetic.

If they learn the concepts, all languages will work for them. If they learn the implementation and focus on the language, their later learning will be harder.


Personally I think that as long as its an OO language, then that would suffice. However, I'm a big .NET advocate and so I would say C#. That was my first language taught and that was in 2003!


If you look at current spectrum of languages the most innovative and evolved+evolving language which does not have a big initial learner cost has got to be C#.

C# is 'the' language I now wish, I was taught in my school.

Update: C# is innovative in that it makes static typing a first class objective, then goes on to allow dyanamic typing (C# 4.0), extension methods, anonymous typing and whole lot of C# 3.0 goodies that make it more closer to dynamic languages.

Because .Net is such a capable and huge platform, starting off with C# might be just what one needs in school to begin with.

Also I don't know too much about Python, but IronPython on DLR would be promising.

Ofcourse this is my opinion. Others may think differently.


None. They should have learned to program in high school.