views:

1493

answers:

27

Edit by OA: After reading some answers I'll just update the question a little. At first I put it a little bluntly, but some of those gave me some good arguments which have to be taken into consideration while making a stand on this one. (these are mostly picked up from comments and answers below).

A few things to take into account:

  • to many pupils this is a first programming language - at this stage most of them have trouble grasping a difference between data types, variable passing, ... and whatnot, less alone pointers and similar 'low level stuff' :)
  • they will all have to pass this to get into next grade (well, big majority of them anyway)
  • not all of them have computers at home, not all of them are willing to learn this, less alone interested in - so the concepts have to be taught on a finite time scale in school hours (as well as practice on computers)
  • free literature is a bonus - the teacher will make some scripts and handaways, but still ... I wouldn't like to bear the parents with the burden of buying expensive literature (also, english is not a native language here ... and although they are all learning it, their ability to read it fluently is somewhat questionable)
  • somebody gave an argument - "a language which does not get in the way of ideas" - good one
  • accessibility on different platforms in not expecially important at this point - although most of the suggested ones are available on win as well as linux - not many macs in this part of europe (their prices are sky high for anything but specialised usage)
  • I will check what are the licencing issues on ms express editions about using it massively in high schools for purposes like this - if someone has any info about this, please, do not be shy with it :)


A friend of mine, informatics teacher - in EU it comes as something as junior cs teacher, in a local high school asked me what I thought about what should be the first language pupils should be taught? It is a technical school (a little more oriented towards mathematics than the gymnasium, but not computer oriented totally).

So I'm asking you - what do you think should be the first language pupils are exposed to in highschool?

They have been teaching Pascal so far, but she's not sure that's a good course. She thought about switching to C (which I resented; considering not all pupils have interests in programming, to start with, and should be taught something higher level since they are just gripping the idea of a loop and such ... for a start), I suggested python or ruby (preferably py since it handles all paradigms).

What is your opinion on this one?

I looked, but didn't find a similar question on SO, so if there is one, please just point me towards it.

Edit: The assumption is that none of the pupils have been exposed to any programming in junior school.


See also:

What is the best way to teach young kids some basic programming concepts?

Best ways to teach a beginner to program

How and when do you teach a kid to code

What is the easiest language to start with?

High School Programming

+44  A: 

Python for sure. It's logical and has ridiculously clean and easy to learn syntax. Check out Dive Into Python, a free e-book on the language.

The language forces good code structure early as it's required by the language. This will translate when if/when the students pick up other languages.

ryeguy
And it's named after a frikkin' snake man!
EBGreen
@EBGreen - Uhmm, no, not really.
ldigas
@EBGreen - I'm not sure whether you were joking about that one (didn't see no smileys), but it's named after Monty Python - you know, the english lunatics :)
ldigas
That is correct, but what high school kid today will know who Monty Python is. Just focus on the snake.
EBGreen
@EBGreen - hahahaha, yes, maybe you have a point there :)
ldigas
Python is descended from a language called ABC, which was designed as a teaching languge. Language features inherited from ABC are a part of what makes Python easy to learn.
ConcernedOfTunbridgeWells
Python teaches all the basics and then some...including proper formatting (the right way)
meade
@EBGreen - As a former high-schooler (a year ago), a damn lot of them know who Monty Python are.
Chris Lutz
That makes me feel better.
EBGreen
Have them come over to my house and explain the humor to my wife, she doesn't get it...
Dining Philanderer
Why not Scheme? It has similar characteristics.
Paul Nathan
What are you talking about? Scheme's syntax is illegible to someone who doesn't have experience with programming. Even simple things like addition (+ 2 2) aren't clear.
ryeguy
If you think Scheme is a good answer, then perhaps you should post that as an answer along with some reasons why.
EBGreen
I agree that the python syntax is great for learning, but it's really the command line that makes it a win. >>> help(sys)
TokenMacGuy
Totally agree; coming from a guy who learned BASIC as a small child, and then C as my first "real" language in my teenage years. Python is definitely a great first language, but also not too limited to cease being interesting.
Nik Reiman
Teaching Scheme as a first language might be alright.... If the whole class is made up of mathematicians.
Stefan Thyberg
Dive into Python is not a first-language book.
FarmBoy
Agreed that Dive into Python isn't a good introductory book--you might want to check out Think Python ([http://www.greenteapress.com/thinkpython/thinkpython.pdf]).
eman
+12  A: 

This is sort of the trendy answer to this question right now, but really I think it is the correct answer to this question.

Teach Python.

It's free, there's a very low friction point (IE easy things are easy), and it ramps up very nicely into some very powerful programming concepts.

It also has what I consider to be the best tutorial ever written for how to get started in a programming language.

Ryan
+5  A: 

http://stackoverflow.com/questions/tagged/which-language

Ruby is my answer though (pure OO + functional goodness + clean syntax). Python would be fine too. Just not anything with legacy crap or thought-limiting (as in Sapir Whorf) so no VB or C++

Please, could you elaborate a little more what you mean under "thought-limiting" ?
ldigas
Courtesy of Wikipedia, a simplified version of the Sapir-Whorf hypothesis: "a particular language's nature influences the habitual thought of its speakers." IOW, you learn a WTF language, you start thinking in anti-patterns, just to "get stuff done" across the hurdles the language poses.
Piskvor
Yeah, basically. By thought-limiting I mean a language that, in an effort to be small and easy to learn, shunts basic features that make various problems easier to express in an intelligent fashion (thus presenting programming as toil). Think pointers, classes, high-order functions, continuations...
+7  A: 

Let them have some fun - introduce them to Scratch!

Edit: To down voters, if you have something against Scratch, it might be nice to inform us exactly what you don't like!

Edit: Reasons for liking Scratch & thinking that schoolkids will like it too:

  • you produce interesting applications very quickly
  • you can share them with your friends via the Scratch website
  • the graphical programming language is fun to use
  • it teaches you about event-driven programming
  • producing something complicated involves some lateral thinking
  • the guys at MIT presumably know what they are doing when it comes to education
anon
Well, what *do* you like?
EBGreen
@EBGreen: That's very helpful :-(
Kai
@EBGreen well, I like Scratch obviously - your point is ... what?
anon
My point is simply that you explained what is good about scratch only marginally more than the down voters explained why they down voted.
EBGreen
I think Scratch looks good for teaching younger kids, but I think by High School the students should be able to work with a more traditional language and should be doing so since that is what they will most likely be dealing with if they continue in programming.
EBGreen
"the guys at MIT presumably know what they are doing when it comes to education" - My understanding of the Lifelong Kindergarten group at MIT is that they are focused on increasing the ability of children to express themselves. I think Scratch is focused on this rather than teaching programming.
EBGreen
Note that I think this is a great thing. I just don't think it is the right thing for teaching programming to high school students.
EBGreen
@ebgreen well, to quote the OP "to many pupils this is a first programming language" IMHO, anything that gets kids over the initial hump is a good thing.
anon
I think that Scratch is targeted at a younger audience than the OP has in mind, but MAN I would have loved that when I was a kid!! So I voted up your answer, but maybe for the wrong reason.
Chris Lawlor
+1  A: 

This has been a long running debate. I believe Python is an awesome choice, but others will even start out by saying C and C++. One friend of mine believed that the first language everyone should learn should be Assembly in one form or another! VB I believe teaches too many bad practices. C# I have found to be an extremely pleasant experience that can prepare a student for the development world. In the end though, my love goes to Python for being powerful, flexible, extensible and just amazing (especially from a beginners point of view).

Terry
Assembly-good god, no! I may have forgot to mention, but I suggested staying clear of any language that introduces pointers at that stage (so no C family). VB is not too good, I suggest but sometimes the "visuality" keeps the pupils interested. Python - well, I stated my point about that.
ldigas
No to mention it is an interpreted language, so it gets them over that.
ldigas
Assembly was stated showing that some people actually consider a programmer to learn the in's and out's of why code works, instead of it just does. It was for a chuckle, in good spirit of course.
Terry
Now that I think of it, think I got started with shell scripts and batch files. Hmm.
Terry
Anon
+1  A: 

I started out being taught pascal, then vb, then c++, then vb again.

I'd probably recommend getting an express edition of visual studio and picking up vb.net.

GordonB
I thought about vb, but there are also licencing issues to consider. For that I may have to get some more info.
ldigas
+6  A: 

I learned Pascal in high school... too many years ago :) I think it's too dead to be useful in an educational setting, especially considering all the free alternatives.

Any student that really wants to get into serious programming should get to C/C++ as fast as possible, but it might be too ambitious for a first language. Pointers and memory allocation can be tough concepts to learn before more basic ones such as data types and the fundamentals of object orientation.

A good first language should have:

  • A relatively easy-to-learn syntax so the focus is on the ideas, not the code
  • As many fundamental object-oriented features as possible (inhertiance, polymorphism, interfaces)
  • Accessibility: free tools, platform
  • Large installed base with lots of free info/tutorials available online

All other things being equal, I would say the biggest concern is to pick a language in which the language itself doesn't get in the way of learning the concepts.

Dave Swersky
This answer is awesome. I kind of disagree with how big a deal it is to get into C/C++, because that depends on what they'll eventually be doing, but the points you make about what is important are great. +1.
Beska
Thanks! I stress C/C++ based on the "if you can make it here, you can make it anywhere" principle. Full disclosure: I don't know C/C++. I should, but I don't ;)
Dave Swersky
"If you can make it here, you can make it anywhere" - that's the best case scenario though. However, a lot of people might (fallaciously) infer from it that the worst case scenario is "if you can't make it here, you can't make it anywhere".
Piskvor
@Piskvor: Agreed. This is exactly why C/C++ should not be a first language, and should not be required in any curriculum throughout high school or university.
Dave Swersky
@Piskvor: I disagree. Maybe it's a bit ambitious for high school. I learned C++ in high school, but it wasn't required. In University, though? Not for a humanities major, certainly, but for a CS major? Heck, I wasn't taught C in University, but was required to turn in assignments in it.
Adam Jaskiewicz
@Piskvor: Sorry, I meant that to be @Dave.
Adam Jaskiewicz
As a first language, C/C++ is a terrible choice: there are too many inconsistencies to maintain C compatibility. A somewhat better choice would be a modern C++ only approach (as in Koenig and Moo's "Accelerated C++"). Both C# and Python are much better choices, mostly because of what they've chosen to leave out. For the OP's purpose, the cross-platform availablity and clean syntax of Python would win out. (I've nothing against C/C++ for serious programming use: it's what I use 90% of the time).
Stephen C. Steel
+1  A: 

Well, (nearly) any language will introduce similar concepts, and assuming the teacher is doing their job, the language won't matter too much. That said, there are some definite advantages (or disadvantages) for some languages, depending on what their goals are.

Everything being equal, I would choose to introduce people to an object oriented language right off the bat. That has definitely been the long term trend, and it would be useful.

I would tend to stay away from C. It's very prevalant in the industry, of course, but it also has a lot of overhead and gotchas that can distract from learning the concepts.

Personally, I would stay away from Python as well...because it sets up a different paradigm for code layout than the great majority of languages. (Arguing for the other side, it encourages good code layout, which is a good thing to teach early.)

Finally, I think it's a good idea to lean towards a strongly typed language. There will be plenty of arguments both for and against this, but I think it's easier to move from strongly typed language to a duck-typed or weakly-typed language, but the reverse is not necessarily true. Also, strongly typed languages enforce some concepts early on that will be important throughout.

I think Java might be a good choice because it seems to hit a happy medium between many of these ideas...it's available everywhere, it's free, strongly typed, object oriented, has a relatively straightforward build process, and has a similar structure to many other languages. Java has plenty of drawbacks of course, but I think it's a good introductory language.

Beska
As I said, the teacher teached pascal so far, so she will also have to learn what's coming next :) I agree about the "static-dynamic" point of view, it is a good habit (but then again, not all of these pupils will be programmers in the future), so whether is is 'that important' is to be
ldigas
seen. About Java I have no opinion - I've never worked in it, or even close to it :) Had no exposure to it whatsoever (if we don't count the morning coffee :)
ldigas
+4  A: 

I'd choose smalltalk with squeak

Kai
A: 

Not Python:

Learning Java is like learning to drive an automatic car, you have do do most of the stuff but the really weird bits are taken care of for you. However, you still have to take a second test to drive a fully manual one.

Learning C/C++ is like learning to drive a manual car, it's hard and you have to think a lot before you get the hang of it.

Learning Python is like learning to ride a bike, nearly everyone can do it and there's not a lot that can go wrong, but it in no way sets you up to drive a car.

Try C#, it's pretty clean, hard to break and you can use it to write web-pages which means even a person who doesn't care about reversing strings etc. can do something fun and show their non-computing friends without being called names!

My problem with Python is mainly a syntactical one, as well as the things you get used to when using such a high-level language.
They just teach Python to first years at my university these days (They used to do Java and C). There are currently a lot of guys in the year below me who are applying for internships over summer and are being turned down simply because their main language is Python.
The problem with learning Python first is that it does not prepare you for the really hard stuff, for example it hides pointers from you, does all the memory-management and garbage collection for you, and even does nice strings that go from the first character forwards and backwards.
Want to reverse a string in Python? Easy, and that's great. But that simply does not prepare you for reversing strings in C (See JoelonSoftware). This makes it very difficult to make the transition from Python to a good mid- or low-level language, because your brain is simply not able to think about things like that. Only yesterday I had to explain about C++ arrays to a second-year CS student who should know, because they simply couldn't understand the concept.
Python is great, don't get me wrong, if you want to write a quick prototype for something you intend to work on for a while and want to see if the idea is feasible, use Python.
If you want to learn programming, that is a different matter.

EDITED (Comments don't allow enough text - figured I'd explain a little better since everyone's -ve voting me)

Ed Woodcock
How is learning to program in Python fundamentally different than the other languages you listed? Sure, you get some stuff "for free", but what's more important: learning general programming techniques (which you can definitely do in Python), or learning language-specific features?
mipadi
Python's OO is nasty and it's syntax is radically different from most mid-level languages. They teach Python at uni to first years now, and they all struggle a lot when they see other languages.And I'm not suggesting that you should learn language specific features, otherwise I would have said C.
Ed Woodcock
Care to elaborate on Python's OO nastiness?
Gregg Lind
Agree with you on "not python" but don't agree with your OO nastiness of Python. Python does have really neat OO features.
bLee
I like C#, but none of your arguments for it aren't also true of Python (clean, hard to break (?), write web pages) And one of your arguments AGAINST Python is that nearly everyone can do it, which is sort of the point.
Chris Lawlor
+1 for Chris, now my post will be shorter :D About the last bit of your answer, "But that simply does not prepare you for reversing strings in C (See JoelonSoftware). This makes it very difficult to make the transition from Python to a good mid- or low-level language...": the first language I learned was Python. The second language I learned was C. The transition was hardly difficult.
Wallacoloo
+11  A: 

Just to add my $0.02 worth about Python:

  • Python was descended from a teaching language (ABC) and inherits many of the features that make it easy to use from that language. It is quite widely used in introductory programming courses and has a strong body of print and online tutorial resources.

  • Good, free python implementations are available for a wide variety of platforms, so students can easily obtain a Python development environment of their own.

  • You can start with simple procedural constructs such as looping without any boilerplate code to confuse the issue. Concepts such as O-O can be introduced later if desired.

  • You can do graphics easily with a variety of toolkits and the code base to do the graphics can be reasonably terse.

  • As an extension of the above, even brief code snippets can do interesting stuff, so you can make exercises or assignments with a bit of a 'wow' factor quite easily. You might even be able to have the class build a simple game (more on this below) as an exercise.

Once when I was in high school I did a 'light cycle' game in BBC BASIC (shows my age) while in the middle of a class. By the end of the period (it took about half an hour or so to write) most of the class had copied it to their computer and were playing it.

Even though the game was very simple, the two-player nature of it made it quite engaging. You might get some engagement from high school kids by designing a simple two player game like the one I did and walking the class through building it themselves. Pygame would do this quite easily; you could probably program a simple game in a few hundred LOC - possibly even less than 100.

ConcernedOfTunbridgeWells
+1  A: 

EDIT: In regards to the OP's edit, I have revised my answer.

Visual Basic. With VB, you can quickly make simple programs that have a very clear output. I think this would help with self-confidence among the students, as quick results are a form of pleasure to most. With this confidence, students have a higher chance of grasping more complex ideas (like pointers and memory) later on.

/EDIT

joe
Joel didn't say "Start with C". He said to learn it, and that if you had too many problems with it you'd likely never be a great programmer.
David Thornley
A: 

I think that Squeak Smalltalk is THE choice, was built for kids :).

Books: http://stephane.ducasse.free.fr/FreeBooks.html.

ClaudioA
A: 

I started out on Pascal, but just as I was graduating HS, they switched to C++. C++ is definitely a better choice than Pascal, but is it something you want to start out on?

I think it should be C. Despite the fact that a potential majority of these kids won't really be heavily into programming, C has all of the things one SHOULD know. I find it counter-intuitive to learn high-level first and work backwards.

wambotron
If I had started in C or C++, I wouldn't be a programmer.
Gregg Lind
@Gregg: got to agree with you there.
Beska
I have to agree with Sea Hag here, while C/C++ isn't for the faint of heart, they really teach you the core concepts of programming, moreso than high level languages. Every programmer should have at least an understanding of C, in my opinion.
robmerica
+3  A: 

Well, if it's just screwing around(ie, it doesn't matter really), I would look at something more fluffy like Logo or Alice. They are designed around children and introducing to program.

If this is serious(ie, it is defined to be important for the children to learn how to program) I'd suggest C, and they would have a required book of K&R.

I've burnt way too much money in college on books to shed a tear for asking high schoolers to buy books.

edit: I taught myself C++ by the time I was 17. C is not too hard for high schoolers.

Paul Nathan
Logo and Alice are more suited for elementary school, IMO.
Adam Jaskiewicz
+3  A: 

I did C++ in high school, because that is what College Board was using for the AP Computer Science test. The year after I took it, they switched to Java. I'm not sure what language they use now. I thought it was a fine language for learning; it teaches you a lot of attention to detail that might be missed in something like Python or Java. All of my introductory courses in college were in Java, but by the time I got to some of the later classes in college, I was already familiar with de-referencing pointers and passing by reference, so I had a much easier time of it. In high school, we weren't expected to work on the programming assignments outside of class, so it was a much lower-stress environment to learn that kind of stuff than when you're trying to finish a programming assignment at 10:30pm on a Friday night with your roommates already three sheets to the wind. Get that kind of annoying picky stuff out of the way now, and your students will have a much easier time of it later if they go into that field.

In the first part of the class we wrote some simple applications using a library supplied by College Board (apvector, apstack...). The second semester we implemented some simple data structures (linked lists, BSTs, various implementations of stacks and vectors) against the interfaces we learned to use in the first semester, and covered some stuff about algorithms (very very simplified coverage of Big-O notation applied to various search algorithms).

Of course, this was an elective course, not required for graduation. And I think that there was a prereq of two years of algebra and a year of geometry, and all of us were serious gamers, were doing under-the-table web design work instead of flipping burgers, and were LAN party-attending, Magic-playing, AD&D playing nerds without girl/boy-friends.

Adam Jaskiewicz
+1  A: 

That depends partly on what you want to accomplish. Do you want to give the students a background for practical programming, or just teach them something about how computers work?

For practical purposes, I'd go with Python, for all the excellent reasons other answers have given. Easy to learn, similar enough to other popular programming languages to allow easy transfer of skills, widely and freely available.

If you want to teach them something something about programming with a hint of computer science, and don't care much about preparing the students to program in Java or C# or C++ or lolcode or any other currently popular language....

Scheme. It's really, really simple. There are good free implementations, although I haven't checked for free learning materials. It will introduce what lots of people consider advanced concepts easily, since the students are unlikely to have to unlearn too much. It's not such a good introduction to casual programming, but those who will go on to be software professionals will probably be helped by exposure to a functional language.

Either would be considerably better than Pascal, and given the description of the students I'd say ease of learning would be very important, so I would avoid serious working languages like C++, C, Common Lisp, or Java.

David Thornley
lolcode is a popular language? hmm..
Earlz
+1  A: 

The best language to learn and start with is one that you can think clearly in and that syntax does not get in the way, be confusing, or take too much time.

I started with Pascal. Then onto c, c++, java, etc. Along the way I did some VB, c# and the usual web languages.

I have found a Pascal foundation to still be invaluable for me. I learn to solve problems simply and it's always been a bit of a challenge to keep it that way with other languages.

Jas Panesar
+2  A: 

I'd highly recommend Scheme. It's proven to be a great first language and has a lot of free educational resources available online. Using a combination of HTDP and DrScheme, you can start with the most basic concepts like variables and build up to recursion and whatnot. The DrScheme environment supports multiple "levels" of user like beginner, intermediate, and so on, which allow students to get started easily without being intimidated by complex notation and syntax. Done well, an introduction to CS in Scheme with the above mentioned resources can be a great foundation for high school students.

mandaleeka
+7  A: 

Javascript. (no libraries just javascript in a browser)

  • Syntax similar to other languages (Java, C, C++, C#)
  • Immediacy of teaching JavaScript in a browser could have wide appeal to students
  • Lots of free literature
  • No licensing issues
Leah
I like javascript, but I disagree. DOM inconsistency between browsers is a show-stopper for teaching, I believe. Also, Javascript is a prototype based language rather than a class-based language (like C++, C#, Java), which will lead to confusion and frustration with inexperienced coders.
Wedge
Might work if the class was confined to using one browser. Just thought that a browser might be more engaging then command line for the WriteLine type apps for intro to programming class in Java, C, C++ etc.
Leah
Using a library like jquery wraps the inconsistencies nicely
Eric
+2  A: 

Since the bent of the class/school is toward math, I would agree that Python or a similar loosely typed, "almost scripting" language is best. However, if the class were for serious computer programmers, then they would need to learn C or something similar. It's better to get that fundamental understanding of Stack, Heap, instructions, and other fundamental CS ideas early on. But I digress...

C. Ross
+1  A: 

I would pick Pascal, it's provent to be useful in teaching. Then I'll move to some OO language, C# preferrably. A little bit more of syntax, but ease of using great tool with lots of wizards and "graphical programming".

Lots of propositions mentioned here containg serious disadvantages:

  • It's OO language. Yes, it's future, but from my experience it's harder to learn OO programming from scratch.
  • They are easy when you write console applications, but when come to GUI they lack of great tools. This is especilly needed in high-school because kids want Windows, not console applications, they are more native.

Also, IMHOP VB and VB.NET isn't very good choice. It's siad to teach bad programming style.

Migol
+1  A: 

English!

I'm not joking. Being able to communicate is the most important skill for a programmer.

Milan Babuškov
+1  A: 

I would go with either Adam J.'s response--whatever the College Board is currently using--or Leah's response--JavaScript. In addition to Leah's comments, I'd add that JavaScript allows you:

  • to teach functional, object-oriented, and prototypal programming styles all from the same language
  • to let students get something working, even if it is an ugly mess
  • to show how to focus on "the good parts", to quote Crockford, which all languages have

I learned Pascal in HS, taught myself C before I got to college, where I learned more, then learned VB later down the road. Python, Ruby, C#, et. al. are great, but something that will allow you freedom to teach or that is required by the College Board is likely the better option.

Overall, the concepts are really what's important. Any programmer can pick up the details of another language later down the road when it's necessary.

Ryan Riley
Given that the OP is in Europe, I doubt that what the College Board is using is much of a concern!
Stephen C. Steel
+1  A: 

If you teach them OOP which interact with something they love, they will listen.

Be pragmatic, if your student comes from physical background, then search how to create a simple game or tool which use a simple physic engine.

If they come from a mathematical background, then teach them how you can use OOP to draw their function on a graphical representation. Or how you can use the library of someone else to create prevision, or approximation etc...

For OOP, I agree that C/C++ can be a little too hard for them, python, java, c# should be fine.

Nicolas Dorier
A: 

I don't know what I would suggest, I want to stay neutral on this question. But I will tell you what I started with and what are the starting languages at my college (and most colleges in my area as far as I know).

I started with HTML/CSS, with actually isn't a programming language (just a markup language) but it gives you a basic idea about what a usual day in a life of programmer looks like - sitting in front of a PC screen and writing many lines of code. Many young people imagine programming as some exciting and fun job (which may be true from time to time) but it's good to let them know sooner rather than later that most of the time programming is pretty boring.

Then I moved to C++ for a while. I played with C++ Builder from Borland. I wrote few simple apps in it (simple text editor, simple image editor) but somehow I stopped for few months and never came back to C++. Don't really remember why but what I remember is that after that I returned back to web based languages and to HTML/CSS I added PHP and a little JavaScript. I've been using PHP since then so it's fair to say it's my favorite language. I wouldn't recommend it as first language to learn because it is very easy to write bad code and pick up bad programming practices with PHP (on the other hand, it's possible to write beautiful, robust, secure OOP code in PHP). Although, if you like PHP and want to learn it, my advice would be to get some PHP book from an experienced programmer because many examples around the Web contain bad practices you don't want to get used to.

That was all during my high school time. It's my third year in college so I will give you a little insight from that area as well. First language we worked with was ANSI C. Then we moved even to lower level - Assembler. It was a pretty bad experience (especially programming in Assembler - OMG!) but I learned a thing or two - some of them useful. Next we moved to MATLAB, then C#. Though, many subjects are very general in nature and teachers will allow you to use any programming language you like to implement general, language-agnostic algorithms so it's a good thing to have a favorite language you enjoy working with.

To sum it up, I don't really want to suggest any particular language. On the other hand, I would suggest to start with some lower level language first before moving to high level languages such as Java or C#. Just don't pick Assembler because that could really be a bad experience. C, C++ or something like that is good as a start. Maybe JavaScript is a good pick, too? PHP might be good as well but you need to get some nice book because most online tutorials suck.

Just my two cents :)

EDIT: I forgot about Pascal. We used it in IT classes during high school :D

Richard Knop
+1  A: 

I think the most important thing for a first language is that the simplest program is as short as possible and every single thing in it is meaningful. That could even be C using the return value of main, with an appropriate IDE that prints return status codes.

e.g.

int main()
{
  return 0;
}

compile, run => "Program 'first.exe' exited with code 0".

Then change 0 to 1, then some simple math, then a variable, then a loop that calculates 6 factorial, then a function call.

After that, it might be time to introduce the language you're going to use all semester.

But definitely don't start with Java or any other language that requires a 17-line magic incantation of imports and classes and statics just to compile in the first place.

Ben Voigt