Slashdot Mirror


Best Language for Beginner Programmers?

jahardman asks: "I work at a High School that has recently seen a decline in the number of students that want to take our entry level-programming course in Visual Basic. We have been toying with the idea of having the introduction course be in PHP or Ruby on Rails; but are not convinced that they lead well into higher level languages. Does anyone out there have suggestions as to what would be a better language to start students with? Ideally one that might be more 'enticing' as well?"

448 comments

  1. RealBasic by Blakey+Rat · · Score: 2, Insightful

    You could try them out on RealBasic: http://www.realbasic.com/

    It's a lot like Visual Basic, except:
    1) Portable to MacOS and Linux
    2) Easier to just jump in and write apps with
    3) Produces apps with no DLL dependencies.

    Give it a try, you might find it meets your needs.

  2. Java? by m0rph3us0 · · Score: 3, Insightful

    Java might be a good idea. Lots of tools available for free, and isn't domain specific like PHP.

    1. Re:Java? by jd · · Score: 4, Informative
      Java is a good language for a beginner and does teach some very useful OO concepts. I would quibble that as PHP can be run as a standalone application it is really no different from other scripting languages. However, it has poor structure and encourages some really bad programming practices. That's the only real reason I'd discourage it for beginners.


      I would NOT touch C++ at the novice level - way too much packed into it. Java is lighter and more modular, which is a better design practice. Teach by example, not just by examples.


      Really, structure is more important than syntax. Anyone can learn a new syntax, but if they don't grasp structure, they will never grasp programming. For that reason, even Pascal as a teaching language has its good points.


      The programming language D seems to have some of the benefits of C++ and C#, without as much overhead, so that might be a candidate too.


      Don't go for over-structured languages like Ada - they're as bad for newbies as the totally unstructured ones. (In fact, either extreme is a mental health hazard to all programmers and should be banned under EPA guidelines.)

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    2. Re:Java? by TykeClone · · Score: 1
      (In fact, either extreme is a mental health hazard to all programmers and should be banned under EPA guidelines.)

      Don't you mean OSHA guidelines :)

      --
      A fine is a tax you pay for doing wrong and a tax is a fine you pay for doing all right.
    3. Re:Java? by drakethegreat · · Score: 1

      I would go with java. Its easier then C/C++ for beginners in high school yet its powerful. It teaches a lot better skills then PHP in how to properly structure code. Its incredibly portable too so if they have a Mac or a PC they can use it. Of course you can do pretty much anything in Java that you can with Visual Basic or C.

    4. Re:Java? by khrtt · · Score: 1

      My school uses Java for teaching. Java is a powerful language, but you can define a complete small subset that's easy to learn, and have students use that. Beats BASIC, Pascal and all such, because the students end up learning a language that will actually be useful to them in practice.

    5. Re:Java? by BillyBlaze · · Score: 1

      That's great, until you limit them to that subset. I'm so glad I placed out of a class, taught in Java, where we were forbidden to use switch, break, and continue. The next class, taught in C++, was much better. I was able to teach myself about pointers to member functions on an assignment where everyone else was resorting to massive code duplication.

    6. Re:Java? by den_erpel · · Score: 1

      The choice for java would depend on the future of the audience. If you are taking about desktop and/or an introduction (and it will never go much further than that), Java might be a good option. If it is for engineering in general, Java is IMHO not the way to go.

      Still, I would like to place a big BUT here. I realise that, over the last decade, the hype of Java has made it the de facto introduction language in many universities.

      After a decade, those people have graduated and have been working in industry for a number of years.

      We are working in an electronics environment and are mainly working on embedded software and PCB design. We cannot get accross to those Java ppl that memory does not come for free (What! only 32 MB) in terms of money and board space, nor does processor speeds (money, space and energy dissipation)(What! only 66 or 300 MHz, why can't you put a 1GB processor on the board).

      Next to this, Java (and any other automatic memory management based system) obfuscates memory/time (physical) concept, context switches, stack usage, heap, ... Again, on an embedded system with limited memory and now way of swapping, a bad idea.

      Java is said to have no pointers, and this should be a good thing! In general, pointers can be hell for inexperienced programmers, but they do leave a link to the physical realm. After a while, they become second nature and they prove to be very useful for optimisations (memory, speed, ...).

      For programmes aimed at these kinds of jobs, C/C++ would be perfect, but it is not really needed, but at the very least, Pascal is IMHO still a good option (it is said to be a good educational language).

      --
      Genius doesn't work on an assembly line basis. You can't simply say, "Today I will be brilliant."
    7. Re:Java? by anomalous+cohort · · Score: 3, Interesting

      I once was an adjunct professor at USF and introduced programming to MIS students. The first time that I taught that class, I presented a simple, console based balance checkbook example in Java. I watched as the class recoiled in horror at all those curly braces.

      For the next class, I presented the same program only this time written in Python. That class was much more comfortable with the Python sample code than the previous class was with the Java sample code.

    8. Re:Java? by raolin · · Score: 2, Interesting

      To be honest I would stick with C++. You get much of the memory manipulation of C with the OO principles. Once you understand HOW memory works, and have a grasp of the fact that memory is really whatever I feel like calling it, then you can move into languages where more of the work is done for you. Until you have written your own classes, managed the core dumps and have had to track down where you failed to check the amount of memory allocated I do not think you should work in a language that hides these processes from you. It is one thing to get lazy, it is another to start off that way.

      --
      "It is sad to see a family torn apart by something as simple as a pack of wild dogs."
    9. Re:Java? by Fareq · · Score: 1

      I don't particularly like JAVA (or any pure OO language) as a first language.

      People who are just learning how to program, and in many cases, are just learning how the computer really works, are just not ready to be taught about classes.

      And you can't do a damn thing in Java without knowing about classes. Yes, you can say "just type these 5 lines at the top and don't worry about what they mean" -- and that works... sorta...

      Really you want a simple language, where you just write your code. Honestly, I can think of no better choice than some variant of BASIC.

      I learned with QBASIC, and it was very easy... just write your code... no magic stuff you don't understand.

      When you're ready to deal with the concept of a function, you can create them. When you're not, you can ignore them and write all your code in the "main module" or whatever they call the global code...

      You can't do any OO in QBASIC, though... but again, I wouldn't have a first programming course that even touched OO. I've seen courses that did, and they had one of two outcomes:

      a 40%+ failure rate or a huge number of people who passed the class knowing less than nothing.

      Meanwhile, in courses that did not, you can usually get at least 2/3 to 3/4 of the class to actually learn the basic fundamentals of programming successfully in a single course.

      Then have the second course introduce OO, and use a completely different language.

      Despite the fact I'll probably be modded troll or something, I see C# as a very good choice for that second course. Java would work rather well. C++ could work, but then you are stuck either with terminal-only programs or very complex and nonstandard GUI class libraries / toolkits...

      Either way, I'd shy away from Visual Basic. VB.NET is a much more OO language, but I'd steer clear of that too... it's... funky... they tried too hard to make it OO that looks *just* like VB

    10. Re:Java? by thsths · · Score: 1

      > where we were forbidden to use switch, break, and continue.

      Which is a useful decision for the start. Programming is about structure, structure of your control and data flow. The fewer instructions you use, the clearer the structure gets.

      Having said that, it is sometimes very hard to do without function pointers. They are useful, but they come at a later stage (in contrast to break and switch, which are just conveniences, and rather ugly ones).

    11. Re:Java? by idonthack · · Score: 1
      We are working in an electronics environment and are mainly working on embedded software and PCB design. We cannot get accross to those Java ppl that memory does not come for free (What! only 32 MB) in terms of money and board space, nor does processor speeds (money, space and energy dissipation)(What! only 66 or 300 MHz, why can't you put a 1GB processor on the board).
      Luckily for me (my AP Computer Science II class uses Java), it will be about six years (2 years of high school, 4 years of college) before I enter the workforce, so that will probably be possible by the time I'm there :)
      ---
      The only thing I hate more than a hypocrite is a person who hates hypocrites.
      Generated by SlashdotRndSig via GreaseMonkey
      --
      Why is it that when you believe something it's an opinion, but when I believe something it's a manifesto?
    12. Re:Java? by Tragek · · Score: 1

      I'd be interested in finding out if there has been any real adoption of D in the real world. Even academically. It seems to me that I haven't heard much about it. Perhaps is just that it's being outshouted by python, and rails.

    13. Re:Java? by jd · · Score: 2, Funny

      No, the Ada programming language is quite definitely a pollutant.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    14. Re:Java? by jd · · Score: 1
      Oh, I agree. I was talking more in terms of people who would likely use software engineering skills for general purpose programming.


      For scientific programming, high-performance computing and hardware design, you've a whole different class of problems to solve. There, you need to learn about high efficiency in space and in communications, as both are sharply limiting factors. On the other hand, you are much less likely to get people from outside the specialist field trying to modify the code, so readability is less crucial (though sill important to include).


      C would be the language of choice for engineers, possibly combined with Fortran as there is a lot of legacy stuff - especially in HPC and extreme mathematics. I'd also include SOME work on Occam, as it is an excellent language for learning about parallelism, communications and design efficiency. There are some good Occam compilers for the ix86 architecture, and many European Universities have transputers somewhere.


      The business sector, where data-crunching is still the name of the game, I'd probably go with C over an OO language, as OO is generally slow because you have context switches within the application itself to switch between paradigms.


      For the really heavy-duty data-crunching code, there are languages dedicated to exactly that task. I would not consider COBOL as a worthy member of that group. Any language that does binary-coded decimal arithmetic and uses syntax from hell is hardly a suitable language.


      For database work, OO is probably a good choice, as records can map to objects on a 1:1 basis, and relational databases aren't going to seriously outpace an OO program. The structure is a good enough fit as to encourage good design of both program and database, which is how such systems SHOULD be built.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    15. Re:Java? by ChocoladeHeathshield · · Score: 1
      I disagree. I took a beginning Java class when I knew programming, but most of the students didn't. Later, I taught Java to high school students who'd learned C++ at school.

      My experience of what students constantly asked led me to believe that Java has way too much "forget about what that means right now, just type it" for the beginner. Python is much clearer, and many high schools have switched to it. print "hello world" sure beats all the cruft you need in Java. This is not to slam Java as a useful language, rather, to say it's not the best language for people who are completely new to programming.

      The OP's thought about trying PHP or RoR seems to me very limiting - you're exposing the students to one problem domain rather than programming in general.

    16. Re:Java? by roard · · Score: 1
      Don't go for over-structured languages like Ada - they're as bad for newbies as the totally unstructured ones.

      Bullshit. In my freshman year, the language choosen to teach programming was, indeed, Ada. And it's an excellent choice: things are very well structured, it has all the things you need to teach concepts (threads, etc.), it has a compiler with "real" (as in, useful) error messages... basically, it "felt" very rigorous, but isn't what we miss in general ? ;-)

      Frankly, a much better choice than say, Java. In second year we used C++ though, funtional languages, etc.

      I agree with you, C++ in first year would have been catastrophic, Java is anyway a better choice than C++ to teach people.

      Although I'm tutoring an introductory programming class at uni, and we use Java.. and frankly, I would have much preffered explaining them things using Smalltalk or Ruby.. or even ada, after all :-)

    17. Re:Java? by ashultz · · Score: 1


      That's pretty funny, and I think Python might in fact be a better starter language...

      But if they don't like using various wierd punctuation, you should just slap their face and tell them to get another line of work as soon as possible. Being daunted by braces (ampersands, at signs, periods, brackets, or all of them at once) is not a good sign for a productive programming career.

  3. Well.. by El_Servas · · Score: 1

    Ruby on Rails is not exactly just a programming languaje, but a language and a framework...

    Kinda like .NET is to VB or C# right? RIGHT?!

    I sense a war regarding this topic... (The article, I mean)

    1. Re:Well.. by JamesOfTheDesert · · Score: 2, Informative
      Ruby is a programming language. Easy to learn, but very powerful, combining features from Smalltalk and Lisp (among others) but with a more friendly (i.e., C-like and file-based) syntax.

      Rails is a Web-site framework built using Ruby, much as Struts is a framework/tool-kit built using Java.

      Ruby makes for an outstanding first language. Learning to use Rails (or Nitro or Wee) could serve as a "next step" course for developing Web applications while examing Ruby's meta-programming facilities.

      --

      Java is the blue pill
      Choose the red pill
  4. consider Python by Tumbleweed · · Score: 4, Insightful

    If I'm remembering correctly, Python came out of a language designed for teaching. The very syntax encourages some good programming principles (indentation, etc.), and it's object-oriented. It's a very common language to find on shared web hosting plans. Also, Ruby on Rails isn't a language - it's a framework. The language is Ruby. Ruby would also probably be a good language for students to learn, though it seems less popular right now than Python.

    PHP as a _language_ is probably not a great idea, but used in conjunction with web development, it would be great, but don't forget MySQL and/or PostgreSQL. And Perl, though that should come later; students need to learn programming with something with decent syntax before being exposed to something like Perl.

    IMO, anyway.

    1. Re:consider Python by Anonymous Coward · · Score: 0

      Pascal came out of a language designed for teaching too.....

    2. Re:consider Python by croddy · · Score: 5, Informative
      I agree. Python is an excellent starting point for beginning programmers:

      It has a very clean, refined syntax; It can be used equally well as an object-oriented language as a simple procedural scipting language; It is open-source, freely distributed, and cross-platform (so that students will be assured of the ability to install it on their home PC's easily and legally); and while it is easily extended, it has a very useful standard library which will fill the needs of beginning programmers for a few years to come.

      Ruby is very similar to Python, and is another excellent choice, although I feel that the documentation for Python (in English, at least) is somewhat better.

      Neither PHP nor Rails are good choices for beginning programmers -- while developing web applications is very simple for advanced and intermediate coders, remember that beginners can get into some serious trouble learning a programming language, a query language, and a markup language all at the same time. Perhaps these would be better for a second course.

    3. Re:consider Python by deeny · · Score: 2, Informative

      Neither PHP nor Rails are good choices for beginning programmers -- while developing web applications is very simple for advanced and intermediate coders, remember that beginners can get into some serious trouble learning a programming language, a query language, and a markup language all at the same time. Perhaps these would be better for a second course.

      While I agree with the statements as posed, I also think that Ruby (as opposed to Ruby + Rails) is an excellent alternative to Python and more generally useful (my experience) than Python.

      Python's so quirky with the whitespace (I don't mind the whitespace personally, but I think it's weird to teach it as syntax in a first language).

      But then take it with a grain of salt from someone who's moved on from Python to Ruby.

    4. Re:consider Python by uncoveror · · Score: 1

      We are the knights who say nee!
      This is an ex parrot!
      Spam spam spam spam!

      --
      The Uncoveror: It's the real news.
    5. Re:consider Python by Incongruity · · Score: 2, Insightful
      Python's so quirky with the whitespace (I don't mind the whitespace personally, but I think it's weird to teach it as syntax in a first language).

      Quirky? How so? The using of whitespace/indentation for meaningful things really only encourages good programming and readable code. As long as you don't mix tabs and spaces (i.e. use a decent text editor that allows you to replace tabs with a group of spaces) the mandatory indenting is a fantastic thing.

      Much in the same way that LISP's usage of parenthesis made it so much easier to write code that worked on the first attempt, Python's indentation rules are extremely helpful help your write good code quickly and keeps it readable (also a plus if you're a teacher who has to read what the students code). Moreover, by encouraging high readability standards, starting in python will be make you a cleaner coder in other languages because your standards will be raised... again, all that's just my opinion...

    6. Re:consider Python by sgant · · Score: 4, Insightful

      I second the Python recomendation. It's a great language to learn concepts on and it's very powerful so it scales well when they get into higher level programming. Plus, it's cross platform on just about anything and everything that has a console.

      Give it a look. Tons of resources out there also.

      --

      "Leo Fender was in a 'state of grace' when he designed the Stratocaster." -- Paul Reed Smith
    7. Re:consider Python by Zecritic · · Score: 1

      So far as I know, Ruby is similar, but has more syntactic sugar. Then again, I don't know much about Ruby. How much sugar you can add to something before it isn't so good anymore is subjective. Go with Python. If you want more syntactic sugar after, switch to Ruby.

      --
      "Scientists have proof without certainty; Creationists have certainty without proof" -Ashley Montagu
    8. Re:consider Python by BillyBlaze · · Score: 1

      It's quirky in that it allows both spaces and tabs to be used interchangeably, instead of forcing indentation to be done the One True Way, tabs.

    9. Re:consider Python by Gryll · · Score: 2, Informative

      I will also cast my vote for Python. I have used Python as an introduction to programming with very good results.

      Early on being able to directly interact with the interrupter is very useful.

      Due to Python's high level nature programs can be written with very few lines of code allowing students to focus on what they want the program to do without the language getting in the way.

    10. Re:consider Python by croddy · · Score: 2, Funny

      hey, you spelled "spaces" wrong.

    11. Re:consider Python by try_anything · · Score: 2, Insightful
      I second Python. It's simple, it's a quick way to get to cool stuff, its features can be learned incrementally, and it's powerful enough to give the most interested kids a lot of room to grow and implement cool projects. If not Python, choose another language with:

      1. A REPL
      2. Simple, readable syntax
      3. Few and simple language features
      4. Enough libraries that beginners can do "cool" stuff with a little hand-holding.

      Of course, if you're teaching kids with brains, patience, and ambition, do them a favor and teach them something that will blow their minds, like Haskell. For a lot of kids, high school is the last time they'll have the patience and curiosity to do something that expands their mental repertoire but has no obvious immediate payoff. (Used to be college, but kids these days....)

      At the other extreme, if you know your students are lazy and likely to stick with one language their entire lives, I hear C works for that.

    12. Re:consider Python by bit01 · · Score: 2, Insightful

      ... the One True Way, tabs.

      Tab characters, as distinct from the tab key, are nothing more than a primitive and error prone text compression method. They should've been put out to pasture years ago.

      ---

      I love the free market zealots think monopoly is a good thing.

    13. Re:consider Python by gstoddart · · Score: 2, Insightful
      Quirky? How so? The using of whitespace/indentation for meaningful things really only encourages good programming and readable code. As long as you don't mix tabs and spaces (i.e. use a decent text editor that allows you to replace tabs with a group of spaces) the mandatory indenting is a fantastic thing.

      I guess that's an opinion, and a lot of python programmers claim that.

      The last time I used a language in which whitespace was significant syntactically, it was friggin' COBOL. From my perspective, I find pythons indenting rules to be just a horrible idea and seems broken.

      And I've seen C code written by python programmers who keep to that convention ---- it was some of the shittiest code I'd ever seen.

      YMMV, but for me, having whitespace be syntactically significant is just BAD!
      --
      Lost at C:>. Found at C.
    14. Re:consider Python by gstoddart · · Score: 4, Insightful
      It's quirky in that it allows both spaces and tabs to be used interchangeably, instead of forcing indentation to be done the One True Way, tabs.

      But there isn't One True Way.

      Or you end up with some abortion of how the text is written to the file, and therefore wrong. Emacs, for example, will not write out a single tab for each level of indent. It will collapse them all down to a single character to be space efficient.

      Then you have the encoding for how many levels of indent you actually have being encoded in an editor-specific method. So things like vi, cat, less, lpr (or notepad and printing if you're on windows) don't know how to interpret the content.

      I've had this argument with my co-workers -- some like two spaces indent, we had standardized on 4, but when edited by some editors, it crapped back a broken representation of the string because it was 'cleverly' encoded --- and it was incompatible with other editors.

      This is why whitespace chars shouldn't be interpreted as being syntactic, nor should they be stored in the file in an incompatible way.
      --
      Lost at C:>. Found at C.
    15. Re:consider Python by Ulfalizer · · Score: 1

      Considering that nearly everyone agrees that code should be indented for readability, it seems stupid for a language not to use the information inherent in the indentation. In a sense, you say the same thing twice in languages that require delimiters: a block in C is both indented and sorrounded by braces. The problem is that braces alone don't make for readable code, while indentation does. By making the language construct the same as the mnemonic device used by most people, you eliminate needless clutter.

    16. Re:consider Python by guaigean · · Score: 1

      I know it's been well voted for, but Python is amazing for teaching. It has flexibility, plenty of advanced capabilities, and helps to teach good code practices. With indentation required, it helps create readible code, and can be used by both novices and experts easily. The supercomputing center here uses it extensively for a variety of tasks, as well as the uni teaching it for intro to programming.

      --
      Microsoft Sucks, F/OSS Rocks. I get mod points now right?
    17. Re:consider Python by wgray8231 · · Score: 1

      Python is great. With Tkinter available standard (though limited), you can even get some GUI practice in. Knowing a scripting language has come in handy at my job, too.

      Batteries included.

    18. Re:consider Python by BillyBlaze · · Score: 1
      Like you say, some users want 2 spaces, some like 4, some like 8, and 3 is also common. But if you just use tabs, everyone can set their editors to display code according to their preference, and it just works. It's like CSS - it seperates content ("the code is indented x levels") from presentation ("it's displayed y chars from the right"). And every editor I've ever seen can be coaxed to output tabs, and display them as an arbitrary indentation.

      If you have to break lines, then on the second line, put as many tabs as the first line has, then spaces until it lines up how you want - this way, when other people view it on editors that indent a different number of spaces, everything still lines up.

      I do prefer most languages' approach of basically ignoring whitespace and relying on punctuation. But if you're going to use whitespace, you may as well do it right.

    19. Re:consider Python by koreaman · · Score: 0

      Honestly, don't you have better things to argue about with your co-workers? I've never had a real programming job, so I could be wrong, but it doesn't seem as though this is really your biggest fish to fry.

    20. Re:consider Python by gstoddart · · Score: 1
      Honestly, don't you have better things to argue about with your co-workers? I've never had a real programming job, so I could be wrong, but it doesn't seem as though this is really your biggest fish to fry.

      On the contrary, when someone's editor was breaking the code formatting standards, it needed to be fixed.

      One of the things you'll learn if you ever get a real coding job, is coding standards are important and there for a reason.

      Cheers
      --
      Lost at C:>. Found at C.
    21. Re:consider Python by dual0 · · Score: 1

      I really agree with that. I'am also teacher and have some experience with teaching programming.
      First at all I have to clerify that the language itself, when teching the first programming language, is secondary, the main focus has to be teching HOW to program. The fact that we have to teach a programming language exist and become a major issue.

      Lots of schools star with java, but bring oo concepts in a first programming course is to much for the students. This cause the students focus to mutch on the complexity of the language and limit them on the real purpose of the course. (java is to complex, and using everithing static, as I have ssen!, is not a good idea).

      I started using Scheme, it is a really good candidate, and as is based on list it is exellent
      when teaching list, recursive function and so on. But student don't like to learn exotic language that nobody use.

      Python is really simple to understand, in a douple of hours it is possible to master the base of the language (forget the oo part), and student can really focus on the programming aspects of the course. More than this python is trendy, studens will relly appretiatite this. The doc is complete, and well mantained.

      So I can tell you that next year I will use python.

      Damiano Vedova
      http://dual0.mine.nu/

      --
      Damiano Vedova
      http://dual0.mine.nu/
    22. Re:consider Python by drapmeyer · · Score: 1

      Python is a wonderful language, not only for beginners, but very much for them, too. It is syntactically and conceptually clean and provides libraries to achieve most of what anyone needs - maybe with some additional downloads like wxPython ;-)

      Clean, simple, rich, powerful, open source, adaptive to the max, with a huge user community and good documentation.

      Python provides a smooth introduction and growth pad into programming and OO.

      And if you want to go more advanced try developing component-based web applications with Zope 3

    23. Re:consider Python by sjames · · Score: 1

      Tab characters, as distinct from the tab key, are nothing more than a primitive and error prone text compression method. They should've been put out to pasture years ago.

      Actually, tab characters carry much MORE useful information than multiple spaces. They convey the desired level of indentation without forcing any particular size (or even presentation) on the reader. Some people find that code looks really neat when two whitespaces are used for an indent. Some people have trouble noticing the indentation if it's not 8 whitespaces. Many compromise and use 4. If someone wants to color code indentation but not actually indent, they are free to do so (as silly as that might be).

      The primary problem with tabs is that changing the stops can/will mess up a neat group of variable declarations. That problem can be solved once and for all by changing the presentation rather than the contents of the file. For example, an editor can treat leading tabs differently from those embedded in a line. It can use empty lines as a seperater so that a group of type\tname will just do the right thing.

      While similar things can be done with any whitespace, keeping space as a literal single whitespace and taking liberties with tab is much less likely to have unfortunate side effects.

    24. Re:consider Python by bit01 · · Score: 1

      Actually, tab characters carry much MORE useful information than multiple spaces.

      Disagree. The difference from spaces could, though usually doesn't, carry an extra bit of information.

      They convey the desired level of indentation without forcing any particular size (or even presentation) on the reader.

      Spaces don't either. Editors could easily expand/reduce the number of leading spaces in a similar way to variable tab-to-space display conversion, though hanging indents would need to be handled. The fact that very few (zero?) text editors bother doing this is telling.

      Some people find that code looks really neat when two whitespaces are used for an indent. Some people have trouble noticing the indentation if it's not 8 whitespaces. Many compromise and use 4. If someone wants to color code indentation but not actually indent, they are free to do so (as silly as that might be).

      All of this is true for leading spaces also. However the argument goes far beyond indentation and a pretty printer is the appropriate tool to handle this including comments, long statement splitting, hanging indents, symbol spacing, variable name length changes, keyword case and case consistency. Experienced programmers generally don't care what the indentation is as long as it's consistent. For example, I generally prefer two-space indentation to make better use of screen real estate however if I'm working on code with another code style I'll generally use whatever's there unless the writer was inconsistent. If it's a complete refactor I'll run it through a pretty printer to get the house style.

      The primary problem with tabs is that changing the stops can/will mess up a neat group of variable declarations.

      No, the primary problem is that spaces and tabs cannot normally be visually distinguished though they act differently. This means that 90%+ programmers and 90%+ text editors use them interchangeably and inconsistently. In particular, beginning programmers and users rightly wonder why something that looks exactly the same on screen acts differently. That's what I mean by error prone. As a result tabs cannot generally be used to adjust indentation in the way you've described. In addition tab's are one of the very few ASCII characters that have different display spacing depending on context - this means that, unlike almost all other characters including newline and much of unicode they can only be processed in context and with higher level knowledge of what the spacing should be. They break programs that assume text column corresponds to display position. This has ramifications in all sorts of areas of text processing where the output of one program with one view of tabs feeds into the input of another program with another view of tabs. Examples are make (where a makefile loses key information when it's editted in a number of otherwise innocuous text editors) or cut (that can't handle text from programs that use tabs to space to position rather than as a separator).

      That problem can be solved once and for all by changing the presentation rather than the contents of the file. For example, an editor can treat leading tabs differently from those embedded in a line.

      The same could be done with spaces.

      It can use empty lines as a seperater so that a group of type\tname will just do the right thing.

      No, empty lines can have different semantic meanings depending on the language and the context.

      While similar things can be done with any whitespace, keeping space as a literal single whitespace and taking liberties with tab is much less likely to have unfortunate side effects.

      Not when pretty much every existing text processing program has a different view of what tabs are. Tabs, if used in the disciplined way you've described, could be usable but they do not give any significant advantage over spaces and have significant disadvantages when not used in a disciplined way. Since re

    25. Re:consider Python by sjames · · Score: 1

      In general, you're missing the important point that while the handling I've suggested could be used for space as well as tab, many of the drawbacks you noted can be avoided by keeping space as a literal single whitespace (so that there is a way to specify 'I really mean EXACTLY one space, just do what I say' while still having a metacharacter of sorts that is interpreted more creatively.

      Vi DOES support differing presentation for the tab character. I'm fairly sure EMACS does too.

      For example, you like two space sized indents, I like 4. If we use TAB, you'll see 2, I'll see 4, and we're both happy (in vi, :se ts=4). If we use literal spaces, I'll have to use a script to change your 2 space indents into my 4 space indents. The script will have to take language syntax into account for multiline strings or it will screw up the nicely formatted program output (that is, it will inadvertantly alter the code's behaviour invisibly rather than simply altering presentation). If you apply a patch from me (or I from you), the code will look crappy and in python, might have the wrong indent level (and break).

      While for most of us, the presentation is merely an annoyance, those with a visual impairment may find 1 or 2 space indents (as opposed to TAB) to present a significant problem. Others would find 8 space indents a problem if their field of vision is restricted.

      In other words, some text editors do use TAB in a somewhat disciplined way, and cannot do the same with space because the meta-information that says 'text editors are permitted to present this whitespace as desired, but that whitespace MUSt be presented as a literal single space.'

      Many shops DO specify the use of tab for indentation and literal spaces in strings. The linux kernel code used a TAB standard.

      While an empty line may be syntactically significant in some languages, it generally isn't for the case I specified. Elvis and vim auto-detects C, python, perl, and other source and adjusts it's presentation appropriatly (syntax hiliting, etc). They could probably include my suggestion as one more rule to follow when working in languages where an empty line between groups of variable declarations is not syntactically significant.

      I argue that it's easier to throw unwanted information away than it is to re-create wanted but missing information.

    26. Re:consider Python by Anonymous Coward · · Score: 0

      One of the things you'll learn if you ever get a real coding job, is coding standards are important and there for a reason.

      Then the second thing you will learn is that no one follows them.

  5. Teach programming, not the language. by DaoudaW · · Score: 4, Insightful

    I've been recommending (and teaching) c++ for several years now. Pascal was great, even Java has its good points. The main thing is whatever language is being used to introduce programming use it as an example language for the programming concepts which are being taught.

    1. Re:Teach programming, not the language. by phallstrom · · Score: 1

      To add on to this... pick a language that doesn't require learning some new GUI/framework/etc. Pick something that can easily read/write to a simple console.

    2. Re:Teach programming, not the language. by BrokenHalo · · Score: 2, Funny

      In other words, consider assembly code. Sure, it takes a bit of effort to learn, but it's still by far the best way to really get to grips with programming.

    3. Re:Teach programming, not the language. by DaoudaW · · Score: 1

      Certain concepts would be best taught using assembler language, but many modern programming techniques would be obscured by the details of the language. It would be easy to not see the forest for the trees, or in this case not see the module for the instructions.

    4. Re:Teach programming, not the language. by wargolem · · Score: 1

      Doesn't C++ ask more of a programmer to learn the finer points of the language than languages like Python, Lisp, Scheme, or Haskell?

  6. My answer by Omnifarious · · Score: 5, Insightful

    I don't know about Ruby on Rails, but I strongly agree with you about PHP and VB. I think they both lead poorly to working in other languages.

    I would recommend Python, because I'm more familiar with it than Ruby. It has a clear, elegant syntax, and many concepts in it exist in other languages as well.

    But, Ruby may be perfectly adequate as well. I know that most concepts that exist in Python that aren't particularly language specific have counterparts in Ruby.

    I used to recommend assembly, then scheme, just so all the people who entered thinking they were programmer hotshots because they knew BASIC, VB or C or something would find themselves in deep water and having to learn something new.

    But I suspect that's a bit overly hostile. Depends on the environment of course. Still might be a good idea for people going to a hard-to-get-into technical school to knock them down a peg or two and convince them that there's stuff they don't know.

    1. Re:My answer by failrate · · Score: 4, Interesting

      Python and Ruby are very similar, and I would recommend them about equally. C/C++ are bastard hard as starter languages, and VB is just about the tool of the deevil.

      --
      Voodoo Girl is the bomb!
    2. Re:My answer by Pheersome · · Score: 2, Insightful
      Hear, hear. My vote is definitely for Python. It's my language of choice in general, but it also has a lot of qualities that make it great for introducing to programming. A few of my favorites:
      • helloworld is literally a one-liner -- don't have to wrap it in a function (or, god forbid, a class *cough*Java*cough*) or import any I/O libraries
      • The syntax is ludicrously simple; eliminates bugs like "if(foo); {do_stuff();}"
      • The standard library is substantial and reasonably well-documented
      • After students have the basics (variables, conditionals, loops, functions, etc.), you can introduce OOP and/or functional programming
      The introductory programming course at my alma mater (a rigorous four-year math/science/engineering school) has been taught in Java for years, but it's being rewritten in Python. Go Python!
      --
      Better to light a candle than to curse the darkness.
    3. Re:My answer by Anonymous Coward · · Score: 0
      I used to recommend assembly, then scheme, just so all the people who entered thinking they were programmer hotshots because they knew BASIC, VB or C or something would find themselves in deep water and having to learn something new.
      Interesting... At first, I thought "wow, what a hard-ass." Then I thought that had my school system done that for me, I'd have been much better off. I was a programming hotshot, especially with pascal, but I knew nothing other than the world of imperative languages. Not only would Scheme have turned my world upside-down and given me a reality check, but I'd have been much better prepared for higher education in general, i.e. I would have been open to the idea that there would be much to learn about science and the world in general. So - Scheme would get my vote. Or perhaps Haskell or Eiffel. Anything significantly not mainstream with the potential to introduce the concepts of computer science through programming, with strong APIs to allow students to build usable programs for that instant gratification one needs for such short-term courses.
    4. Re:My answer by Omnifarious · · Score: 1

      I had the good fortune to have someone tell me to get Knuth's "Searching and Sorting" at 15. If trying to get through that doesn't make you humble, nothing will. :-)

    5. Re:My answer by lisaparratt · · Score: 1

      Scheme was the technique they used at york.ac.uk for CompSci - seemed to work very well, for the reasons you give.

      Also leads very well into interpreter and compiler theory, being as you essentially have to build the parse trees by hand.

    6. Re:My answer by MAdMaxOr · · Score: 2, Interesting

      While Ruby may be a good choice for a 1st language (though I'd teach either python or java), DO NOT teach Rails.

      Besides the obvious concerns of having to teach HTML at the same time, Ruby on Rails uses *way* too much magic for beginning programmers. There are all sorts of domain specific shortcuts that Rails uses. How are you supposed to teach iteration when the Rails uses something like collection_select?

    7. Re:My answer by jbplou · · Score: 1

      Maybe VB 6 but not VB.NET, VB.NET is fully object oriented and a good programmers in it can move to C# or Java quickly if they need to switch lanuages for some reason.

  7. What about XUL and Javascript? by labal · · Score: 0

    I find that to be pretty easy, and fun to do as well, especially when writing simpl extensions for Firefox, etc. Not only that, but Javascript is very useful for use with webpages as well.

    --
    hellboy1975 http://www.foutheye.net
    1. Re:What about XUL and Javascript? by Anonymous Coward · · Score: 1

      "What about XUL and Javascript? "

      I'd recommend against Javascript for the sole reason that sometimes it's not as easy to debug as languages that utilize a compiler or an IDE.

      If they DO go the Javascript route, learn to use the "javascript:" output window that Firefox provides, as their error output is far more useful than Internet Explorer's.

  8. Python by MBCook · · Score: 5, Insightful
    Python. Python has everything you need and then some. It runs on every platform (Linux and OS X boxes already have it installed), and it's free.

    Python (through the use of forced whitespace) forces them to learn to write more readable code (I remember taking C++ in high-school, the stuff people wrote would make your eyes bleed). The language has everything your students might need for intro programming (for loops, functions, etc). If they want to continue on will Python later (or you want to offer advanced classes later) it has bindings for all sorts of stuff (XML, OpenGL, QT, GTK, and many many other things). It also has all sorts of handy stuff like an interactive interpreter, a "for each" loop, and more. It's object oriented too.

    Look into Python. It's easy to use and would make a great stepping stone if they want to later use a language like C/C++/Java. Or (as I said) Python is great in and of its self and they can stick with it.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
    1. Re:Python by TeknoHog · · Score: 3, Informative

      One more reason why Python is great for teaching is that you get results much faster than in some traditional languages. Of course this is great for everyday programming work, but for students the motivational aspect of rapid development is even more important. There's very little grunt work you need to do before getting into the fun stuff.

      --
      Escher was the first MC and Giger invented the HR department.
    2. Re:Python by bill_mcgonigle · · Score: 1

      There was a story several years ago about the Navy advocating Python as a tool for schoolchildren to learn OOP, which they see as essential for future national security concerns.

      Does anybody have any references for this? I thought it was on Slashdot last decade, but I can't turn it up.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    3. Re:Python by gregbaker · · Score: 2, Interesting

      We have recently started using Python in our first programming/CS course in the first-year of University.

      Feedback from students has been quite good. The biggest complaint now is when we switch to Java in the next course: "Why do we have to use Java? Everything so so much harder."

      From my point of view, Python is well structured and has all of the language features I'd ever want while introducing programming (and arguably, all I'd ever want period). Students seem to pick up relatively good habits (of course, some will find ugly ways to do things no matter what the language encourages).

      More importantly, students can spend more time thinking about their program, and less time fighting with the language. Python seems to do its thing and get out of the way. More "serious" languages tend to be more complex--that complexity adds more overhead for the students, which means more to learn before they can actually get much done.

      For example, in Java you have to learn about classes, methods, references, and related stuff earlier in your journey. In Python, a lot of this can be ignored and introduced later. All the same concepts are there, but you can hold off and introduce them on your own terms, not because they're needed to write the next program.

      If you are interested in teaching Python, I have some course materials I can share--both mine, and collections of other resources that I point students to.

    4. Re:Python by spiff42 · · Score: 1
      Python (through the use of forced whitespace) forces them to learn to write more readable code

      Hmm. Forced whitespace makes code more readable? I thought it was about the oposite.

      On a more serious note: Allthough I have been programming for many years and in many different languages, and only breifly started with Python, I would agree that Python is one that can actually be recommended for students with no prior programming experience.

      /Spiff

    5. Re:Python by einhverfr · · Score: 1

      Python. Python has everything you need and then some. It runs on every platform (Linux and OS X boxes already have it installed), and it's free.

      For reasons I never understood many HP Pavillions have it preinstalled too.....

      --

      LedgerSMB: Open source Accounting/ERP
    6. Re:Python by Anonymous Coward · · Score: 0

      Where is it preinstalled on MacOSX. I have 10.3.9. I did a search for it but didn't find it. I also typed Python into the Mac Help but that just crashed the help system (hmm...)

    7. Re:Python by einhverfr · · Score: 1

      You could try typing it on the tcsh terminal....

      Oh wait... Real Mac Users don't use terminals....

      --

      LedgerSMB: Open source Accounting/ERP
  9. Would you like to play a game? by losman · · Score: 5, Insightful

    In school kids have objectives that are more short term. Graduating, having fun and being creative are common examples of that. As educators you have more long term objectives for the kids. Preparing them for college or the professional world being prime examples of that. The answer to your question is somewhere in the middle.

    If I wanted to interest kids in programming and teach them something useful I would try something like a course in Unreal Tournament editing or some other game that has a well defined scripting language. Yes it is a game but the scripting language is very C like in nature. And let's be honest you should really be focusing on teaching them how to analyze, break down and solve problems progamatically regardless of the language. Teach them that and then let them decide if it is something they want to pursue.

    Another great aspect of teaching a course this way is that it shows them both the difficulty and the rewards of programming. It is not easy to create good levels in these games. They have to learn to handle various types of media as well as programming the main logic. As a great bonus they end up with something they all can play with in the end.

    Any how, this kind of idea is not for a conservative environment and if you are in that situation then teach them Java and emphasize object oriented development. If your environment is a bit more progressive then I would look at the gaming route.

    --
    Q: I am short, useless and provide no value. What am I? A: a sig
    1. Re:Would you like to play a game? by Dukhat · · Score: 1

      Editing Unreal Tournament would attract many boys to the class, but I think it would bore most girls and guys who aren't gamers. Just because you enjoy to play on a computer, it doesn't mean you will enjoy to build something. I think the students who sign up for an Unreal Tournament Programming Class would primarily be interested in the "user testing" portion, and they would get frustrated with how much programming is not gaming.

    2. Re:Would you like to play a game? by losman · · Score: 1

      I agree completely. But, and there always is a but, what would be different with any other language???

      With regards to gender; a creative teacher would understand that different people have different interests. That is why there is not one role in software development. You have testers, programmers, builders, integrators, scripters, configurators, design and graphics, audio & visual and a whole host of other roles.

      Now imagine that very smart and inventive teacher structuring the class so different people work on different aspects and then come together to deliver one product. So people could be responsible for heads down coding and logic. More graphically oriented people could work on meshes and stuff. Audio and musically inclined students could work on tracks. Map, planning and layout people could design the levels. Hmmm... That sound strangely like a development team which is important to learn.

      So back to my question about any other language, at least with this the teacher is ahead of the game because they already have something the kids could connect with. Would it be easy? No. But it would good.

      --
      Q: I am short, useless and provide no value. What am I? A: a sig
    3. Re:Would you like to play a game? by Anonymous Coward · · Score: 0

      Yeah, have the students work on scripting for a game where the sole object is to blow the heads off your opponents in a variety of different settings. That sounds like it'd go over well at the PTA meeting. Never mind the fact that level editing and 3D modelling aren't even related to what the guy was asking about in the first place.

      I mean really, did you even think about that before you posted it?

    4. Re:Would you like to play a game? by thegrassyknowl · · Score: 1

      Another great aspect of teaching a course this way is that it shows them both the difficulty and the rewards of programming. It is not easy to create good levels in these games. They have to learn to handle various types of media as well as programming the main logic. As a great bonus they end up with something they all can play with in the end

      Here, in Oz, there is a competition for uni students (we hear about it all the time) to program up the MicroMouse hardware for solving tasks. I can't remember what it's called off the top of my head and Google is just too far away.

      It's an interesting concept. The Kids are given a set of mazes to negotiate. Their program must successfully navigate the maze and avoid all of the obstacles. You are not allowed to just program in the solution to the maze either. You must make the mouse solve it.

      The task itself is quite involved, but I am sure that high school students could probably solve a simple cut-down version. It would teach them a whole pile about analysing a real-world problem, working out an algorithmic way of solving it and then breaking down that algorithm into manageable sub-parts for implementation.

      --
      I drink to make other people interesting!
  10. I'd recommend web development. by vertinox · · Score: 1

    Although, lord knows we don't need any more web developers, but...

    If they kids have access to notepad and some type of free webhosting then they can always work on a web page regardless of having to have a compiler. Once they understand how syntax works (like closing your tags!) then they can move up to more complicated programs that make you hunt down errors after you compile.

    Although some people would debate getting the inner workings down pat first is more important (like hello world programs in C), I'd debate that web page development brings instant gratification to the person making the page fairly quickly and from there you can expand on advanced topics such as Java and PHP programming.

    The kids that are more visual oriented will drift towards the more graphic parts of the web development like Flash while those who find themselves interesting in the gut coding towards C++.

    And maybe you can teach them Photoshop skills and how to not make a fugly web page while you are at it...

    --
    "I am the king of the Romans, and am superior to rules of grammar!"
    -Sigismund, Holy Roman Emperor (1368-1437)
    1. Re:I'd recommend web development. by thephotoman · · Score: 1

      Well, give them photography skills. Learn Photoshop and all you know is Photoshop. Learn Photography and Paint Shop Pro and The GIMP come easy as well.

      But that's beside the point. Knowing markup is also a good idea. As long as you teach them XML, they'll be able to figure things out. But the question was about actual programming and which language you should teach first, not about markup and web developing.

      --
      Haec merda tauri est. Ceterum censeo Carthaginem esse delendam.
  11. no, you're not remembering correctly by Anonymous Coward · · Score: 0


    whyfor there is Python.

    You might be thinking of Pascal, which was designed as an introduction to structured programming.

    Spot on about Python being an extremely solid choice, though.

    1. Re:no, you're not remembering correctly by sffubs · · Score: 1

      From http://www.python.org/doc/essays/foreword.html:


      "It all started with ABC, a wonderful teaching language that I had helped create in the early eighties".


      So Python did indeed emerge from a language designed for teaching.


      Spot on about Python being an extremely solid choice, though.


      Couldn't agree more.


      --
      ݼ)s$æúßðíÊ'öX'îò5^àûßQç£
  12. python! by EngMedic · · Score: 2, Interesting

    scripting language holy wars aside, python WILL teach good programming style, it's clean, easy to learn, multiplatform, and if you want a good real world example of why it's useful --- well, bittorrent comes to mind.

    --
    filter: +3. Hey, look! all the trolls went away!
  13. The envelope, please? by thephotoman · · Score: 1, Insightful

    Go with Python. It's quick, easy, and clean. It encourages decent syntax, and is portable to anything. Furthermore, as it's interpreted, you get the instant gratification of being able to run the program once you've saved it and set the permissions--no waiting on a compiler. Also, studens can take their work home with them, as it's portable and free both as in freedom and as in beer.

    Also, the GUI bindings aren't that hard to use and most are equally portable.

    --
    Haec merda tauri est. Ceterum censeo Carthaginem esse delendam.
  14. What about using X-code? by jessecurry · · Score: 1

    It might actually be good to start the students on the path to learning Cocoa. With X-code and interface builder a large number of fairly powerful applications can be constructed with very minimal coding, but the students will have the option to code 'till their heart's content.
    Interface builder would allow students to even go as far as building a fully functional web browser without having to touch any code, and since it is free you wouldn't have to invest much into your startup.
    I suppose that the only drawback would be that the student's applications would run only on Mac, but the last time I visited a high school there were plenty of Macs available to work on.

    --
    Those who know, do not speak. Those who speak, do not know. ~Lao Tzu
    1. Re:What about using X-code? by bhtooefr · · Score: 1

      Not all high schools.

      Mine HAD two Macs, one 68040 based Mac that died, and one PPC 603? Mac that died...

      (At least I'm a PC person :P)

    2. Re:What about using X-code? by CoolMoDee · · Score: 1

      Teaching them XCode and Cocoa and Objective-C is a great idea in theory. However Cocoa has a *huge* learning curve compared to Python et al. Sure - it is super power and super easy - once you understand it and everything clicks. Defently not something I think some high schoolers taking an *intro* to programming class should be taking.

      Your idea for them building a web browser without touching code is great - but what do you plan to do after that half a period - maybe a period *max*?

      --
      Jisho - A Japanese English German Russian French Dictionary for the rest of us.
    3. Re:What about using X-code? by jessecurry · · Score: 1

      they do always have the option of building command line applications.
      They can learn the basics of programming without having to worry about the GUI. The codeless web browser would probably be a little better near the end of the class, something to spark their interest for further exploration. Also, there are many projects that can be completed without having to worry about some of the more complex aspects of Cocoa.

      --
      Those who know, do not speak. Those who speak, do not know. ~Lao Tzu
  15. Think about audience. by nes11 · · Score: 1

    Think about your audience. A few of these kids will really want to learn programming, but most are just wanting something cool that shows quick results. I think PHP would be a great idea. It's quick, easy, & a very forgiving language. Plus they get to develop programs that will have real-life value that they can continue to modify & use after the assignment is turned in.

    Sure you could try something like Pascal that better teaches programming, but that's just going to make your enrollment decline more quickly.

    1. Re:Think about audience. by Anonymous Coward · · Score: 0

      Think about your audience. A few of these kids will really want to learn programming, but most are just wanting something cool that shows quick results.

      Unless this is an adult education class, this is kind of an absurd premise. Are these the questions we ask when teaching physics or history or mathematics?

  16. One word. by Pig+Hogger · · Score: 1
  17. Pascal WAS a language designed for teaching by rebug · · Score: 4, Informative

    It was designed as an introduction to structured programming.

    Python wasn't designed as an educational language. Guido explains its origins in the FAQ.

    --

    there's more than one way to do me.
    1. Re:Pascal WAS a language designed for teaching by fireweaver · · Score: 5, Insightful

      Personally, I am a fan of Wirth-style languages, so I would recommend Modula-2 (successor to Pascal with a cleaner syntax), or Oberon (successor to Modula that adds objects and garbage collection). Although I'd stay away from the native Oberon programming environment since it is quite unlike the environment most of us are familiar with (Windows and its look-alikes). Both of these languages, like Pascal were designed for instruction, but are powerful enough to be used in production environments.

    2. Re:Pascal WAS a language designed for teaching by andyveitch · · Score: 1

      I remember attending an introduction to Pascal, the lecturer told us a bit about Niklaus Wirth and then telling us that in his opinion other languages were 'wirthless'.

      I can feel my Karma plummeting afer this post...

      --
      Open Source Email Response Management http://www.logicalwa
  18. Scheme by Knetzar · · Score: 1

    If the kids don't know anything about programming, and are interested in math, Scheme (or Lisp) might be the best language to teach them. The can learn some really interesting concepts.

    But, that's probably too academic, in which case I recommend Jython. It'll be really useful as a scripting language, and will allow you to have a follow up course on Java in which you slowly replace a large Jython program with Java code and then extend it even farther.

    1. Re:Scheme by Mr2cents · · Score: 1

      Scheme is a great progamming language to start with. At least try an interpreted language first, you can explore while interacting directly with the interpreter, it's more fun.

      And there are video lectures about scheme available online for free at the MIT. Very interesting, and made by the creators of the language (Abelson and Sussman).

      (Please don't start downloading them all at once, those are huge files).
      http://www.swiss.ai.mit.edu/classes/6.001/abelson- sussman-lectures/

      --
      "It's too bad that stupidity isn't painful." - Anton LaVey
    2. Re:Scheme by Piquan · · Score: 1

      (Please don't start downloading them all at once, those are huge files).

      A quick google found a torrent of the DivX versions. 9GB total. There's currently 2 seeds and 3 peers. The files are under the Creative Commons licence.

    3. Re:Scheme by Intron · · Score: 2, Insightful

      "The can learn some really interesting concepts."

      Like how to count parens? I spent a lot of time doing:

      1 2 3 3 3 3 2 2 3 4 4 3 3 3 2 1

      --
      Intron: the portion of DNA which expresses nothing useful.
    4. Re:Scheme by Anonymous Coward · · Score: 1, Informative

      Stop using Notepad or a whiteboard as if it were a programming editor, dim wit.

      C has almost as many parentheses as Lisp does, if you count curly braces; and typically more punctuation if you include commas and semicolons.

      Emacs and vi can both match parentheses automatically, and Emacs can automatically indent Lisp code so that you can visually discern mismatched parenthesis by glancing at indendation. (vi may do the same, but I don't use it.)

    5. Re:Scheme by omission9 · · Score: 1

      wtf? Those "craploads of librairies" are for useful things that no language comes with "out of the box" like database connectivity.
      I know plenty of scheme and I can't think of a worse suggestion.

    6. Re:Scheme by namekuseijin · · Score: 1

      "I spent a lot of time..."

      may i suggest you leave the parens matching to a decent text editor? indenting your lisp code in pretty-printing style would help you get past the very handy parenthesized syntax as well...

      --
      I don't feel like it...
    7. Re:Scheme by Anonymous Coward · · Score: 0

      How do these parentheses morons keep getting modded insightful? If you use any decent text editor, matching parentheses is just not hard. Moreover, in Lisp-like languages, you never have to go back and add more opening parentheses.

      By contrast, you can get stuff like (((((Integer)v.get(0)).intValue()>5)?1:2)+3)*6 in other languages, and every time you realize you need to group expressions or add a cast, you have to add both opening and closing parentheses. That's a much bigger pain in the neck.

  19. dont flame me by cwraig · · Score: 0

    i know it doesnt sound like a good idea but i began on Qbasic.

    it provided a very basic introduction to loops, variables, randoms and triggers.

    i know its not particularly practical but for starting with its the pick for me.

    For a second lets consider whats most important in your first programming exercise. can you make the language say "hello world"

    1. Re:dont flame me by Karamojong · · Score: 1
      I tend to think the aversion to BASIC in all its evil forms is entirely justified. I started with BBC Basic at about the age of five. Programming for me is an interest that's come and gone over the years, but sadly QBasic is still probably what I'm most familiar with. The problem I found when trying to learn C a few years ago, and again now I'm getting back into coding and making an effort to get beyond the hello world stuff and master Python, is that my mind is severely corrupted by thoughts of GOTO and shocking spaggheti code I can understand as I write, but don't have a hope of untangling if I come back to it later or if I was to try and explain it to anyone else.
      "Teaching BASIC should be a criminal offense." -- Edsger Dijkstra
      Wise words from Dijkstra. It does take quite some effort to get beyond the bad habits of BASIC.
  20. Java by OAB_X · · Score: 4, Insightful

    Java is easy to learn, gets programs that do real stuff going rather quickly, and is runable on any platorm, and is enterprise level.

    1. Re:Java by dubl-u · · Score: 1

      Java is easy to learn, gets programs that do real stuff going rather quickly, and is runable on any platorm, and is enterprise level.

      I love Java and program 90% of my stuff in it, but I wouldn't recommend it for a high-school course. Ruby, since it's interpreted, has a much tighter code-to-effect feedback loop, which drastically speeds up learning. It's a very unfussy language, so it's nicer to beginners. And Ruby On Rails is some nice magic, so they can get a web app up and going quickly, which will be more fun.

    2. Re:Java by OAB_X · · Score: 1

      Well, I learned Java in my grade 11 high school course. Like Ruby, it has the added benefit of being free to get SDK's for (unlike MS VC++ or C#), while still being easy to program in.

      THing is, there is very little in the way of centralized knowledge bases for Ruby on Rails (I wanted to learn that but was completely miffed trying to find any basic tutorials).

      You could also try Python as well. Easy to learn but also multiplatorm and free.

    3. Re:Java by jerdenn · · Score: 1

      Well, I learned Java in my grade 11 high school course. Like Ruby, it has the added benefit of being free to get SDK's for (unlike MS VC++ or C#), while still being easy to program in.

      The MS VC++, C#, J#, and VB.NET SDKs are indeed free.

      http://msdn.microsoft.com/netframework/downloads/u pdates/default.aspx/

    4. Re:Java by OAB_X · · Score: 1

      Visual Studio.NET = $99.99 USD for the Student development kit. I guess they are "free" from microsoft, but if yoou really want to be actually able to use them, you need to pay $100 per student.

    5. Re:Java by jerdenn · · Score: 1

      Re:Java (Score:2)
      by OAB_X (818333) on 9 ish (#13313831)
      Visual Studio.NET = $99.99 USD for the Student development kit. I guess they are "free" from microsoft, but if yoou really want to be actually able to use them, you need to pay $100 per student.


      Please note that I never claimed that Visual Studio.NET is free. It isn't.

      However, the .NET SDK is entirely free. Please actually visit the link that I previosly posted, and you'll find that this is true.

    6. Re:Java by Your+Pal+Dave · · Score: 1
      Please note that I never claimed that Visual Studio.NET is free. It isn't.

      However, the .NET SDK is entirely free. Please actually visit the link that I previosly posted, and you'll find that this is true.


      Of course, that doesn't include the Visual Studio IDE. If you desire such a thing, you can use the Free (GPL) SharpDevelop IDE.
    7. Re:Java by lemnik · · Score: 1

      I have to agree with this. I learned Java when I was 9 years old, it was my first programming language, and is still my favorite (I started with a pre 1.0 release). I found that in teaching Java, the best option (for roughly the first 4 lessons) is to use Beanshell. It gets the basic concepts (like variables, methods and even classes) across very quickly (literally 4 lessons), and the you switch to a "real" environment to teach more advanced topics. (I tought Java to the younger students when I was in matric).

  21. DrScheme by sleepingsquirrel · · Score: 5, Informative

    Give DrScheme a look. Nice graphical IDE, libraries, dead simple syntax. Free. Different language levels to cater to the learning process. And pleanty of introductory texts.

    1. Re:DrScheme by Anonymous Coward · · Score: 0

      Indeed!

      Scheme is very clean; you don't have to learn very much to get going with it.

      "But it's not used in the real world!" Firstly, at the high school stage, who cares? Odds are, most of these students aren't going to rush right out and get a programming job; those who do are likely competent enough with programming to be able to pick up the language de jour when they get there.

      Secondly, quite a few people think that a more functional style SHOULD be adopted in the real world. If we teach students functional programming when they are young, then maybe, just maybe, they will carry it with them INTO the real world.

      Usage of C++ isn't some huge, insurmountable mountain. It's thousands of people. If thousands of newcomes all do functional programming, then eventually, the real world will change.

      --

      You also might look into Squeak/Smalltalk, depending on your audience: http://www.squeak.org/

    2. Re:DrScheme by Anonymous Coward · · Score: 0

      I second that! There is also support for high-school teachers available in the form of the TeachScheme! project and workshop series. Other good choices are Squeak as already mentioned, and Logo. StarLogo is loads of fun and there are tons of cirriculums and fun exercises developed around Logo, and you really can't beat the easy to use multimedia capabilities combined with the hidden real-programming-language center.

    3. Re:DrScheme by justine_avalanche · · Score: 1

      I agree, Scheme's a really clean start.
      "Structure and Interpretation of Computer Programs" is a great book to learn programming. And it uses Scheme! And it's online: http://mitpress.mit.edu/sicp/

    4. Re:DrScheme by wargolem · · Score: 1

      Don't forget about DrPython and DrJava.

  22. Java & Eclipse by curious.corn · · Score: 3, Informative

    Really! Running programs from Eclipse is dead easy (no Makefiles) as is debugging the stacks (to see the how the clockwork ticking). Very visual, method completion, infopop javadoc, convention enforcing wizards and all (GUI too). Taking up Java with Eclipse is a breeze and Java itself has a nicely documented library for anything you want to play with and explore the basic practices of OOP.

    --
    Mi domando chi à il mandante di tutte le cazzate che faccio - Altan
  23. Pascal by jb.hl.com · · Score: 1

    I learned programming using Borland's Turbo Pascal (yes, Windows, not free as in speech (ZOMG)) and it certainly helped me learn some programming basics. I've moved on to learning C++ now and the Pascal background made it much easier.

    --
    By summer it was all gone...now shesmovedon. --
  24. GM by Daxster · · Score: 1

    My first 'real' language I learned was C++, but what led me to it was GameMaker (www.gamemaker.nl). It's a program designed to make games, but once learned you can create really quick apps (much like VB's RAD principle). GM is OOP-based, teaches a lot of things like GUI creation and making the back-end, and leads well into higher languages. It follows C-style syntax, but it lacks power, compilation speed, and flexibility..thus people will want to progress to different and better languages :)
    It's meant to be an easy game creation tool, and it does its job well.

    --
    Death by snoo-snoo!
  25. Why not C? by dasunt · · Score: 4, Insightful

    Why not teach them C?

    (Oooh, I can't wait to watch the modding for this comment.)

    C has a standard (a few, actually, C89 and C99 are probably the most important). Its not a difficult language to learn, its supported on almost every platform out there, and for certain tasks, its the only choice. Plus, there are many good support tools for C (gdb, valgrind, gprof, etc). Finally, many, many libraries are written in C -- C often ends up being the 'glue' code to tie another language to a specific library. And don't forget the many, many projects that already exist in C -- if you want to extend any of those projects, you need to understand the language.

    I always thought that assembly is not a bad teaching language either. It helps to understand how a processor works.

    I would also recommend lisp, but that has already been covered in this thread.

    1. Re:Why not C? by MerlynEmrys67 · · Score: 1
      Time to pull out the BS detector and examine
      and for certain tasks, its the only choice
      Now tell me, what is ONE thing you can do in C that you can't do in another language? And by another language I can mean anything from machine code, various architecture assemblers, C++, etc.. Now I would like you to list the things you CAN'T do in C, or are immensely difficult in C, but are quite easy in other languages (parsing anyone, memory management, Stack Frame manipulation, raw manipulation of registers - and no _asm bx, 12 doesn't count)

      That said - yes you can not get a driver checked into the mainline Linux kernel in anything but C -- but somehow I don't think that is your target audience

      --
      I have mod points and I am not afraid to use them
    2. Re:Why not C? by dasunt · · Score: 2, Insightful
      Now tell me, what is ONE thing you can do in C that you can't do in another language? And by another language I can mean anything from machine code, various architecture assemblers, C++, etc..

      Gotta weasle a bit: By saying "only choice", I meant "only reasonable choice".

      Short of assembly, C (or its cousin C++) is frequently the only reasonable choice for embedded programming (and lets be honest, for big projects, assembly is quite often not a reasonable choice). When resources are low, C shines. Interestingly, John Carmack had a blog just the other day about how you can use Java for cellphone programming, and detailed his gripes about the performance of Java on a cellphone.

      In addition, if you want to extend code written in C, you are going to have to know the language. Want to use a new C lib in python? Time to hack up a module in C. While this is true for any language, the sheer amount of libs and programs written in C is a strong incentive to learn C. (However, for the most common libs, there are often language-specific wrappers -- for example, pygames is a python wrapper around the C SDL libraries).

      Now, I'm sure someone is going to come up with an example about how to use a black candle, three monkeys, and the giant keyboard of Thor to use another language for a job that C has been traditionally good for. I applaud such a hack. But lets be honest -- the same thing that makes C a pain to use (manual memory management) also makes C a rather useful tool for some jobs.

    3. Re:Why not C? by Better+Than+Bacon · · Score: 5, Insightful
      When I first started with Java/VB, I found programming to be really hard. I decided to learn assembly/C++ and, just like dasunt said, I think they taught me how computers really work.

      Once I knew that everything is a just a number (pointers, instructions, everything) and that memory is just one big linear array, nothing was a mystery anymore -- I could figure out what the compilers and other languages were really doing. This put me way ahead of average programmers my age until 4th year university when they forced everyone else to learn that stuff.

      To be a good programmer I think you have to understand how computer really work, and C/assembly is the best way to pull back the curtain and be confident that you can get anything to work.

      On a related note, when people are teaching object oriented C++ to beginners, it's common to focus on the high level stuff (encapsulation, polymorphism). What I'd like to see is for them to mix in a little bit of "and here's how you would implement polymorphism in C" -- then people see how it all comes together. Er, well, that's what I think :~)

    4. Re:Why not C? by FireFlie · · Score: 1
      I would have to agree. Python's syntax (although very intuitive for most of us) may not be the best choice for beginners. Java can be problematic becase of how pickey it can be concerning syntax (in my opinion, don't flame me over this).

      C certainly can do anything that would need to be done (although I would imagine on a high school level you wouldn't need to do much with it). Sure it let's you shoot yourself in the foot, but I do believe that it is fairly easy for a beginner to understand.

      When you say beginner, however, I would like to know how far you would teach? Classes? Linking multiple object files? Headers? Depending on how simple you are looking for I would also suggest perl. Perl can be an extremely handy language, and it is one of the easiest languages to learn that I have ever dealt with.

      It is probably good to leave VB. When you want to teach someone how to program, teach them stuff on the command line, to get the feel for programming. dealing with GUI stuff just wastes time for a beginner.

    5. Re:Why not C? by BillyBlaze · · Score: 1
      I agree with C, for two big reasons. One, it's one of a few languages that it's possible to fully master. It's just not that complex. C++ introduces tons of special cases in its type system, and it hides more behind the curtains. Java simplifies this, but hides still more. Which is the second reason - C is much closer to the machine. As soon as you learn a bit of C, you should be familiarized with assembly language, the stack, etc., just so you get an idea of what's actually going on. Only then do you bother with object oriented programming and all the rest.

      Some might argue that being "close to the metal" is not a benefit, but I think it depends on what you want to do. If you're just trying to make one project, to hack together code once, hopefully working (not that there's anything wrong with this), then use a language that will let you do that. But if you want to make a career of programming, you're going to need to understand many languages, why they are designed how they are, and how to use them efficiently. This requires a good knowledge of what's actually happening underneath the hood, and so you may as well start with C. Plus, C syntax is the gold standard to which all other languages aspire.

      Once somebody wanted to learn about programming, and I lent him the K&R C book. I never got back. So screw it, teach them PHP or something.

    6. Re:Why not C? by shaitand · · Score: 1

      I have to second perl. There are a large number of different programming tasks out there, and for each task there is one or two languages that excel; but the tasks that perl excels at are the ones you need a tool to accomplish 90% of the time.

    7. Re:Why not C? by slubberdegullion · · Score: 1, Insightful
      Seconded.

      The great thing about knowing C is that most other languages can be understood in terms of C - after all, a lot of compilers have been written in C. So when the kids learn perl-style pattern matching, they can think about how they'd implement it in C, and they'll have some idea of how it might work, what might be efficient/inefficient, etc.

      If you teach a language like Java, on the other hand, students will be more likely to view stuff like lists as "magic structures" with certain strengths and weaknesses which must be memorized. This is OK if the goal is to make something that works, but not if the goal is to understand.

    8. Re:Why not C? by 91degrees · · Score: 2, Informative
      Now tell me, what is ONE thing you can do in C that you can't do in another language?

      Compile a piece of C code pathologically designed to break a C++ compiler.

      But less specifically, if your requirements are:
      • Fast.
      • Maintainable.
      • Capably of accessing memory directly.
      • Portable to different architectures.
      • Widely understood by programmers.
      C or C++ are the only reasonable choices.

      Assembler is not portable. Nor is it very maintainable.

      There are a few languages that will allow explicit memory operations, but most of them do not.

      Out of these, C is the most widely understood and the most widely ported. There are probably several embedded processors that don't have a port of C++ or pascal. Since C is also one of the most widely understood low level languages, the argument for any other low level language is weak. Hence, if you are forced to make a choice, the only choice is C.
    9. Re:Why not C? by jtisdale · · Score: 1

      I used to be one to argue against the use of perl as a first language. I have to say I agree with the parent now though. What I like about perl (in a "strict" environment with no/minimal module use) is how it can be a "gateway drug" to other programming/scripting languages. If someone has perl as a first language they can move on easily in the directions of shell scripts, C, and/or C++/Java. There is overhead obviously in all of these directions, but IMHO the overhead comes from learning what makes each language special and not basic syntax.

      The university I work at teaches java as an intro language. While I have no beef with java (it puts food on the table for me at the moment) I think some of the students get too caught up in trying to figure out OOP instead of the basics.

      If you need a language though that you can either move on from to learn more or learn and hit the ground running with it I would have to recommend perl.

    10. Re:Why not C? by cow-orker · · Score: 1

      Because every little mistake blows up in your face. Oh, arrays index from 0, not 1 as I thought? Segfault. You mean I need to allocate another char for the terminating 0? Segfault. gets cannot know where the buffer ends? Segfault again.

      If this teaches anything, it is that computers are mean machines with bad temper, best to be operated with full protection and long handled tools.

      Seriously, use something friendly for teaching, such as Scheme, Logo, Smalltalk, Haskell. Something that produces valuable error messages.

    11. Re:Why not C? by Intron · · Score: 1

      Your counterexamples make no sense.

      parsing - yacc spits out C code, not assembly. Maybe you can't write a good parser in C, but yacc can.

      memory, stack frame, registers - What language does allow you to touch any of these? The whole point of a language is to abstract the machine so you don't have to deal with the actual hardware. These things are managed by the compiler, not by the language.

      --
      Intron: the portion of DNA which expresses nothing useful.
    12. Re:Why not C? by MerlynEmrys67 · · Score: 1
      assembler lets you adjust memory, registers etc.

      As for parsing - I was thinking more along the lines of PERL rather than Lexigraphical Analysis.

      Ah - but the joys of writing fun code is when you have to do things that you aren't supposed to do - like code that is inserted into other processes, like code that watches networking traffic, like code that watches stack frames to see if they are smashed.

      So yes, if you want to write just another high level UI - you might as well never know how to do such things, but if you want to write a virus scanner, a personal firewall, or an buffer overflow prevention mechanism - you might want to look a little beyond C.

      What I think is funny - is no one has come up with a way of getting C to do such things - they keep pointing out its strengths - all I said is I don't believe the statement that C is the hammer for every nail in your Computer Engineering tool box. There are things you can't do with it and things that it isn't very good at. Thanks for pointing out compiler development as well.

      --
      I have mod points and I am not afraid to use them
    13. Re:Why not C? by MerlynEmrys67 · · Score: 1
      after all, a lot of compilers have been written in C
      A language isn't a real language until it has been implemented in itself. And in reality most compilers are written in lex/yacc/bison/etc. and then tweaked to generate the appropriate machine instructions from the parsing code.
      --
      I have mod points and I am not afraid to use them
    14. Re:Why not C? by Anonymous Coward · · Score: 0

      > many good support tools for C (gdb, valgrind, gprof, etc).
      you consider these good? for teaching?!?

      how can this be modded insightful? wildly inaccurate would be more descriptive

    15. Re:Why not C? by Eivind+Eklund · · Score: 1
      I like C a lot. It's my second favourite language.

      However, I've tried teaching beginners using C. It didn't work all; types, pointers, messy output syntax, etc came up too quickly.

      I've found it easier to teach non-programmer assembler/machine code than to teach them C. C is easy to teach to somebody that already know programming (in just about any language), though.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    16. Re:Why not C? by the+linux+geek · · Score: 1

      I learned C++ when I was 11. It's not hard to grasp, and after you learn C, other languages are much easier.

    17. Re:Why not C? by jerdenn · · Score: 1

      And in reality most compilers are written in lex/yacc/bison/etc. and then tweaked to generate the appropriate machine instructions from the parsing code.

      While this may be true for open-source and academic languages, I've yet to see evidence that these tools are used often in commercial compilers.

    18. Re:Why not C? by ccmay · · Score: 1
      Since C is also one of the most widely understood low level languages, the argument for any other low level language is weak.

      I must be getting old. When I was learning programming years ago, C was a high level language-- though, to be certain, on the lower end of the scale of HLLs. Has the definition shifted so much among CS professionals?

      -ccm

      --
      Too much Law; not enough Order.
    19. Re:Why not C? by James_Aguilar · · Score: 1

      That last bit is called "The Last Three Weeks of Compilers" at my school.

    20. Re:Why not C? by 91degrees · · Score: 1

      Not sure. I've heard it described as both a high level and a low level language. I think it depends on industry segment more than age. Presumably embedded programming types see C as a useful HLL whereas those who write a lot of server software probably don't.

      I used the term low-level because it does allow low level access to memory and IO.

    21. Re:Why not C? by lord_nimula · · Score: 1

      I'm a bit late to the game, but I agree that C should be taught early on, if not at the beginning. After a few decades, it's become the Latin of imperative programming languages.

      --Lord Nimula

    22. Re:Why not C? by qwijibo · · Score: 1

      I'd emphasize the value in learning a language that's widely available. C isn't an ideal starter language, but it is a useful and practical language. It's not very user friendly for beginners, but it's not likely that the average user is going to outgrow the functionality of C.

      I see a lot of recommendations for Ruby, Python, and much more obscure languages. As a point of reference, I looked at one of the Unix boxes that I don't run at work. I like to provide useful tools so developers can choose the right tool for the job. Not everyone takes such an enlightened view of tool selection. The box I don't administer has C, Java, and Perl. It does not have PHP, Python or Ruby. It also doesn't have emacs. While it's ok to have an emacs vs vi preference, you better know enough vi to get around. This is a Sun E25K supporting hundreds of users for a large company. This may not be representative of what systems students would end up with accounts on, but I don't think it's uncommon to run across systems that don't have utilities/languages I install on my machines.

  26. TurboPascal was great.. by SocialEngineer · · Score: 1

    I did my programming in HS with TurboPascal, in a "Computer Math" class.

    It was just me and a few honor-role students (lets just say I got bored easily, so I sluffed off.. I have no problems being a B student). None of them really had any aptitude for programming, but the language itself worked well for them because of the syntax. We wrote simple games, stuff to do our math homework and difficult calculations, and the like. I ended up writing a printing program for printing out our source code.

    Great part about Pascal in general is that it is a great precursor to C, or C++.

    However, if you are going to insist on them having a language that they'll be able to use in a professional (or semi-professional) environment, you've got another vote for Python here. Perl is also good, but it'll be more difficult to learn.

    --
    "Better to be vulgar than non-existent" -Bev Henson
  27. python is a good beginning by swf · · Score: 5, Interesting

    I've found that python works really well as a beginning language. Python (and many other interpreted languages) let you write fully functional programs with very few programming concepts. It's really easy to introduce one concept at a time, focus on it, and then use that to introduce the next.

    You can start small by using the interpreter as a calculator, then move the caculations to a script and executing that. After a while you can gradually introduce variables, comments, functions and modules. After that, you could introduce the standard library and show how to print the contents of a file or download a web page. Or you could introduce the OO concepts of classes, encapsulation, polymorphism and inheritance. It's really up to you and how well your students are going.

    Advanced students should also be able to create simple GUI or command line interfaces. Python has a great base class for command line programs that takes away most of the tedious parts. It also has some simple and easy database modules if you want to teach relational databases and SQL as well as programming.

    But don't forget that the most important thing to do is to teach them how to teach themselves. Show how to look through the standard library for something new, or how to find and install new modules from the net.

    When everyone has become comfortable with the language (and if you have the time) you can introduce a similar language for contrast. I've found that people who have experience with a wider variety of languages tend to be able to "grok" programs a bit easier than those who haven't.

  28. Perl. by Pacifix · · Score: 4, Funny

    Perl. We don't need any more competition! Perl should just about scare the living daylights out of them.

    1. Re:Perl. by ggvaidya · · Score: 1

      OH:, $come_on = perl() if(/well_written/);
      can_be($a_lot_of_fun) unless($you =~ /don't know what $you're doing/);

    2. Re:Perl. by smbarbour · · Score: 0

      If scaring them away is the goal, why not teach brainf*ck?

    3. Re:Perl. by Pacifix · · Score: 1

      I just wanna scare 'em, not kill 'em

  29. Ruby or Scheme perhaps by Anonymous Coward · · Score: 2, Interesting

    PHP or Ruby on Rails; but are not convinced that they lead well into higher level languages.

    Uhm, PHP and Ruby shouldn't be mentioned together like that. Ruby *is* a higher level language compared to PHP.

    But that's not really important to a *beginning* programmer. What you really want to do is first teach the basics, then immediatelly teach about "best practices", like keeping code simple and clean, writing *TESTS*.. unit testing should be taught AS SOON AS POSSIBLE in my opinion. Ruby makes it easy and doing it "test first" (write the test first, then write the code) makes it even easier.

    If you want to them to understand the basics of functions and programs teach them Scheme. You can do some cool stuff with DrScheme. Then when they get to Ruby (or PHP) they will see how it's a "downgrade".

    But yeah you'd probably be better off with a language that gives them room to grow like Ruby, rather than locking them in the little space that PHP offers.

  30. C# or Java by Ratbert42 · · Score: 1

    I'd need a really good argument to not use Java. A decent Java developer is harder to find than a C++ or even a C# guy. Tools like Eclipse are free and there is a lot of free online documentation. And it's easier to build a quick GUI in Java than C++.

    1. Re:C# or Java by thephotoman · · Score: 1

      Redistrobution is a bitch. Furthermore, it doesn't run on more exotic platforms, as you can't get in there and compile the JVM for your OS/architecture. Who's to say they're not running Linux on ARM/Alpha/whatever at home?

      Mod this comment, not parent, -1, Pedantic.

      --
      Haec merda tauri est. Ceterum censeo Carthaginem esse delendam.
    2. Re:C# or Java by BillyBlaze · · Score: 1

      A good argument against starting with Java? Simple - references are obvious if you understand pointers, but pointers aren't obvious if you understand references. And eventually you'll need to learn about pointers.

    3. Re:C# or Java by Sigma+7 · · Score: 1
      I'd need a really good argument to not use Java. A decent Java developer is harder to find than a C++ or even a C# guy. Tools like Eclipse are free and there is a lot of free online documentation.

      Generally, Java picked up an early rep of being "slow" (which is no longer as true with JIT), and that repelled some people. Also, Java can be slightly harder to learn from C++ as OOR is now considered mandatory in that language.

      If you want a reason to use C#, then you might as well take a peek at the language to see how it works. This isn't really a reason for C# - just a reason to understand a programming language.

      And it's easier to build a quick GUI in Java than C++.


      Not really - it's about the same in either language, provided that you know how to program for the GUI.

      The only reason it's "harder" to build a GUI in C++ is because you have to write for some random GUI system that you have to learn about (because the base language didn't include any portable GUI function calls, leaving the work to 3rd-party libraries.)

  31. Logo? by thegrassyknowl · · Score: 2, Interesting

    I remember learning to program in BASIC during my very early years. I hated it. I still hate BASIC, it was crap.

    I also remember learning Logo when I started at high school. That little turtle that pottered about on the floor was really cool, and it had all of the concepts that a programming language needs.... loops and conditionals! Having a real-world output from the program was a good way to inspire students to learn it - everyone really enjoyed it.

    There are some gizmos now called the MicroMouse or somesuch. It's a little PIC powered rover that is similar to the Turtle. You program it up with a simple dialect of C, and download the code into the PIC. The development environment comes with all the libraries to make things like starting motors and reading switches easy from the C code. That might be a good way to teach the basics without boring students that otherwise don't see a use for it :)

    Those that enjoyed it enough went on to study the more advanced stuff in later years of school.

    Of course, my days in Logo were back when the BBC 8-bit micro was new and powerful.

    --
    I drink to make other people interesting!
    1. Re:Logo? by deeny · · Score: 1

      I also remember learning Logo when I started at high school. That little turtle that pottered about on the floor was really cool, and it had all of the concepts that a programming language needs.... loops and conditionals!

      I have to admit that I always envied the people who learned turtle graphics (at the time when it was au courant).

    2. Re:Logo? by thegrassyknowl · · Score: 1

      I have to admit that I always envied the people who learned turtle graphics (at the time when it was au courant).


      I feel better for having learned it. Gone are the good days of computing. Now it's all VisualCRAP.

      --
      I drink to make other people interesting!
    3. Re:Logo? by chthon · · Score: 1

      Taking this comment and some of the previous about QBASIC together : I once implemented a turtle library together in QuickBasic (and who remembers that :-) ?

    4. Re:Logo? by thegrassyknowl · · Score: 1

      I once implemented a turtle library together in QuickBasic (and who remembers that :-) ?

      Not me :) I avoided the ye-olde QBASIC...

      --
      I drink to make other people interesting!
    5. Re:Logo? by Kymermosst · · Score: 1
      Taking this comment and some of the previous about QBASIC together : I once implemented a turtle library together in QuickBasic (and who remembers that :-) ?

      Hah, here's some of my QuickBASIC 4.5 accomplishments (Note to other posters, QuickBASIC and QBASIC are NOT the same thing.)

      • I wrote a PILOT interpreter.
      • I wrote a .mod player using a C library
      • I wrote a BBS external answering program with ANSI auto-detect and some other features.
      • I wrote some BBS doors.
      • I wrote an implementation of Conway's Life


      I also had VB 1.0 for MS-DOS, which was pretty interesting, though it added godawful code bloat if you made use of the forms and such. I did make a good tagline manager program for .QWK offline mail readers (from the BBS days).

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
  32. May I suggest.... by Seraphim_72 · · Score: 3, Informative

    That you find a book first. In fact - find Head First Java" IMHO the best book to teach teens about programming. Next arm yourself with a woman of renown to teach object orientation, namely Alice, she will amase you and your teens. Lastly, once they have the basics down after the new year, get them up and running Code Rally and the winner of the Grand Prix gets extra points towards that grade!!

    Sera

    --
    Slashdot, where armchair scientists get shouted down and armchair theologians get modded up.
  33. Python by YA_Python_dev · · Score: 1

    I think we will have a bit more good programmers if they start to learn programming with Python: concentrate on the algorithms not on irrelevant details.

    --
    There's a hidden treasure in Python 3.x: __prepare__()
  34. Old Basic by photon317 · · Score: 1


    I was thinking about this (from the perspective of what I would do to educate a promising youth with no programming experience who seemed to have a the right mind for it) same sort of topic a while back, and here's what came of it:

    First, kill Visual Basic - that's just plain bad.

    Also note that you'd need some good emulators or some old-school hardware for some of this (although you might be able to build/find new DOS-era hardware based on Intel's 386EX chip, I think they still make it for little embedded systems, anyways..)

    I would start a programming-illiterate person off in plain old BASIC (like, the kind you did in old MS-DOS, or the Apple ][, etc). No Visual anything, no windows, nothing complicated.

    Start with "Hello World" and move up from there to the kinds of simplistic text-based applications and games one used to see source code for in 3-2-1 Contact

    In parallel, teach them very basic electronics - the kind you'd learn from those old Radio Shack 423in1 electronics kits. Battery, LED, resistor, switch. Move from there to very basic digital logic using TTL or CMOS chips to teach them about the binary system and binary logic, finish it off around the level of making neat little circuits with the logic chips and a 555 timer or something. (They could of course branch out on their own beyond that).

    Around the time both of the above are going well, introduce them to PEEK and POKE in BASIC, tell them more about the hardware in the system, show them how to directly manipulate video memory via PEEK/POKE to the mapped video-ram addresses, etc. This transitory phase will go quickly.

    Next you step them right on down to early x86 (no more than simple '286 instructions are neccesary, screw protected mode and all that jazz for now) assembly, with a text editor and MASM/TASM. BASIC is no longer useful. Let them learn all over again to write those same little console games/apps in assembler. Get some good books on the subject for reference guides.

    Once their assembly code starts getting a little unwieldy and difficult to debug due to complexity, introduce them to better ways to manage their code than BASIC-style linear programming. Show them to organize their assembler code into little libraries of subroutines with standardized calling interfaces, etc. Once they're comfortable, and they're ready to start making even more complex software, but the complexity of doing it all in ASM is slowing them down (But they are using some good functional-style technique)...

    Switch them over to C. Show them how C is like platform-neutral assembler that's easier to write and maintain. You might well wean them off of DOS and head straight to Linux for the C part. Stick again to text-console software, no crazy graphics libraries or anything. As they're getting used to C and getting used to the Unix shell in general, touch on unix shellscripting - and later as their C starts getting decent show them perl.

    After that, they're pretty much good to go in any language with Google and/or the O'reilly section of their local bookstore at their side.

    I think part of the natural advantage programmers of my era have (~30 years old now) is that we grew through a lot of these stages naturally as they evolved around us in popular geek culture (if that's not an oxymoron). More recent guys are in some ways crippled by not having the benefit of going through these stages sans modern amenities and languages.

    --
    11*43+456^2
    1. Re:Old Basic by Travelsonic · · Score: 1
      First, kill Visual Basic - that's just plain bad.

      Elaborate please, anybody who has had enough time can really program some killer things, and with addons like VGL (www.angelfire.com/games4/hotrodx/) and DirectX make making games not easier, but more managable and do-able.


      I am defending VB because it was the first language I learned for it's simplicity, and sometimes I still use while learning the others (ASM, C, C++, Java,ETC) and think that an absolute beginner should not be rushed into things - start with the basics, which I think this does fairly well.


      I hate this killer attitude towards the basic languages displayed in this topic so far. Yes, it is limited, but this article is about beginner programming after all, or is there such a thing as being title-blind?

      --
      If you believe in privacy, and believe you have "nothing to hide" at the same time, you're a goddammed idiot
    2. Re:Old Basic by photon317 · · Score: 1


      Did you read beyond that first line? I advocated starting with old-school basic, which is even more basic than Visual Basic. I specifically think one should stick to old Basic rather than new Visual Basic to avoid the fact that there are complicated addons like VGL, DirectX, Database access.. not to mention the integrated IDE of sorts. Basic programming should be taught with truly Basic tools, from back in the bronze age of computing.

      --
      11*43+456^2
    3. Re:Old Basic by Travelsonic · · Score: 1
      I specifically think one should stick to old Basic rather than new Visual Basic to avoid the fact that there are complicated addons like VGL, DirectX, Database access.. not to mention the integrated IDE of sorts

      I would hardly call VGL complicated, in fact, when compared to making games in DirectX, VGL makes VB game programming very easy.

      --
      If you believe in privacy, and believe you have "nothing to hide" at the same time, you're a goddammed idiot
  35. Java, then assembly language by MobyDisk · · Score: 5, Insightful

    Here's my qualifications for choosing Java, then Assembly:

    Java:
    - Is not too verbose (Hello World is not daunting)
    - Any algorithm can be reasonably implemented
    - Any structure can be reasonably represented
    - No low-level complications like pointers
    - Supports modern programming techniques like functional and O-O
    - The student can do real-world things in it
    - The student can experiment at home for free

    Don't forget assembly!!
    - Too many new programmers need to do something low-level, or interoperate with another language, and they have no concept how memory is arranged, what source code compiles down into, or even what a compiler does! They don't comprehend that a string isn't an intrinsic thing the CPU recognizes, and that there are hundreds of ways to store and manipulate them. So when they have to learn about memory-thrashing, multithreading, garbage-collection, optimization, etc. they are lost.

    This must be taught this very early on, not as an advanced course, so that when they learn other lagnauges and algorithms they can see where it comes from.

    1. Re:Java, then assembly language by YA_Python_dev · · Score: 1
      Java: - Is not too verbose (Hello World is not daunting)

      May I suggest you to try to write an hello world program in Python, Ruby, Basic and Perl and then compare them with the smallest hello world that you can get in Java?

      Languages like C, C++, Java and C# have some uses, but even a simple hello world requires a lot of black magic for a novice.

      --
      There's a hidden treasure in Python 3.x: __prepare__()
    2. Re:Java, then assembly language by Anonymous Coward · · Score: 0

      What???? Java most certainly does have pointers!

    3. Re:Java, then assembly language by BillyBlaze · · Score: 1
      Why are pointers a bad thing in a beginning language?

      I'm sophomore in CS who taught myself to program (QBASIC, ugh) in 3rd grade. When that got too limiting, I learned C. Pointers were a bit confusing, but now they're second nature. A good portion of my classmates, however, were first introduced to programming in CS125, taught in Java. People were having real trouble understanding recursive functions. In CS225, taught in C++, pointers are eating them alive.

      So first teach them C, and a big part of that is the layout of memory, what a pointer is, and the stack. Spend one lesson on function calling conventions. Then it's obvious how recursive functions work. Then, since pointers are a much more concrete concept than references, when it comes time to learn about Java's references, it's much easier.

      Also, I think there ought to be some sort of introduction to the command line. That's also very informative about how computers work, and it's hard getting people to experiment with compiling programs when they have no idea what a relative path is, or what cd does, or what stdout is.

    4. Re:Java, then assembly language by johnnliu · · Score: 3, Insightful


      I agree highly with the point about assembly language. While I think no school should teach students to write serious programs in assembly, I'm shocked at the fellow programmers that I talk to today who have no real idea of what a 'memory overflow' really is, or why is it called a 'overflow', why not just 'insufficient memory'. They don't understand the differences between stack or heap, what is a null-pointer, and have difficulty in understanding concepts such as arguments pass-by-reference and pass-by-value (for object references).

      When they start to use Java or .NET, they can't understand what's so great about garbage collection, and when they write C++... Arrggh memory leaks galore (and/or segfaults), and then they ask - what is a segmentation fault? Why is it called a 'segfault'?

      While I had no particular love for assembly or compilers back in the university days when I 'had' to write them to graduate, looking back, they laid a foundations of understanding what exactly is going on in the machine. I'm grateful for that lecturer whose name I've forgotten in the particular choice of assignment. :)

      ---

      Anyway, I think people who want to take writing software seriously needs to know this stuff - sooner or later. It's like a carpentry artisan needs to know about wood, and not just about carving.

    5. Re:Java, then assembly language by Anm · · Score: 1

      No. Java has references. Pointers are numerical memory addresses. References are language constructs to refer to objects in heap memory, but deny access to reading and, more importantly, writing the memory address. This prevents several difficult bug types from cropping up, and allows the virtual machine to move objects around memory at runtime.

      Anm

    6. Re:Java, then assembly language by freality · · Score: 1

      The only thing I'd add to this excellent point about assembly is that it's really a jump-off point for the rest of machine architecture. A real assembly language is pretty hard to teach all by itself and would probably need to be motivated by a deeper architectural course anyways.

      Architecture is awesome. What is a CPU anyways?

      In college we implemented a CPU, but from two very different perspectives.

      The first was in a logic course, where we learned the basic boolean operations and then in one single homework assignment had to put them together into a functional CPU (mux, demux, addr... all the way to registers, cache and ALU).

      The second was a hardware course where we started with Radio-Shack gates and a breadboard and worked our way up to Xilinx chips and Verilog.

      Now, I still don't understand why a PnP junction works (depsite some excellent attempts by physics friends to describe quantum wells), but I know it exists and I can basically take it from there ;) That's a foundation you feel free to experiment on!

      BTW, I know you just asked about programming languages, but even in a very limited course, don't set your sights too low. I once did a few week park grass planting project with some city youths. At the beginning of the project the daily conversations were dating, trouble and rap. By the end of the project we were talking about the finer points (for a layman at least) of relativity theory :)

    7. Re:Java, then assembly language by cerelib · · Score: 1

      Good call. The Java Hello World program definitely has some black magic. What the hell does "public static void main(String[] argv)" mean to a Java newbie? I will tell you what, not a damn thing.

      public class HelloWorld
      {
            public static void main(String[] argv)
            {
                    System.out.println("Hello World!");
            }
      }

    8. Re:Java, then assembly language by cyclomedia · · Score: 1

      ...who have no real idea of...a null-pointer...

      i actually find that seriously quite shocking, over and above the rest

      --
      If you don't risk failure you don't risk success.
    9. Re:Java, then assembly language by cavemanf16 · · Score: 1
      I'm not a programmer in my day job, but I'm finishing up my BS in CET at nights while being a Business Analyst in the day. I can honestly say that Java is indeed one of the easier to "get the hang of" languages that I've programmed in so far. (And NetBeans sucks... use Eclipse instead)

      However I never truly grasped the nature and intracacies of software programming until spending last year slowly learning Assembly. I now actually understand how to think more critically about how to structure a program (and why code re-use matters!) to make better and more 'proper' use of the hardware in my computer. I know it sounds all cliche and such, but Assembly language knowledge has really furthered my total understanding of what a computer is, and how it does what it does.

      My suggestion would be to teach the intro course in Java, AND THEN teach an advanced course in Assembly w/ Java so the kids can see:

      1. The simplicity of how a computer interprets all the one's and zero's flying around inside its circuits, and
      2. The simplicity of a language like Java which basically allows one to mix and match algorithms, GUI's, and all the other stuff of a modern PC without worrying about the innards that hold it all together.
      If I had received that type of introduction I might have been more willing to stick it out in an engineering degree during the first 4-5 years after high school and then go on to more scientific type research work rather than having gotten bored of school and dropped out temporarily to work like I did. We only programmed in crappy QBasic in HS, and I really regret that experience.
    10. Re:Java, then assembly language by prefect42 · · Score: 1

      You're right, although that only goes to confuse people when they get a NullPointerException...

      Poor wording I feel.

      --

      jh

    11. Re:Java, then assembly language by cow-orker · · Score: 1

      - Is not too verbose (Hello World is not daunting)

      Compared to what? Even the C version of HelloWorld is shorter! For larger programs, Haskell tends to be 10x shorter than Java. If Java is not verbose, what is?

      - Supports modern programming techniques like functional

      Certainly it does, with all that support for higher order functions, dynamic closures, lambda abstraction, easily constructed lists and tuples, algebraic datatypes and pattern matching.

      Please stop the bad propaganda.

    12. Re:Java, then assembly language by Anm · · Score: 1

      I've alwaysthought the same thing.

    13. Re:Java, then assembly language by forkazoo · · Score: 1

      I agree with you completely about assembly, but not Java. Too much black magic for a newbie to feel he is in controll.

      Personally, I love C, but they may be a bit arcane. Others have suggested python, and I am inclined to agree.

      Teach the fundamentals of assembly, build everything larger in python, and do a little whizzy OpenGL in python to catch everybody's attention.

    14. Re:Java, then assembly language by Anonymous+Brave+Guy · · Score: 1
      Java:
      Is not too verbose (Hello World is not daunting)

      Java is not verbose? You have got to be kidding me. Java has more clutter than almost any other language I can think of. If writing hello world takes more than two lines of code, your language is somewhat verbose; many can do it in only one.

      Any algorithm can be reasonably implemented

      Nope. The absence of simple tools like value semantics makes implementing a lot of algorithms a royal PITA.

      Any structure can be reasonably represented
      No low-level complications like pointers

      Those two statements are almost mutually exclusive, and Java doesn't support any of the alternative tools that caused me to write "almost".

      Supports modern programming techniques like functional and O-O

      I assume from this that you don't know what functional programming is, becaue Java's support for it is negligible.

      OO shouldn't be taught in a beginners course anyway. Teach it after they understand the basic concepts.

      The last two points I'll give you, for a final score of: 3/7, must try harder!

      You're right about the importance of understanding what happens under the hood, which it why I'm so surprised that you also recommended Java. Assembly and some very high level language I can see, but Java's always been a sort of bastardised half-way house between C's "portable assembly" and real abstraction and high level concepts. As a pragmatic tool, that might be fine, but as a learning aid, it's terrible.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    15. Re:Java, then assembly language by Eivind+Eklund · · Score: 1
      "Is not too verbose".

      I do not know of any (actively used) language that is MORE verbose than Java. Can you name one?

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    16. Re:Java, then assembly language by Kymermosst · · Score: 1

      While I think no school should teach students to write serious programs in assembly

      Why not? Plenty of serious programs have been and are implemented in assembly language.

      Hell, we had to implement a rudimenatry MIPS disassembler in MIPS assembly in Computer Organization, which is the first upper-division class taken by CIS majors at my school.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
    17. Re:Java, then assembly language by rhendershot · · Score: 1

      >>The Java Hello World program definitely has some black magic.

         As a longtime java programmer I'm sick up to my ears with this strawman.  HelloWorld is NOT an educational tool, it's an installation validation tool.  Use it to verify things are working.  Just like you do with "print 'Hello World.'" in python.

      P r o g r a m m i n g  needs to be learned by concept.

      class A {
         private int count = 0;
         public boolean doWork(){
            int++;
         }
      }

      ...along with a tool to exercise A.doWork() (IDE, Main class, etc.) goes a lot further in introducing the event-drive, component nature of the entire computing landscape.  ML programs, for example, don't even load the next address until a clock event to the CPU; when the user clicks on Submit or changes the size of a window, they're emitting events and messages.

         Python provides no contract.  Classes can be dynamically modified.  Return types and arguments' type are indeterminate.  Yeah it's easy.  So what.  Should the real complexity of Computer Science be hidden until 3rd year?  4th?  On the job?!  Thanks, but we have enough graduates who can barely decompose a problem and generalize already.

         That said, I like Python. I intend to use it more in my own work.  As part of an IT Systems Administration curriculum it makes sense to me.  But preparation for folks who will quickly need to grok client/server, event-driven, threaded applications?

         May as well teach using javascript.  At least that would force an acknowledgement of DOM and prepare a foundation to XML.

      </rant>  ;)

  36. assembly! by Unordained · · Score: 1

    Seriously.

    AT-Robots or some other assembly-like language to teach them how to program with registers, conditional jumps, interrupts, and all that. They'll later realize they hate goto from this. But mostly it's really stinkin' fun, and they'll hardly realize they're programming. Instead they'll be thinking about the problem they're solving, trying to beat each other in competition.

    Then a language like C, to learn about functions, loops of various sorts, pointers, maybe even function pointers. This is when it gets boring.

    Then a few other languages to learn about OO, dynamic typing, etc.

    They really should be exposed to both interpreted and compiled languages, strongly typed and otherwise, with and without OO, ... learning to program isn't about learning to program -something- in particular.

    I would object to teaching them specifically "Ruby on Rails" -- that's like teaching someone how to hammer together a bird-house, as opposed to teaching them to be a carpenter. Also make sure they know the difference between a language and a library, if you can make that distinction.

  37. Anything that starts with "C" by frenchs · · Score: 2, Insightful

    Let me start this post by putting on my flame-proof suit. =)

    In order of preference:
    1. C++ - but don't move into the advanced features right off the bat. I like string handling better than C though, so it gets the nod for the top slot. But the user would have to learn the compile process. Templates, STL, and OOP can all be added once you have the basics down.
    2. C - pretty much on par with C++ in the features you would want to introduce to a beginner.
    Ones I'm unsure on:
    • Pascal: I can't comment on this one, but it's supposedly well-suited for teaching.
    Ones I wouldn't touch for intro programming because of syntax.
    • Python
    • Ruby
    • Lisp

    These are all fine languages, but they all have specialized syntaxes, and the bridge between that, and their *next* language would be where you do them a disservice by using these ones.

    Other poor choices:
    • Perl
    • PHP

    Perl, which has a reasonably decent syntax, but because of the TIMTOWTDI philosophy, it's actually, IMHO, an ill-suited introductory programming language.

    PHP, while similar syntax to C/C++, has the benefit of not having to learn how to compile apps. It's ultimate downfall is it's scoping rules and lack of namespaces. This is stuff an intro programmer should learn about.

    1. Re:Anything that starts with "C" by deeny · · Score: 1
      PHP, while similar syntax to C/C++, has the benefit of not having to learn how to compile apps. It's ultimate downfall is it's scoping rules and lack of namespaces. This is stuff an intro programmer should learn about.

      I think compiling should be a second year thing, at least for high school.

      My order of preference:

      1. Ruby
      2. Squeak
      3. Scheme
      4. Python
      5. Java
      6. light PHP in the context of an HTML class
      7. C or C++
      8. ...anything else...
    2. Re:Anything that starts with "C" by deeny · · Score: 1

      Actually, I'd put Pascal below C at this point. I think teaching OO concepts is important and Pascal falls down on that. I used to like it -- ages ago.

    3. Re:Anything that starts with "C" by Procyon101 · · Score: 1

      Not moving on to the advanced features just yet is exactly why I would teach Java first before C++. Java is like C++ with training wheels. It supports all your basic OO in a very constrained format that makes it hard to make dumb mistakes in. It teaches you interface based programming, single inheritance models and other good OO techniques. Too many new C++ programmers start multi-inheriting and dynamic casting right off the bat and end up not learning the importance of KISS until they really get bitten by it. Later, after they have all their good habits well ingrained, take off the training wheels and show them C++ where they will still use all the good habits, but see the benefit and magic of occassionally shoving default implementation into the interface, or templatizing implementation superclasses. If you give them C++ too early they will be too apt to spend all there time exploring the esoteric instead of the fundamental.

    4. Re:Anything that starts with "C" by poopdeville · · Score: 1
      Perl, which has a reasonably decent syntax, but because of the TIMTOWTDI philosophy, it's actually, IMHO, an ill-suited introductory programming language.

      Fair enough. Personally, I think Perl would be a great introductory language. Sure, TIMTOWTDI when you write Perl. But you don't have to teach students the whole language. You can teach them a nice subset to illustrate how the fundamental algorithms work. And you can do it without introducing much black magic. Indeed, a C-like fragment of Perl would be a better C than C.

      --
      After all, I am strangely colored.
    5. Re:Anything that starts with "C" by STFS · · Score: 1

      Anything that starts with "C" CFML? Cobol? CHILL? CMS-2? Common Lisp? Coral 66? CSP? cT? Curry? and last but certainly not least: csh!? Be careful what you post!

      --
      You don't think enough... therefore you better not be!
    6. Re:Anything that starts with "C" by theonetruekeebler · · Score: 4, Funny
      Java is like C++ with training wheels.

      Java is C++ without the giant rotating knives.

      Java's "music" class library appears to support every musical instrument in the symphony but on closer inspection requires you to understand metallurgy before you can instantiate a trombone, and spit valves are in the open position by default. C++'s music library on the other hand assumes that all brass insturments are, at their most fundamental level, a kazoo. You can drive it with anything from bare lips to a jet-powered compressor, but despite Stroustrup devoting eight pages to protected abstract virtual base pure virtual private kazoo destructors, never once in the 20-year standardization process did anyone notice there is no member function called play().

      --
      This is not my sandwich.
    7. Re:Anything that starts with "C" by Eivind+Eklund · · Score: 1
      I think your syntax evaluations are, basically, wrong. Actually, I think choosing something with a somewhat different syntax is specifically a good idea, to avoid new origranns going into the trap of thinking they can't switch to languages with a differnt style syntax. If they don't get used to switching syntaxes, how are they going to learn SQL, TeX, VB, shell/monad scripting, or functional languages?

      And Ruby/Python really have quite conventional syntaxes - there's some small details that differ - primarily, whether {};, keywords, or whitespace is used for statement blocking and termination.

      Also, calling Perl's syntax "decent" and protesting against Python/Ruby shows that you do not program Perl, Python, or Ruby much - and as a such should not comment. The perl syntax commonly includes things like @{$wrapdata->[@{$pagelines[$page]}]} and is basically insane; it's a result of the bolt-on nature of perl development. This even carry into using a hack to pass parameters to functions.

      My experience with using C to teach beginners was that C was quite difficult to teach, compared to Basic/assembler/Pascal. C++ would have the same problems, and add an arsenal of new and interesting foot-shooting devices (e.g, references, which regularly I see programmers with years of experience abuse, making it necessary to memorize every function/method signature in the program to be able read code reliably).

      My opinion is that C is a very good second language, and C++ is probably a good fourth or fifth programming language.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    8. Re:Anything that starts with "C" by Anonymous+Brave+Guy · · Score: 1
      Java is C++ without the giant rotating knives.

      The thing is, giant rotating knives aren't dangerous if you've grown up with them around all your life, and staying out of their way is second nature to you.

      On the other hand, walking into a room with giant rotating knives without knowing they're there or how to avoid them is a recipe for disaster.

      The application of this analogy to Java's "safety" features is left as an exercise for the reader.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    9. Re:Anything that starts with "C" by GreatBunzinni · · Score: 1

      I hope you aren't evaluating languages and giving them absolute ratings based on the libraries which are available to them.

      --
      Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
    10. Re:Anything that starts with "C" by Anonymous Coward · · Score: 0

      He isn't.

  38. Perl by dreamer-of-rules · · Score: 1

    Teach 'em Perl. Teach loops, pattern matching, and `exec` statements. These can be kept very english-like. The more adventurous students can explore either more advanced or esoteric Perl (to show them some Martian Perl, show some "Perl Minigolf" examples).

    Perl is a quick and dirty way to automate anything. Running programs on a recurring basis, testing file structure and existence, querying SQL databases, accessing internet resources. Nearly any job involving running a computer program could be made easier using Perl. Perl is also cross-platform, unlike VB or Cocoa.

    The thing I like most about teaching Perl is that you can start with a three line useful, working program. Then modify it to solve different problems, each time introducing a new concept or command.

    Please make useful examples. None of those $car_object->turn_left() abstractions.

    --
    Everyone is entitled to his own opinions, but not his own facts.
  39. Avoid all languages with big libraries by Julian+Morrison · · Score: 1

    If you teach VB, PHP, Perl, Ruby, Python, Java then your students will spend most of their time gluing together other people's library code. This is boring, uninformative, and gives a false and anticlimactic sense of early achievement. Yes, five minutes in VB will glue together a working text editor. And you learn nothing in so doing. Similarly PHP for a website.

    Good languages to start programming have a simple core library that does basic IO and data manip, and nothing else. The best are probably Scheme or C, depending if your focus is academic or technical.

    1. Re:Avoid all languages with big libraries by GnuVince · · Score: 1

      Students won't use all the billion C modules on the net? I agree with the choice of Scheme, but I would also add Python and Ruby to the lot.

    2. Re:Avoid all languages with big libraries by Darth_Burrito · · Score: 1

      The ability to create something useful provides motivation for learning. By providing libraries, languages like php and perl provide the ability to create something useful with a relatively low cost in terms of skills. If you show someone they can build something useful like a text editor, they will then see/want to make enhancements.

      Nothing is more boring than writing BubbleSort in C++, then QuickSort in C++, then MergeSort in C++, the InsertionSort in C++ (was that the same as Bubble?). As a computer science student, I think my three biggest programming assignments were all some variant of make-a-compiler-or-interpretter. Talk about incredibly dull.

      For me the excitement comes out of taking those different libraries and putting them together to form something useful, and then finding more and more efficient ways to do it so that the time between creating an idea and realizing it shrinks to nil.

      The end is the motivation for learning the means to the end. Most programming courses forget this.

  40. Bwa? by Jerf · · Score: 1

    I'll echo the "Python" recommendations, tempered by the fact that a Rails-like framework may be a good idea. On the other hand, it may involve learning too many things at once; I've been web developing for just shy of ten years now and it's hard for me to feel how hard this stuff is. But take Javascript, HTML, Ruby, the Rails framework, and a couple of things tossed in for good measure, and it may prove a bit much. (Or not. I happily defer to anyone who has actually tried to teach programming starting people from scratch from Rails. But I think I'd start with a tech that is made out of less acronym soup.)

    But what I really wanted to comment on was:

    We have been toying with the idea of having the introduction course be in PHP or Ruby on Rails; but are not convinced that they lead well into higher level languages.

    Bwa? Check your terminology. Ruby, Python, Perl, and the like are the highest level languages there are for general use at the moment. They can hardly fail to lead well into themselves.

    (PHP is deliberately not in that list. I would not start them there. PHP requires immense discipline to use properly and there's little gain to be had for that discipline. I'd say it's the closest candidate for a modern heir to the "You can't teach a Basic programmer how to program" meme from Dykstra; in some sense it's not a "bad language" but it definately teaches a lot of very bad habits, with a community that enables this behavior. Your students should not end up on Bugtraq with their school project.)

    In fact, you'll be jumping those kids ahead of a lot of Old Farts (TM) who still look down on those languages for a host of misguided reasons and insist on using C, not because it's the best choice for some good reason (like a cross-platform library, for which it is still King), but because they honestly think it's the best choice.

    Your danger is that if the kids are ever presented with C, they'll wonder why the hell anyone does things in such a baroque fashion and they'll refuse to be placed into that sort of bondage. Me, I consider that progress, but YMMV.

  41. My experience by Wolfbone · · Score: 1

    I suffered an introductory course in programming in VB while studying physics at university and despised it. Later I was fortunate enough to come across SICP and the SICP videos when I decided I needed to learn programming in earnest but if I'd been stuck with something like C++ or BASIC or Java, I suspect I'd still have found programming a tedious and unrewarding distraction from real maths and science and never really understood its potential. Now I actually like and respect it and there are good resources available for high school level stuff:

    http://www.teach-scheme.org/
    http://home.adelphi.edu/sbloch/class/hs/testimonia ls/

    Apparently Scheme/Lisp appeals even to 'liberal arts' types and though I'm not one of those myself it certainly rapidly transformed my attitude to and understanding of computing and I can see why it might make better and more enthusiastic programmers of students whatever their abilities and preferences.

  42. why the need for enticing? by acdc_rules · · Score: 1

    do you want lots of programmers or develop fewer, but better programmers. someone suggested assembly. yes, that's good, but go back one further to machine code, if its possible. i learned programming using those microprocessor kits with hex keyboards, displays, etc. you get a real sense of what's happening inside the CPU and how addressing and data transfer take place. this approach builds a deep foundation. i know people writing C/C++ that don't completely get stacks, interrupts, etc.. as for high level language, how about something completely different like logo and forth. it is a good way to illustrate the unimportance of a specific language.

  43. Noooooo! by Xtifr · · Score: 4, Funny

    Please, it takes kids YEARS to recover from the damage that learning any flavor of BASIC does!

    "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
                    -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5

    Things (specifically BASIC variants) have improved since Dijkstra wrote that, but an underlying fundamental truth remains.

    "Whom the gods would destroy, they first teach BASIC."
                    -- unknown

    1. Re:Noooooo! by Blakey+Rat · · Score: 2, Informative

      Have you tried RealBasic? It's not VB, it's closer to Java than any flavor of Basic from the past. In fact, I wouldn't mind at all if they changed the name... but try it before you knock it.

    2. Re:Noooooo! by Xtifr · · Score: 2, Interesting

      Yes, I have looked at RealBasic, at least briefly, and I agree it's not as bad as the language(s) that Dijkstra was complaining about (you'll note that I even said something along those lines). But if it's more like Java, then what's the point? Just teach 'em Java, and that way they'll have something that might actually be useful to them someday.

      Frankly, I think Pascal or Python or Scheme or Modula or Eiffel or Smalltalk would be a much better choice for an introduction to programming, but I certainly don't see the point in switching to an obscure language that is vaguely derived from BASIC just because it still has the string "Basic" in its name, especially since you should be moving away from anything named "Basic" as rapidly as possible.

      I'd probably recommend ADA before I recommended RealBasic, and I'm not a huge ADA fan. But it is (like RealBasic) a much better language than its reputation would suggest.

    3. Re:Noooooo! by syynnapse · · Score: 1

      hey! i learned QBASIC before any other language and im a great... pretty good... ok, average.. alright, you win.

      seriously though, ive heard the damage is only done by heavy use of GOTOs - which im afraid i did a lot of back when i was nine and learning from my mom. however, the desire to use GOTO faded fast when i learned how nice functions were. however, im still in school so maybe i dont know just how much damage BASIC did to me. ;)

      --

      System.out.println(syynnapse.getSig());

    4. Re:Noooooo! by Blakey+Rat · · Score: 1

      The point is that RealBasic has a nice mature evolved interface where a kid can drag a button to the window, write a bit of code, and BAM they have a working application. As far as I'm aware, you can't do that in any Java IDEs with near the same simplicity as in RB. I hope that other Slashdot posters consider the *entire* problem domain instead of only "which language syntax is better?"

    5. Re:Noooooo! by Anonymous Coward · · Score: 0
      As far as I'm aware, you can't do that in any Java IDEs with near the same simplicity as in RB.
      With Netbeans you can.

      While RealBasic isn't as bad as other BASIC variants, I'm going to have to agree with others that Java has too many good things going for it (e.g. cross-platform, fairly simple, wealth of APIs) that make it a better choice for learning to program.
    6. Re:Noooooo! by The+Tyrant · · Score: 2, Interesting

      I could not agree more, having learned basic as a kid, in several flavors, and then moving onto vb6, I got so disgusted with the whole thing (not least that vb6 is so full of annoying bugs that anything big you want to write needs to be done entirely via api calls for such simple things as window creation and drawing of standard looking scrollbars) that I've totally regressed and am now learning assembly and am blissfully happy at the level of control and new abilities I have. One day I might learn C, but I've been scared off high level languages for good.

      How about teaching these kids some assembly? Something nice like 68k assembly, you could get a load of old 68k based systems (my vote is for Atari ST's) and teach them simple things, like how to manipulate bitmaps on screen, which leads nicely into the writing of little games, and nothing motivates kids more than games. Assembly isnt that hard really, especially on a nice big endian CISC like the 68k, and it'll give them serious insight when they come to learn C ("ah-ha, so a for loop is just a dbra!").

    7. Re:Noooooo! by telecsan · · Score: 1

      This is exactly how I learned it, except on a kinda parallel path. Learning assembly on a Motorola embedded process that had A/D converters, pulse width modulater, other cool features that let you actually *build* stuff with it, and learning C at the same time. Good old standard C. I think that's a very good building block, and apparently others have agreed, considering the popularity of it's descendants (C++, Java, C#, etc etc) It made it really easy to pick up OO-languages, because you could focus on the concepts, and not the syntax.

    8. Re:Noooooo! by indifferent+children · · Score: 2, Interesting
      I think Pascal...

      Noooo! Why would anyone teach students using Pascal instead C/C++. Does anyone think the BEGIN/END is really more straightforward than {/}? As students, they are going to have to *learn* things when they program, and curly-braces are the least of it.

      Is 'record' and clearer than 'struct'?

      If you don't want the students to have to deal with memory management, then use a garbage collection library with your C compiler. If you want to CYA, tell them that they are using a GC library. If you teach them Pascal, and don't explain that Pascal does GC, then they will be hosed when they get to a C/C++ course and don't understand why they have to manage memory.

      --
      Censorship is telling a man he can't have a steak just because a baby can't chew it. --Mark Twain
    9. Re:Noooooo! by indifferent+children · · Score: 1
      Actually, NetBeans lets you drop controls on a form from a palette, right-click, choose 'events', and for any event, Netbeans will write a stub function and the event handler to run that stub function.

      More importantly, students should probably not be taught programming by starting with GUIs at all. The inversion of control and event handling gets in the way of learning simple programming.

      --
      Censorship is telling a man he can't have a steak just because a baby can't chew it. --Mark Twain
    10. Re:Noooooo! by indifferent+children · · Score: 1
      One day I might learn C, but I've been scared off high level languages for good.

      Most C programmers only call it a 'high level language' with their tongues planted firmly in their cheeks. Using lots of raw pointers and OS system calls makes real C pretty low-level. I am not saying that it's very close to assembly; the cpu details are mostly abstracted away.

      --
      Censorship is telling a man he can't have a steak just because a baby can't chew it. --Mark Twain
    11. Re:Noooooo! by chriseyre2000 · · Score: 1

      What is wrong with Pascal as a teaching language? I am using a modern variant (Delphi) and that does not do GC by default (except via COM interfaces and for strings). Pascal does require explicity memory management too.

    12. Re:Noooooo! by chthon · · Score: 1

      Why use an old computer ? Use an emulator or a simulator.

    13. Re:Noooooo! by solomonrex · · Score: 1

      Read again, they meant to say, I'm willing to try C, but I'll never return to Visual Basic, or anything like that again.

    14. Re:Noooooo! by hackwrench · · Score: 1

      The first problem I encountered switching from QB to C++ was that all variables are passed by reference by default in QB, while in C++ all variables are passed by value by defaut and by reference & is rarely used. QB's structures for keeping track of array and string sizes aren't that hard to expose (see Ethan Winer's book), with C++ that doesn't seem to come up. What happens to string pointers when you want to expand a string in C++, array pointers?

    15. Re:Noooooo! by angel'o'sphere · · Score: 4, Informative


      If you teach them Pascal, and don't explain that Pascal does GC, then they will be hosed when they get to a C/C++ course and don't understand why they have to manage memory.


      Pascal does not do GC.

      And yes, most of Pascal is cleaer than C ...

      Pascal:
      myDates: array [1..10] of Date;

      C:
      Date myDates[10];

      What is the low bound and high bound of myDate in C and in Pascal?

      How do you do an array from 99 to 104 in C? You cant ... neither you can't do 2 or more dimensional arrays in C (you have to relly on arrays of arays and manually initialize them).

      There is plenty stuff where Pascal is FAR clearer than C, its designed to be so, while C is designed to be a portable assembler.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    16. Re:Noooooo! by Anonymous Coward · · Score: 0

      Why is it the same people who believe you can continuously learn during your entire life from foetus to grave (all the while giving your money to universities), somehow believe you can't learn to program because you did some BASIC in grade 8?

    17. Re:Noooooo! by The+Tyrant · · Score: 1

      Because working on the real hardware is just plain more fun.

      Im currently writing games and demos on the Atari Jaguar btw, now thats a fun system for assembly heads.

    18. Re:Noooooo! by The+Tyrant · · Score: 1

      Exactly, I would call C a "high level assembly language", I ment more things like VB (which is still useful as a windoze scripting language, its original design goal I believe), and Java, which having been exposed to briefly, I refuse to touch with a very long stick.

    19. Re:Noooooo! by Anonymous Coward · · Score: 0
      What are you smoking? The C version is far more concise.
      How do you do an array from 99 to 104 in C? You cant ... neither you can't do 2 or more dimensional arrays in C (you have to relly on arrays of arays and manually initialize them).
      This crap is utterly superfluous and could be handled by an m4 macro.
    20. Re:Noooooo! by Nutria · · Score: 4, Insightful
      The C version is far more concise.

      I spit in the general direction of "conciseness", and it's kinsman "cleverness".

      To quote Kernighan:
      Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

      I used to be a clever programmer, but then I graduated and got a Real Job, and had to read the code written by both Clever and Grown-up programmers. Guess which code was easier to modify, debug and add functionality to. Guess which code had less bugs.

      A good (but not huge!) dose of verbosity and simplicity would go a long way towards making more robust applications.

      Another relevant quote, by Jeff Polk, co-creator of CVS:
      There's no obfuscated Perl contest because it's pointless.

      --
      "I don't know, therefore Aliens" Wafflebox1
    21. Re:Noooooo! by Nutria · · Score: 1

      seriously though, ive heard the damage is only done by heavy use of GOTOs

      Hogwash. Every programmer uses GOTO every time he/she programs.

      Each looping construct is an IF, a label & a GOTO.

      While I dearly love do.while, while..do, for, loop..until, etc, some (ancient but still used) languages don't have them.

      The key, as with all programming, is mental discipline..

      --
      "I don't know, therefore Aliens" Wafflebox1
    22. Re:Noooooo! by greenlead · · Score: 2, Interesting

      I started (at about 10 years old) playing with QBasic examples from a kids programming book. I would type them in exactly, and then modify them.

      When I was about 11, my father created a web page for me, and required me to maintain it myself. I made all changes by hand, through trial and error. No fancy GUI tools at that age!

      Rant:

      {

      that's why we have so many lousy "web designers" these days! Kids are spoiled rotten by pretty web tools from Geocities and the like that spit out horrible code, and the kids are satisfied with it, and proclaim to me "I made a web page, aren't you proud of me????". They aren't willing to receive advice either, and think that HTML is hard to learn. :-(

      }

      When I was a sophomore in HS (would've preferred starting programming as a freshman, but they made me take a computer application class as a pre-req), I learned the basics of MS's Visual Basic 6. I liked the quick results, which are essential if you want to get someone's interest long enough to actually teach them something. Most of the kids were there because the description in the course selection book basically said "Create cool programs by dragging icons onto a form". I actually helped teach this class. (By the way, it took six months of annoyed programming before I figured out that "End if" was a statement, not a condition. Nobody had bothered to explain it, they just told me I had to have it there because the compiler demanded it.)

      My junior year, I learned the basics of C++. We spent almost the entire time making basic command line programs. This was good, because I actually had to learn structure and the importance of good code and documentation, rather than making a mess because I was in a hurry. I also was forced to learn the importance of planning, rather than the dive-in method.

      Now, I am getting into PHP, which is relatively easy for me, because it is very similar to C++, and I already understand HTML. It also helps that there are lots of tutorials out there for it, and it is fun to play with.

      My case was a little different than most kids these days, because my father is a programmer, and I had been exposed to computers all of my life, and had been required to fix my own problems, with guidance from him only when I really needed it. My oldest brother was formatting floppies from the DOS command line at 5. We had all built at least one computer and did all setup (format the hard drive, figure out why DOS refused to install, etc.) on it by the age of 10.

    23. Re:Noooooo! by James_Aguilar · · Score: 1

      Actually that would be an even worse choice. The goal is that people should eventually be able to develop programs more quickly; assembly is a step in the opposite direction.

    24. Re:Noooooo! by dalleboy · · Score: 1

      And Python (and similar languages) does not use variants (or similar constructs)?

    25. Re:Noooooo! by LordoftheWoods · · Score: 1

      where do you get these great quotes?

    26. Re:Noooooo! by Anonymous Coward · · Score: 0

      >How do you do an array from 99 to 104 in C? You >cant ... neither you can't do 2 or more dimensional >arrays in C (you have to relly on arrays of arays >and manually initialize them).
      >
      Never heard more bollocks in my life. Don't ever take up programming; "lazy" and "dense" are words you are likely to have applied to you by your fellow workers if you do.

    27. Re:Noooooo! by OwnedByTwoCats · · Score: 1

      Ages and ages ago, when I was a high school senior, I took a competitive exam, and then an interview, for a college scholarship. The interviewer asserted that Basic was a terrible language that should never have been invented. It being the only language I understood, I defended it. I think that willingness to stand up to authority is one of the biggest reasons why I ended up with the scholarship (full tuition for 8 semesters at a top-40 private engineering college).

      Basic isn't terrible. It isn't stellar. It just is.

    28. Re:Noooooo! by Anonymous Coward · · Score: 0

      That's absolutly not true.
      I'm still young(15), and I've stepped from QBasic to C++ without any difficulties.

    29. Re:Noooooo! by LordoftheWoods · · Score: 1

      The key here is readability.. GOTOs are impossible to read because the code jumps all over the place, while loops have well-defined and understood semantics. That a loop will become jump instructions in the compiled code is irrelevant, because thats not the code you need to read or understand. The damage BASIC causes here is that they think problems should be solved with unstructured GOTOs when really they shouldn't be. All problems can be solved without any explicit jumping. Languages (other than assembly) which dont have looping and function call constructs are toy languages which shouldn't be used for any serious programming. I suppose if you use the IF, the LABEL, and the GOTO in a structured way, code in these languages can end up understandable, but realistically the compiler should be doing the work of translating 'repeat 'PRINT "HI" 3 times' into the IF, the LABEL, and the GOTO.

    30. Re:Noooooo! by raider_red · · Score: 1

      There's no obfuscated Perl contest because it's pointless.

      There is an obfuscated perl contest. It is pointless, but they have one anyway.

      --
      It's good to use your head, but not as a battering ram.
    31. Re:Noooooo! by Nutria · · Score: 1

      where do you get these great quotes?

      Just found on the internet over the years.

      The Kernigan quote is pretty common; I think the Perl humor was in someone's signature.

      --
      "I don't know, therefore Aliens" Wafflebox1
    32. Re:Noooooo! by drxenos · · Score: 1

      It's spelt "Ada" damn it! :)

      --


      Anonymous Cowards suck.
    33. Re:Noooooo! by drxenos · · Score: 1

      It's spelled "Ada" damn it! :)

      --


      Anonymous Cowards suck.
    34. Re:Noooooo! by drxenos · · Score: 1

      Oops. I didn't think this one made it through. I kept getting "network error" messages. Oh well!

      --


      Anonymous Cowards suck.
    35. Re:Noooooo! by jjp5421 · · Score: 1

      It has been a while, but don't you mean
      Date myDates[9];

      ???

      JJP

    36. Re:Noooooo! by Anonymous Coward · · Score: 0

      No. Date myDates[10] creates an array with ten elements, numbered 0 to 9. See his point?

  44. Go with PHP by Bald+Wookie · · Score: 1

    PHP is great for high school kids:

    1. It's an "instant gratification" language that makes it easy to get results.

    2. You can do a lot of web based projects which teens should find interesting.

    Yes, PHP has a lot of problems. It's very undisciplined. However, I think it's a good choice for a class where probably 80% of the kids won't ever program again.

  45. Don't discount VB and C#... by Saeed+al-Sahaf · · Score: 1
    I don't know about Ruby on Rails, but I strongly agree with you about PHP and VB. I think they both lead poorly to working in other languages.

    Well, that all depends on what environment the person intends on working in. I know most here would rather die than work in a Windows centered environment, but you know? They exist in large numbers, not everyone is "down" on Windows, and in that case, Windows centered languages such as VB, C#, and maybe C++ (down the line, maybe) is the direction to go. As far as PHP, I like it, any language offers opportunities for crappy code, and that's as far as I'm going.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Don't discount VB and C#... by Omnifarious · · Score: 1

      If someone wants to learn a language that ties them to a particular vendor, that's fine. But I don't think a school has any business teaching it. At least not one that gets any public funds.

  46. What entices high school students? by Dukhat · · Score: 3, Insightful
    I don't think anybody who is new to programming will think a programming language is cool based on the capabilities of the language or the libraries it has. The coolness factor is based on seeing some application built in it, and they want to be able to do the same thing. I doubt that there is any consensus among your students as to what a cool language is. The students may have some aversion to VB from things they have read, but all languages have critics as well as hype.

    I think you will be able to attract students to your course by focusing on what you can do in the course and not on what language you get to use. A course on "Building a Blog", "Programming a Robot", or "Building an Online Store" is much more enticing than PHP or Ruby on Rails. When you watch a home remodeling show, they don't advertise it as the show with the coolest miter saws and wrenches. The show isn't about the tools, it is about the end product, a new deck, or new cabinets in your kitchen.

    Since you are teaching new programmers, I will suggest languages and frameworks based on how easy they are to start using as opposed to how good they are in the long run.

    PHP has excellent documentation. Although its function names can be inconsistent or duplicated (e.g. sizeof, strlen, count), it is fairly easy to follow the code. This would probably be the easiest well development platform to get started on without evaluating different components, since you really don't need to bother with libraries to do MVC for a beginners course. You definitely will want to set up PHP with "xdebug" so that PHP will provide you with a stack trace for your errors. Otherwise, you will only see the line number where the error occured, which is not very useful if the line number is inside a function that gets called in a hundred different places.

    Ruby on Rails is a very large frameworks, and you are just throwing names around to suggest this for an intro course. Ruby, the language, and a basic html templating system might be easy to teach, but Rails involves the MVC pattern, object-relational mapping for database access, and an architecture for unit/functional testing. This is NOT good for beginners. The Rails tutorials will also give you a false impression of how easy it is by having you build a bunch of database driven web pages with very little code. After you finish the tutorial, you will still have a lot to learn.

    Although I think Ruby is a more powerful language for an experienced developer than PHP is, it has a lot of syntax rules to learn. For example, curly braces {} could contain a block of code or an associative array, and "joe!" means run the joe! function, and "!joe!" is a boolean NOT operator acting on the return value of joe!

    My personal favorite programming language is Python. It has a cleaner syntax than PHP or Ruby, although an amazing amount of new Python programmers are burnt by mismatched indentation between tabs and spaces. Python will treat a tab as the same indentation level as 8 spaces, but your text editor may be using a different value. Even though python tells you the line where the syntax error is, the error may be invisible in your editor. If you are interested in Python for web development, Zope involves learning too much infrastructure for beginners. You would be better off with Spyce.

    Instead of making your students build things from scratch, they may feel likethey are accomplishing more by customizing an opensource program that alreadyexists. You can find a bazillion PHP web portal projects at http://freshmeat.net./

    1. Re:What entices high school students? by bhtooefr · · Score: 1

      Interesting...

      I thought that Python determined what it was by the number of spaces. IIRC, IDLE (the Python IDE) uses 4 spaces...

      I agree, though, that tabs are better. However, blocks of 4 spaces are treated as tabs by IDLE (which, needless to say, is kinda odd...) That is a DEFAULT setting, though, that can be changed...

    2. Re:What entices high school students? by Dukhat · · Score: 1

      I think you are confusing the "tab character" and the "tab key". Your text editor may add several spaces to a file when you press tab, or it may add a single tab character. I.e. your tab key could create spaces or tab characters.

      When python reads the file, it will treat the indentation level of a tab character the same as 8 characters. If your text editor adds spaces to the file when you press the tab key, you won't have any tab characters in your file. However, your text editor could add a tab character to the file but only display the tab as having the width of four spaces. This will cause problems, since python will treat it as having a width of 8 characters.

  47. Troll? by Saeed+al-Sahaf · · Score: 1

    Your post has got to be a troll, yes? The world does not need more "web developers".

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  48. C (lalalalala.. lameness filter sucks) by _Splat · · Score: 1

    Straight C. They're gonna have to learn it sometime, it's useful, and they'll learn about how the computer works. Unless people don't think knowing something as low-level as pointers or a sort algorithm is important. Then go ahead and teach Java with its libraries for everything and garbage collection and slow-and-fatness.

    --
    -Splat
  49. Python, natch. by jericho4.0 · · Score: 1
    Python is a great choice for a first language. Heck, it's a great last language, if you're not a pro. Ruby's OK, but python is more straightforward, while stil giving you lots of power.

    Java's too verbose, C/C++ is too close to the hardware, and we probably shouldn't go that low for a fist language. PHP is too domain specific (and kinda cluncky). Ideally, your students would get a bit of exposure to several languages, so they can see some differences (typeing, etc)

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    1. Re:Python, natch. by amliebsch · · Score: 1
      This question would be much easier to answer if you could provide us with some insight as to why they dislike VB. Otherwise, we're just guessing.

      Personally, I think VB.NET is an excellent beginner's language. It is simply easier to quickly get to the "making windows programs" stage (which is the interesting part) than Perl or Python. The syntax is more human-readable than java or C#, but is instructive for good technique since it supports full proper OOP. Finally, the rich framework and ability to build web apps is icing.

      --
      If you don't know where you are going, you will wind up somewhere else.
  50. Don Box asked before. I suggested LOGO by Quantum+Jim · · Score: 2, Informative

    Don Box had a simular journal post about which language was best to teach his kids to program. I felt that LOGO was the best choice.

    When I was younger, the ability to program the robotic turtle really empowered me! The fancy shapes and colors produce amazed me, and it made me feel like I was accomplishing something. It isn't a coincidence that one of the first things I programmed in Integer BASIC (my second language) was a clone of LOGO for the IIgs (also, we couldn't afford a copy).

    I still feel that way. In fact, to learn to program you really should start with simple text-only (like command line) or path-only (like turtle maps) interface stuff. Anything else requires the ability to think in terms of metaphors that are hard for newbies to grasp. It also helps new programmers learn to program in steps (i.e. design) rather than struggle with the grammar or vocabulary (i.e. one big main function).

    --
    It is impossible to enjoy idling thoroughly unless one has plenty of work to do.
    - Jerome Klapka Jerome
  51. UnrealScript by Corngood · · Score: 1

    Can't beat that for excitement, just make a bot competition out of it or something. You can even download the unreal engine 2 runtime for free from http://udn.epicgames.com/. UnrealScript will teach basic programming and OO design, and stuff like 'latent' functions make controller logic a lot simpler.

    Also, you could easily integrate it with an art programme to teach that side of it.

    1. Re:UnrealScript by Better+Than+Bacon · · Score: 1
      Corngood's right, this would be awesome for young students -- totally motivating.

      Where's the karma for this guy??

  52. Assembly language by Anonymous Coward · · Score: 0

    Hear me out...

    My first programming language was assembly language and it was really helpful in learning all other programming languages.

    Whether it was programming BASIC, C, C++, COBOL, Delphi/Pascal/Modula2, Perl, Python, Ruby, Scheme or XBase, I always benefitted from having learned assembly first.

    Some languages such as Ruby or Python obviously don't necessarily benefit as much from having learned assembly first. But still...

  53. Logo by kbielefe · · Score: 1
    waits a while for mocking laughter to die down...

    Hey, it's what got me interested in programming. It's interactive so it gives instant results. It can teach the basics of algorithmic thinking without burdening the beginner with all the necessary quirks that go with "normal" programming languages. If they find they actually have a talent and interest in programming, a more conventional language can be used for a 102 course.

    I've actually thought a lot about this question since my wife took a Java 101 class a few years ago. The following are comments she made while she was doing her homework:

    • What the heck does "public static void main" mean?
    • What's all this import stuff about?
    • What's the point of this try/catch stuff?
    • Why do I have to recompile the whole thing when I just changed one letter?
    • These error messages don't make sense and it's hard to tell where they occurred.
    • I know what all the commands do individually, but I really wanted to learn more about how they work together.
    • I spend so much time dealing with the compiler and stuff, that I haven't been able to really learn about programming.
    • What's the point of floats, doubles, and ints? Why don't they just call it a number and leave it at that?
    What I got out of her comments was that the programming language was getting in the way of learning programming. While most of her questions seem pretty basic to an experienced programmer, they were still outside the scope of her class. The teacher didn't have time and the students didn't have the background to understand the answers.

    In my opinion, the best languages for introduction to programming are loosely-typed scripting languages. Let the students get the basics of programming down first, then concepts like type, storage, classes, packages, error handling, compiling, etc. can be added later.

    --
    This space intentionally left blank.
  54. Python is the perfect first language for learning by Ursus+Maximus · · Score: 2, Informative

    Python is the perfect first language for learning to program. It has a fast learning curve, teaches good programming practises, introduces powerful programming principles quickly and easily, and is fun for the students, allowing them to do real things, including graphics, games, web programming etc. Ron Stephens Python Learning Foundation

  55. Crazy ideas by MadChicken · · Score: 1

    Yeah these are kind of crazy, but...

    I always thought Inform would be a cool learning language. It introduces the concepts of objects in a very easy-to-grasp way. It's really easy to throw together a working game.

    Also what about something like DarkBASIC? I haven't used it at all, so I have no idea if the syntax is intelligible (or if it teaches good programming practice). Think about how students would respond to something like this, though...

    GAMES!

    --
    SYS 64738 NO CARRIER
  56. PHP and Ruby on Rails both good choices by forestgomp · · Score: 1

    PHP and Ruby on Rails (RoR) are both excellent choices because:

    1. they both are interpretted languages (don't make your High School kids deal with compiling!).
    2. they are both built for the Web, which is what your students are interested in.
    3. they both enable rapid application development.

    Ruby is very elegant (pure OO, powerful but simple, clean syntax). As many have noted, RoR is not a programming language per se but rather a Web application development framework that uses Ruby together with a lot of neat stuff (like Object Relational Mapping) that works "out-of-the-box" without configuration (if you follow design conventions). You could start your students with Ruby and then later in the term introduce RoR. Nice.

    PHP is a good choice if you're not too worried about stressing pure OO (although you CAN do OO in PHP), but want to show how quickly and easily great stuff can be done on the Web. There are tons of libraries available for your students to dig in to as well.

    Good luck. Glad to see you're moving away from VB!

  57. Making a reasonable case for PHP by danielDamage · · Score: 2, Interesting

    When I learned programming, it was painful to get past the strange things I didn't understand in C, C++ and Java's "Hello World" program.

    Header files, main(), etc. It was intimidating to me, and I am far from the most intimidated by new concepts person I can imaging.

    The reason I like PHP for a programming teaching language:

    • It uses basically the syntax that is common to C, C++, Java and Javascript. It's an introduction to curly braced code blocks, parentheses as a grouper for boolean evaluation, etc.
    • Feedback is instant. You make a change, you refresh the page.
    • It operates in a web paradigm, so it looks useful to people. I took 2 semesters of C++, and could write a shell application, but knew how far I was from being able to write a real application that would be useful to me. Being able to get a form variable in a web page and write it to a text file already feels pretty damn useful.
    • You can teach the basics of procedural programming before you start to gently introduce objects.
    • Array handling is friendly and non-threatening...you can populate and output arrays, hashes, etc very easily without worrying about too many implementation details to start with.
    • You can teach the very idea of objects in a simplified way. Instantiating them, writing a constructor, restricting access (in PHP5), simple inheritance, polymorphism...

    Lots of people are saying, TEACH THEM C! IT'S GOOD FOR THE LITTLE BLIGHTERS!

    But really, as someone who has taught a lot of programming informally, the biggest obstacle is people: a) seeing that programming is useful and b) seeing that programming is something THEY could actually DO.

    At the beginning it's SO easy to feel like it's just a whirlwind of details you'll never be able to keep straight. If you can just teach selection (if...else) and iteration (foreach) and get it to stick that problems can be solved this way, yes, even by ordinary humans, then it's really not that hard to graduate people to Java or some such.

    At that point you're just adding the concepts of namespaces, data typing, OO as a deeper part of the language....and the syntax and basic concepts are already there and familiar.

    I hear people worried about generating bad habits, but I just don't think this is the primary concern when FIRST introducing people to programming.

    --
    Slices, dices, eats your lunch.
    1. Re:Making a reasonable case for PHP by Anonymous Coward · · Score: 0

      I'll second PHP for you, it was my first language true, I hate it now and regard it as something of a toy. If I hate it why am I recommending it I hear you ask?

      PHP allowed me to jump directly into C and Perl. It also perked my interest enough to learn some scheme and got me interested in lua. Of late I've also been playing with ferite, pike and ruby.

      Most importantly for beginners, PHP has the best documention of any language; period.

    2. Re:Making a reasonable case for PHP by diamondmagic · · Score: 1
      It is simple and easy. Hello world in C++:
      #include <iostream>
      int main()
      {
      std::cout << "Hello, world!\n";
      }
      PHP:
      <?php echo 'hello world'; ?>
  58. Are you sure that the PL is the problem? by bigsteve@dstc · · Score: 1
    Before you go to the effort of changing all of your teaching material, etc, etc, you need to have a good handle on why students are not taking the course. Are you sure it is the programming language you are teaching that is turning them off?

    What you need to do (and this is hard!) is to find out why students are turning away, and try to address those issues.

  59. Python, all the way by Punboy · · Score: 1

    Python is great for this. It's object oriented, interpreted, has amazing documentation and tutorials readily available, and forces the developer to learn good indentation practices at the start.

    This is what I started with, and found it very easy to from there learn Java, C, and C++.

    --
    If you like what I've said here, and want to read more, go to http://www.krillrblog.com
  60. Best Language by deanj · · Score: 4, Insightful

    The best language is the one that the teacher can teach well. If the teacher can't do a good job explaining the language, it doesn't matter how good the language is for programming... there will be a lot of kids in class that will be lost.

    1. Re:Best Language by Rinisari · · Score: 1

      Amen to that. It's a shame, though, that most of the States don't have an official teacher certification for Computer Science. Most high school computer science teachers are either geeky business teachers or English or Math majors who took English or Math with a Computer Science and secondary education double minor (or however other schools do it - Westminster does things a little different).

      This generally means that most high school computer science teachers have had little or no formal education on computer science, let alone teaching computer science.

      In my case, I'm a Computer Science major and am planning to get my Master's in education after graduation.

    2. Re:Best Language by MrCopilot · · Score: 1
      The best language is the one that the teacher can teach well. If the teacher can't do a good job explaining the language, it doesn't matter how good the language is for programming...

      Don't know about you, My teachers taught me how to learn. Maybe some of it was incopentence or ignorance, maybe it was the fact that we were both looking at the computerized typewriter (no kidding Paper output only) for the first time. The very best example (and I use this with my children) is to say "I don't know, lets find out." I learned this early and often. How to find out is often way more important than the information you may need at this very second.

      I later have had brilliant teachers try to impart what they know in the short time they have, and fail miserably with 90% of the class. Computer Programming is just Composition: Syntax, punctuation, Form and Logic(hopefully). But the rules change from language to language.

      Reference Documentation is our life.
      The trick is how do you make the students want to know bad enough to read the dry docs.

      Along those lines may I suggest you throw http://poignantguide.net/ruby/ at them.

      I second Python and Pygame, for reasons already covered.

      I also recommend the Excellent "Thinking in..." books by Bruce Eckels. C++, Java and Python(haven't read that one, yet.)http://www.mindview.net/Books But my best recommendation, dont laugh:
      Microchips PIC assembler. Short BOOKS/command list, lots of intro to memory, bits, arrays, data flow, Structure and syntax.Throw in some basic electronics. Nice introduction to the complexities of how things work.
      Good C compilers but much bigger instruction set really should have c background first.

      VB.net Bad......VB EvIL
      Basic lesser of three.

      --
      OSGGFG - Open Source Gamers Guide to Free Games
  61. Why not Tcl? by Eil · · Score: 1


    I think Tcl is a great beginner's language because it balances a shallow learning curve with a quite a lot of power. (More than most expect before they've tried it.) Although I hardly ever program, I've dabbled in C, C++, Java, VisualBasic, and Python, but Tcl was the only language that I felt at home with. I was writing useful programs (GUI programs, even) within 2 hours of discovering its existance.

    A lot of OSS folks are put off by it's blindingly simple syntax:

    [command] [arguments]

    But this shouldn't be an issue in a beginning programmer's class, because your aim is to teach programming, not the subtle nuances of a particular C-sytle syntax. Once they understand basic programming concepts, then show them how other programs do it. Another huge bonus is that Tcl has a very helpful and friendly community behind it. Try sending your students to comp.lang.c or some of the other communities on the net and they'll probably be discouraged from programming ever again.

    1. Re:Why not Tcl? by Anonymous Coward · · Score: 0

      I love Tcl/Tk. It's simple yet very powerful. The ability to write a decent GUI in just a few lines of code would help to keep a beginner's interest. The only drawback I see is the whole quoting vs brackets thing. That might confuse beginners a bit. Otherwise it's a good choice.

  62. Python by aldragon · · Score: 1

    IMHO, Python is the best lauguage for such.

  63. How about Scheme? by Anonymous Coward · · Score: 0

    I teach programming and I use the book How to Design Programs and the Dr Scheme environment. I accomplish so much using these materials. Can't recommend them highly enough.

  64. PureBasic by JohnDeHope3 · · Score: 1

    www.purebasic.com

  65. C & Smalltalk by Lord+of+the+Fries · · Score: 1

    Seriously. I know it seems like an odd mix. But C is the OS language. And in learning C, you learn how computers work. You can't escape it. The stack, the memory model, etc.

    OTOH, any complex program may want a GC, a decent development environment, robust libraries, debuggers, etc. If you evolve a system from C, you'll just end up with Smalltalk, or something that still trying to be like Smalltalk Java. Smalltalk is a great language for getting out of the way, and letting programers worry about their problems, not all the arcane details of how it's implemented. A know a number of schools have run successful projects using Squeak and other Smalltalk flavors to educate from primary through college ages.

    --
    One man's pink plane is another man's blue plane.
  66. Test, test, test! by dubl-u · · Score: 1

    unit testing should be taught AS SOON AS POSSIBLE in my opinion

    Amen to that! Experience with test-driven development is now my number-one criterion for hiring programmers.

    Back in ye olden dayes, unit testing was hard, so nobody learned it. Today, there's no excuse. As a bonus, test-driven development is much more fun, so students are much more likely to enjoy the process.

    But wait! More happy students -> more programmers -> more job competition -> lower wages for us. Teach those high schoolers assembler or C or something.

  67. What is the goal? by the+eric+conspiracy · · Score: 1

    I think C is a really good choice. It has a minimal number of keywords and exposes the architecture of the computer very well so the focus is on the machine, and how the structure of the code relates to the hardware.

    Java, Python. Scheme et al provide a lot of additional useful abstractions, but are most obviously uselful in systems much larger than what the students will be developing and may be too high level for a high-school setting.

  68. SEGA Genesis programming all the way. by Travelsonic · · Score: 2, Interesting
    Here is an interesting variant of basic you should look at (if you don't know already)

    http://devster.retrodev.com/sega/basiegaxorz/


    It's BASIC, but it compiles to work on SEGA Genesis emulators and, given the right tools, a real SEGA Genesis. Easy to do, but sure to give them a real spark of "wow, holy crap this is cool!"

    --
    If you believe in privacy, and believe you have "nothing to hide" at the same time, you're a goddammed idiot
  69. Not one, but 4 languages... by meburke · · Score: 1

    I agree with the idea that programming is a problem-solving tool and a way of thinking. Students need to be taught to organize their system of problem solving to achieve objectives through scientific thinking.

    I strongly suggest teaching 4 languages at once: Teach assembly to teach how the system works using structured problems, allow them to figure out how to solve the same problem sets in C (because it's closely associated with asssembly), then allow them to solve the same problem set in a structured language like Pascal or Modula 4, then let them solve the same problem set in a real Object-Oriented language like Smalltalk or Ruby.

    The problem set should consist of common everyday tasks first. Like basic arithmetic, drawing shapes moving shapes across the screen, mazes, text, string, and file mainipulation (including sorting),building an interface, building accessories to the interface (like buttons and static controls) then building dynamic interfaces like forms, drop-down boxes, and whatever.

    Concentrate on the multiple ways of organizing the task for a solution (like decision tables and flowcharts for assembly, pseudocode and entity diagrams for structured programming, Use Case and UML for OOP) and you will keep them challenged for a good two semester's work.

    Any idiot can learn the syntax to a language in about 2 -3 weeks (the University of Oregon at eugene used to have students learn a different language every week!), but that won't make them good programmers.

    Mike

    --
    "The mind works quicker than you think!"
  70. Try something hardcore.. by BigZaphod · · Score: 1

    Don't teach them a language at all. Teach via example and experience. Toss them a program in, say, Python that does something simple. Like, loops and prints 99 bottles of beer on the wall or something. Go over it quickly in class using a projector. Show them how this chunk does this, that chunk does that, etc. side-by-side with the output. Then, give them a program in C that does the same thing and go through the same procedure explaining in general terms how this does that, etc. Better yet would be to have both samples up on the screen with different projectors at the same time so students can be comparing in their heads and see the complete playing field the whole time.

    Then tell them to build a specific comparable program (something that loops and prints, but with a different twist someplace) and tell them to write it in both C and Python. Don't give them any starting code - just leave the sample code visible on the projectors and they can look up and refer back to that on their own. See what happens.

    Actually, I'd be terribly interested to know if anyone has experienced this or tried it with their own students as, to me, it seems like a terribly cool way to teach how to think programming and not just how to do it. Kids that age aren't stupid - they've seen some algebra, they know what variables are (more or less), as well as functions. Just toss them in and let them map what they know or are learning in other classes onto this new medium.

    Oh, and always remember you can't make a student care no matter how hard you try. Don't try to simplify or dumb it down just so every single student manages to complete the coursework. Let the ones who don't care suffer for it, dammit. :-) (And the rockstars can be given special side projects once they are identified - perhaps such as writing a portable game, using GUI code, 3D, etc.)

  71. Scheme-The big "F" by Anonymous Coward · · Score: 0
  72. As a precursor to higher education by SecularG · · Score: 1

    C++ is probably the most popular way to teach programming in universities and colleges. In order to give the students a good foundation, something to point them in the RIGHT direction, and a smoother transition to most higher education schools, I believe that C++ is the correct move.

  73. ruby by Anonymous Coward · · Score: 0
  74. C & Smalltalk-FORTH Estate. by Anonymous Coward · · Score: 0

    "Seriously. I know it seems like an odd mix. But C is the OS language. And in learning C, you learn how computers work. You can't escape it. The stack, the memory model, etc."

    FORTH.

    "A know a number of schools have run successful projects using Squeak and other Smalltalk flavors to educate from primary through college ages."

    [Get key from here]
    http://www.bitwisemag.com/copy/other/download/down load_dolphin_smalltalk.html

    [Get Dolphin XP Value Edition (DVE) from here]
    http://www.object-arts.com/Downloads5.htm

    Enjoy!

  75. Python has a free book and pygame by edalytical · · Score: 5, Informative
    Python is definitely the way to go. There is a free book that is written especially for High School CS classes, it's called How to Think Like a Computer Scientist: Learning with Python. You can get it here: http://greenteapress.com/thinkpython/ for free in any of these electronic formats: PDF, LaTeX, Postscript, and HTML. Or you can buy printed copies here: http://greenteapress.com/thinkpython/terms.html

    In addition to that there is pygame. A set of Python modules designed for writing games. It's really simple and easy to use. I think even beginner programmers wouldn't have much trouble making simple games. I wrote a breakout clone that's only 147 lines, I was going to use it to teach a programming class too. There is nothing complicated in it at all, just a few loops, if statements, some rectangle geometry and negating numbers. Elementary, really.

    I think Python fits the requirement, more so than any other, for a language "that might be more 'enticing' as well."

    --
    Win a signed Stephen Carpenter ESP Guitar from the Deftones: http://def-tag.com/?r=0008781
  76. Python or Ruby by bokmann · · Score: 1

    First off, Ruby on Rails is an excellent solution for publishing a database as a series of web pages, but it is not where you want to start teaching - that is a tool for a particular solution.

    Ruby itself, on the other hand, is an excellent language to start with. So is Python. I don't think you could go wrong with either choice - better yet, teach boath over the course of a semester, solving the same excercises in either language. This will go a long way towards teaching the 'abstract skills' of programming, rather than the mechanics of any one language.

    Java would work too, except teaching with Java immediately puts you at a disadvantage - just to get a class that can run, you have to deal with concepts like classes, access (the public keyword) , the static keyword, arrays (the args[] passed to main), etc. That is a lot of theory before you can get 'hello world' off the ground. Of course you can skip all that at first, but that givesx the students a suspicious feeling. Trust me, I've tried.

  77. Easiest Programming Language by Anonymous Coward · · Score: 0

    FAITH [FAST ADVANCE IDEAL TECHNICAL and HANDY] Language by Nanosoft Systems, created by Ali Sohani (Company's President, CEO, and Chief Software Architect).

    I think FAITH is the only language which is just made and applicable for this purpose. This interpreter based language is developed in cross-platform development language Java, so it also makes it plat-form independent and according to same hierarchy all the programs built in this language possess the nature of platform independence. This language is open source and posses 100+ Commands and 200+ Statements; all are cordially developed for solely serving this purpose that every student get easy understanding of the system and language, and things related to particular language even logic building, and understandings of syntax.

    The language is basically the successor to "Command Pro" the easy graphically rich, command based interface language designed, programmed and produced by the same company. FAITH was there move towards open source development.

    I hope if one get easily the copy of FAITH because the company has still not distributed their product commercially world wide, I have encountered it in Exhibitions and requested a copy from their website after submitting my all details, so I think that this is the only language which can help novice programmers to gain fast, advance, idea, technical and handy knowledge about language.

  78. Is it just me? by swimin · · Score: 1

    or did he just describe a standard IDE, and give it as the main reason to use a language?

  79. C or SML by theapodan · · Score: 1

    In the class I learned, we learned C, which is a pretty good starting language. It makes you pay attention to safety, and has good performance, so that when you are doing something in the Real World (tm), you won't bugger it up by trusting what's already been done.

    However, C is tough, and not as useful as it once was. I'm looking at SML right now (Moscow ML), and it's pretty cool. I'd want to learn it, in comparison to Java, in which I have no interest.

  80. php then java? by Darth_Burrito · · Score: 1

    Many people I know didn't really blossom as programmers until they were engrossed in real world programming problems. I've always suspected that this blossoming can happen earlier if students are introduced to languages that allow them to do complicated useful things more easily: perl, php, etc.

    However, there is some merit to this notion of teaching some programming fundamentals that these loosely typed script languages are ill suited to address.

    The kinds of things that are taught in an intro programming classs first tend to be things like variable usage, loop syntax, if-then-else, switch/case, and procedures/functions. For the purpose of teaching these concepts, most languages are comparable. Admitedly, there are going to be distinct differences with things like declarations and typing, but this is perhaps not so important at an early stage.

    The kinds of things taught in a second level programming course tend to be things like OO design, pointers, recursion, and the like. For this kind of stuff it can be more useful to have a language like C++ or Java.

    So maybe the answer is to teach intro to programming in a scripted language (1st semester) and then advanced programming with a more traditional language (2nd semester). The intro course could be pitched as a generally accessible class while the second term could be pitched as a more in depth study of programming.

    From a different perspective, if you assume that rudimentary programming skills are going to become more necessary in the workplace, then it makes sense to teach light weight programming languages in the intro courses because these are the languages that the broadest audience can use and the intro courses are the only place you can hope to hit that broad audience.

  81. technically, php is a 'higher level language' .... by Anonymous Coward · · Score: 1, Informative

    php is a higher-level language than C. As a comp-sci instructor, you should know that. And VB teaches even worse habits than php.

  82. Language not the issue by fm6 · · Score: 1

    If maintaining student interest is your big problem, then you're not going to help it by changing languages. Visual Basic isn't the greatest language, but you can write some interesting programs in it -- interesting enough to attract somebody who's motivated to learn programming. If your class has a rep as boring, you're not going to fix it by changing the language you use. You need to look at your curriculum and teaching style. And maybe asking students what kind of software they want to learn to write.

  83. definitely C by Anonymous Coward · · Score: 0

    They don't need OO off the bat, and most other (popular) languages use the C syntax.

    You don't get a Maserati or even and Audi for your first car; you get a corolla.

    By having to watch your pointers and malloc()'s, you also learn about how the machine works; I've seen too many Java programmers start 15 copies of their apps with 1G stack sizes and wonder why they get IO errors; they JUST DON'T GET how a computer works.

    In C, you can accomplish things alot more quickly than assembler, but you are not so insulated from the machine that you lose touch.

    MORE PEOPLE SHOULD KNOW C

  84. I'd love to teach kids perl by egarland · · Score: 1

    Perl makes for a great language to pick up and program with. You can do cool things in just a few lines and use those same basic skills to create everything from GUI Windows applications to full interactive web sites to batch server based data processing applications.

    Perl is an elegant language that will let you do something useful in just a few lines. It has an object model which is bolted over some simple standard programming constructs so it's reasonably easy to flow from standard linear functional programming to OO programming.

    If you use Perl though, please, don't treat it like a scripting language like most people do. Read the perl style guide and follow it's recommendations. Use strict for all but tiny programs and use constants and find some libraries of interest to kids that would be fun to learn like Image::Magick, WIN32::Gui and LWP::UserAgent and introduce them to them.

    And as far as exciting languages go, I'm most excited about Perl 6. I've been reading a lot of the work that's gone into the language design and it seems like they are building a really great clean language which will be running on top of a cool new VM that promises to solve a lot of the problems seen with java and .net's VMs.

    Barring that.. I might go with C. Working with it isn't as hard as it used to be and you are low enough to see the mechanisms behind how computers do all the stuff they do.

    --
    set softtabstop=4 shiftwidth=4 expandtab nocp worlddomination
  85. Operating systems by jawahar · · Score: 1

    1, Teach operating systems principles.
    2. C programming
    3. C++ or Java or Perl or PHP or Ruby

  86. Definitely *not* Perl by merlyn · · Score: 1

    You have to learn Perl as your second language, so that you realize how much easier Perl is than your first language.

    1. Re:Definitely *not* Perl by ggvaidya · · Score: 1

      :)

      "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?" -- Larry Wall

  87. No, I absolutely disagree by Julian+Morrison · · Score: 1

    All coding in Perl and PHP amounts to "load module A, load module B, use builtin feature C, use A with B". It may be a sensible way for busy people to bodge together a five-minute application, but it doesn't teach you to comprehend the skill of programming.

    Quicksort may be dry, but if you've never tried to code it then the library function quicksort() is just a magic black box. When all library functions are black boxes, then you're stranded outside the language looking in - a mere "power user", not a "programmer".

    1. Re:No, I absolutely disagree by Jherico · · Score: 1
      Quicksort may be dry, but if you've never tried to code it then the library function quicksort() is just a magic black box.

      So what? If you work in a language that supports a wide array of intrinsic collection types (map, set, list, and so on) and you demonstrate the difference between different mechanisms to sort those containers, then you're teaching something far more valuable than how to implement quicksort. You're teaching the impact of algorithmic complexity. Knowing that 'find(foo)' is going to take time N on a list, time LogN on a tree map and time 1 on a hash map is far more valuable than knowing the specifics of how merge sort is implemented compared to quick sort.

      So let quicksort go ahead and be a black box, as long as its a black box that makes certain promises about what it will do when I use it, and keeps those promises. I don't care about the implementation any more than I want to know about the ATA protocol when I call fopen().

      --

      Jherico

      What can the average user can do to ensure his security? "Nothing, you're screwed"

    2. Re:No, I absolutely disagree by Darth_Burrito · · Score: 1

      All coding in Perl and PHP amounts to "load module A, load module B, use builtin feature C, use A with B".

      If this were true, it would be true for all programming languages. Just because these languages have powerful free libraries and lots of built-in features doesn't mean that you can not learn to program using them. If anything, it means that enormous numbers of practicing programmers are using these languages and enhancing their programming expertise while doing so.

      Intro programming is about variables, loops, if-then-else, functions, and logic. You can teach that while building something useful like a text editor or you can teach it while building something useless and dull like a sorting function. You can teach it in php, a language where students can actually do useful things, or you can teach it in a language like C++ where it will take them years to become productive.

      If you completely remove student motivations from the equation, then I think C++ or Java would be much better languages. However, if you remove student motivations from the equation, you've already lost the game.

    3. Re:No, I absolutely disagree by Julian+Morrison · · Score: 1

      Using built-in types to illustrate algorithmic complexity is still a bad idea. To understand what a tree map is and how it differs from a hash map, it's best to implement both. Then you can immediately grasp things like "hash maps behave like sorted lists in the pathological case that all the inputs hash into one bucket" and "tree maps are slower and more bulky, unless you need in-order traversal".

  88. BasicJ by PyroGx1133 · · Score: 1
  89. *The* best mix of teaching and doing language by freality · · Score: 1

    Java.

    Not to brag, but take a look at the things I've written in Java:

    - Java Desktop: 1500 lines.

    - Solar System Simulator: 2000 lines.

    - Backpropagation Neural Net: 130 lines.

    And that's just the beginning! :)

    Point being.. it's so easy to dig in with Java *and* get something just like those crazy guys, those C hackers get (check out the Lucene search engine before you dis Java's performance).

    I learned C in college. Bleh! Java would have made so many things so much clearer and given me a real way forward.

    Ah well. At least you can learn from past mistakes!

  90. Python or Java by evilpenguin · · Score: 1

    It depends. I think schools should emphasize the academic-like concept of free software, and there I would suggest Python. It teaches good coding, both in design and in style.

    If the class is viewed as more vocational, then I'd suggest Java. I love the language (although I still have some problems with Sun's VM on some platforms) and it is quite widely used in business. I just wish it were open source. (Although you might want to look at Fedora Core 4, which comes with Eclipse compiled natively and set up to develop Java code using gcj, a native compiler for Java and, yes, free software! The only issue there is that the APIs for Java are "variably" implemented (some are up to current Java, some, like the Swing GUI API, are not implemented at all)

  91. Python, and another point by bkhl · · Score: 1

    First, as someone else pointed out, teach programming not a programming language.

    However, I must say I've had very good experiences with Python as a teaching language. The code my fellow students churn out is invariably of much higher quality than what they've been able to do in for instance Java.

    It seems that Python's design philosophy, which is meant to improve code readability &c., really works.

  92. What is the goal? by Anm · · Score: 2, Interesting

    I'm seeing lots of good advice, but a lot of it coming without a few very simple questions. What are you wanting the students to come away with? And what are the students interested in coming away with?

    Back in high school, when I was first learning to program, I wanted some level of instant gratification. This is the basis of languages like Logo, where a core set of commands give a visual representation. But we can get similar results today in other domains.

    losman mentioned UnrealScript, which I generally like, but still has some drawbacks. First, is the cost of the handful of Unreal licenses and the hardware to run them. It also assume the developers are on Windows (at least until UT2007), which may not be true for students at home. But beyond such technical issues, are you going to handle the distractions/complications of the additional media assets? As a teacher, if you're up to the challenge, you can take advantage of this to drawn in more students and allow students to follow their own interests within the environment. Ideally, students can group around projects where they all contribute based on their interest. Lastly, can you handle the parents (or tax payers in a public school setting) who see violent video games as inherently evil.

    Web apps can offer similar instant gratification. The pitfalls here include maintaining a server that allows server side scripts and teaching HTML (and probably basic browser compatibility) along the way. Again, you need to decide whether hooking into additional media is going to be an advantage or distraction in the classroom.

    One problem both of these share is the difficulties in tracing the stack. Their unique run contexts can make it hard to debug problems, which can be as frustrating for your students as it is for you trying to help them as project dues date approach.

    That said, it is possible to bring the engagement of a game to other development platforms. A small top down arcade game can teach several core concepts, from simple data structures (lists of actors, multi-dimensional arrays of terrain, variables like position and health, event handlers from input or actor collision). Build an outside level editor and you can teach GUI development, file I/O, and string manipulation.

    If you go the GUI and graphical route of a game, Java seems like a good match. I believe it works well in classroom scenerios. At the basic level, the virtual achine it free and platform independent. Several good IDEs are available, and I believe there is work on an Eclipse plugin geared toward students. The APIs are stable, self-consistant, and well documented, although exceptionally broad and thus easy for a novice to get lost in without guidance. And if you target applets, students have a simple way to show off their work.

    I'm sure C# has basically the same benefits, but I don't know enough to comment on it. Given an MS grant for a Visual Studio lab, I wouldn't rule it out.

    Python is also an option, but I would choose wxWindows over tkinter anyday. Being a dynamically typed language, you loose the support of a context sensitive IDE, but you gain the easy access to a shell-like evaluation environment, useful for allowing students to interactively test thier code fragements (actually, integrating Beanshell into a java app is both easy and useful). I've never found a debugging environment for Python I liked, but at least they exist.

    Several other scripting languages could be mentioned here, but again I am not familar enough to comment on them.

    Other posts have mentioned C, C++, and assembly. While I think they are all critical for a complete CS education, I am not convinced they are ideal for a high school introduction course.

    However, if the target audience is more advanced, I would put C on the table before the others, especially if taught in an object oriented way to mimic modern programming practice. This is a great way to show what that C++ compiler or that Java or C# VM are doing on the metal.

    Anm

  93. Maybe two. by holy+zarquon's+singi · · Score: 1
    I'm a perl guy (well, just lazy and I sometimes cut code for money but also have other ways of making a living too), but I appreciate that people in my position these days would be better off with Python.

    And because it's everywhere, javascript.

    --
    "...we should just trust our president in every decision that he makes and we should just support that." B.Spears 2003
  94. "Scripting" language by DavidNWelton · · Score: 3, Insightful

    Java might be ok for some people - I think that's what AP Comp Sci classes use. However it has a few drawbacks:

    1) It doesn't "scale down" as well as languages like Python, Ruby, Tcl etc... So might not be as well suited for those who aren't as interested/motivated/quick on the uptake.

    2) It's kind of dubious, IMO, to be promoting a product of one company.

    In any case, that would leave us with the scripting languages, which I think are all worth considering for different reasons, and all have in common a faster, easier development cycle with no need to recompile each time.

    Python: clear, easy to read, and very general purpose. Good introduction to OO without beating you over the head with it or forcing you to adapt to it from day 1.

    Tcl: because of the interesting introspection that it has and uses for certain common programming tasks, I'm not sure it's the best to start with, but on the other hand, being able to create something *visible* on the screen with a few lines of code is pretty gratifying, especially for a beginner. (Python has Tkinter which is pretty good too, but slightly more complex to start with than regular old Tk).

    Ruby also seems like a good, reasonably generic language - I don't know it as well, but from a casual glance, don't like the (willful) resemblance to Perl in terms of the syntax. But I think you could do a lot worse - you'd certainly have some advanced concepts available to teach with it.

    If you teach them PHP, you're going to be teaching them web programming, basically. I'd stick to a more general purpose language (you can use PHP for general purpose tasks, but it's still really oriented towards the web).

    On the other hand, if you've got bright kids and are willing to explore something interesting, you might try languages like Smalltalk or Scheme, that introduce some really interesting ideas.

    1. Re:"Scripting" language by chthon · · Score: 1

      I program since about 20 years, and have programmed in several different languages, but I found How to Design Programs very interesting to read and study. It really gives a nice methodology, which has influenced quite my programming, even in Perl.

    2. Re:"Scripting" language by trouser · · Score: 1

      I've said it before and I'll say it again....

      Remember kids, the difference b/w a scripting language and a programming language is that a scripting language is a programming language whereas a programming language is a programming language.

      --
      Now wash your hands.
  95. Best Language for Beginner Programmers? by GavinW · · Score: 1

    Easy: Lua

  96. What you need is... by Singletoned · · Score: 1
    You need a language that's:
    • easy to learn
    • teaches good programming practice
    • has powerful advanced features
    • has lots of free documentation
    • works on a variety of platforms
    • is fun and satisfying to use
    It's a shame there isn't a language designed from the ground up to have all that
  97. Difficult by jilles · · Score: 1

    I can see your problem. High school kids are not computer science students so you need something simple. You want to teach them something useful that will help (and motivate) them to possibly consider taking a bachelor/master in an IT related field.

    I was about to recommend Java. But I think that might be too abstract for high school kids. You'd probably end up scaring most of them with it (and I am a Java programmer). The nice thing about VB was that it is simple, gets results quickly and that there used to be a market for VB programmers. This market (and the market for fat clients) is disappearing rapidly.

    So you need a replacement that is easy to learn for not particularly talented high school students, gets results fast and has some reasonable demand in the job market. That excludes legacy stuff like pascal, delphi, vb; obscure scripting languages such as perl, ruby.

    Php is popular but is a bit the C++ of scripting languages: you can do lots with it and you'll likely shoot yourself in the foot. In other words it's not the ideal language for teaching. So I point you to similar languages like jsp and asp.net. You can do similar stuff with those technologies. In the case of jsps there is java behind it and lots of useful taglibs to do difficult stuff. You get results quick; web pages are something every high school kid understands. There's definately market demand for jsp programmers. Asp has similar advantages and may be a logical successor to your VB based course. Tools might be a final consideration. Microsoft can be expensive but they are known to make deals with educational institutions. Java/jsp tools are available for free but come with requirements that might exceed what you have in the school computer rooms.

    --

    Jilles
  98. What a load of rubbish by crucini · · Score: 4, Interesting

    The idea that learning something can "mutilate" you or decrease your ability to learn other things is crap. I, and most of the good programmers I know personally, learned on BASIC - evil old unrepentant BASIC, full of GOTO and GOSUB. Maybe Dijkstra had trouble teaching "good programming style" to students with a BASIC background because they had experience, and weren't automatically willing to accept someone else's definition of "good". Or maybe he was just kidding.

    BASIC was grungy, useful, widely available, and offered a fast edit-run loop - key ingredients in getting a lot of kids hooked on computers.

    1. Re:What a load of rubbish by Xtifr · · Score: 1

      A) I can't believe this discussion is going on days later. (Although I suppose that's not your fault.)

      B) Mighty freakin' sensitive, aren't we? I started with BASIC, just like so many other people, and I was able to post that classic bit of humor. You, on the other hand, freaked out and went into a tizzy when you saw it. Is there some reason you're so defensive about being accused of being mentally mutilated? Maybe you've had people look at your code and make snide comments? :)

      In my experience, most people who started with BASIC and who are any good at programming fully understand Dijkstra's position, so I think your hypothesis that it was just because they weren't willing to accept someone else's definition of "good" is clearly crap. I know it took me quite a while to unlearn the lessons of BASIC. Maybe Dijkstra was kidding AND there was a strong, underlying element of truth to what he said. But I can't believe I'm having to explain this--most good programmers who started with BASIC know this already! (See, for example, most of the other replies to my post.)

    2. Re:What a load of rubbish by crucini · · Score: 2

      I'll tell you why it's a hot button for me. I tend to learn concretes first, concepts later. When I was 12, BASIC completely hooked me on programming. I was like the rat with a button wired to the pleasure center, and would have died of dehydration in front of a TRS-80 if not forcibly removed. Much like a talented kid banging on a drum kit, I was in love with the feedback loop, with the immediacy of the machine. In time, the love and deep awareness of computers that BASIC implanted led me through many platforms and languages.

      I'm grateful that nobody tried to teach me about computers back then. I was not very receptive to adult authority at that age. I hear suggestions now to start kids with smalltalk, C++, java, whatever. I'm sure these things would not have interested me at 12. You have to write a lot of BASIC and/or assembler before you understand the point of C. You have to write a lot of C before you understand the point of C++. Those who are spoon-fed C++ at an early age must have an awfully hollow understanding.

      I am immensely grateful to those who created the early personal computers and BASIC interpreters. It's notable that the computer science establishment did not contribute much to this effort. While they were pottering around in their ivory towers, Prometheuses like (gasp) Bill Gates and Paul Allen were bringing the micro to the masses. When the privileged folks, who had access to good technology before everyone else, criticize the democratizers of technology, it irritates me. Remember how UNIX folks bitched about Linux when it was young?

      This comment has gone long enough, and hardly scratched the surface. I'll just say I was very lucky to grow up when I did - I don't think the aspect of computing that young people see today would have interested me at all.

    3. Re:What a load of rubbish by sedyn · · Score: 1

      I learned a version of BASIC using the TI-calculators when I was younger. That being said, I can accept students learning BASIC for a short time. But, as a student's mind matures they should begin to hate the limits of BASIC.

      The only problem is, as far as I see, is that level of self-reflection is not entirely possible by most people. I know many people who only know Java well because it was the first thing they were taught. I can only imagine if they were that bound to BASIC.

      I think BASIC can be used to demonstrate print, for, while, boolean logic, arrays, etc. But beyond that it begins to teach bad structure in code. That one will have to unlearn later in life.

      Ivory towers exist for a reason. And in computing I've found that it boils down to the following:
      Software engineering sees computers as a means to an end. Computer Science sees computing as an end in itself. Therefore, don't expect computer scientists to compromise the computing world. In the words of Dijkstra, you don't give the user what they want, you give them what they need.

      --
      Am I open minded towards open source, or closed minded towards closed source?
    4. Re:What a load of rubbish by crucini · · Score: 1
      Software engineering vs. computer science? Teaching, demonstrating, students?

      I have more liking for CS than for SE, which is mind-numbing with its jargon. But the concept of teaching programming does not well with me. Teaching a language, yes. But I feel sad for the people who learned about computers as an academic subject, something doled out by adults like algebra and history. Computers can be better teachers than adults. Not all people like to be "students" and not all intelligence is "book smarts". You do eventually need the book smarts to be an effective modern programmer, but which is more of a hook to a kid: a chance to study complexity theory, or a chance to code up a simple video game?

      In the words of Dijkstra, you don't give the user what they want, you give them what they need.

      Did he really say that? I guess that explains why we're all running Dijkstrix!
  99. Befunge, Intercal or Bancstar by Dioscorea · · Score: 1
    see e.g. the Turing Tarpit

    (I've taught Perl as an introductory programming language. Seriously. What can I say; bioinformatics is a macho subject)

  100. logic design and assembly by jotux · · Score: 1

    In high school I took a class in BASIC, and then C++. And my first year of college I took an ANSI C class. But it wasn't until I took a class on logic design, and then a class in assembly that I understood what was actually going on. If you want to teach students what is actually behind a program, show them what is happens on a logic level...and how those loops and interrupts actually work.

    A good book for beginners in logic design(and the overall idea behind semiconductors and circuits) is bebop to the boolean boogie
    And once assembly is introduced, you can use an emulator like emu8086 to let them watch the program as it runs.

    You could of course take a top-down approach, and teach them php/perl/vb. But I've always felt that if you work from the bottom up, not only will they appreciate the fact that higher level languages are so much easier, but they're understand what is going on behind the scenes.

    1. Re:logic design and assembly by Anonymous Coward · · Score: 0

      Mmm the main benefit of learning digital logic is that many of the concepts extend to language logic. Beyond the similarity of logic, the two types of design are irrelevant.

      Digital logic is presented in a visual form while language logic is presented in verbal form. Hence the students who are more inclined to learn through visual stimulus will be able to grasp the same concepts more easily through digital logic as most teachers make minimal use of visual illustration when teaching languages.

  101. What is the end goal? by Anonymous Coward · · Score: 1, Interesting

    You should choose depending on what you eventually want to achieve.
    For example: If your school wants to 'produce' software engineers, get them on Lisp as soon as possible (using SICP as instruction book), and do not worry too much about dropout rate.
    If your school wants to give its students a feeling for what programming entails, get them onto something to which they relate, for instance MS Word macros, or possibly MS Access (end year project: write something that produces a list of all MP3s/addresses in you address book on your PC that are not backed up on the PC of your friend)

  102. Definately Smalltalk before Java by VAY · · Score: 1

    I learned Smalltalk in acadaemia, and I am now a professional Java developer. I am very grateful that I was able to learn OO via a pure language. I deal with Java developers every day, who either learned Java first or worked in a procedural language previously, and all they do is write procedural Java. By all means, teach C, Assembly or some other close-to-the-bone language to teach the fundimentals of computers (I learned Pascal and C before learning Smalltalk), but don't let them get paid for coding until they have programmed in a pure OO language.

    --
    What luck for rulers that men do not think. - Adolf Hitler
  103. What is "dubious" about it? by fcgreg · · Score: 1
    2) It's kind of dubious, IMO, to be promoting a product of one company.

    I'm not exactly sure why this is "dubious". In any case, I have to take issue with the rest of this.

    Java is an open language, an open spec, and is NOT the product of "one company" in the generic sense that you imply. Notice I didn't say "Open Source", but neither did you. Open Source is a very different and specific thing, and that's not what I'm talking about.

    If I were to offer another example in such a general stance , I could say that PHP is mainly the product of Zend. Of course, this isn't correct unless qualified for basis, which is all I'm asking for here.

    Just my two cents...

    --
    Greg T.
    1. Re:What is "dubious" about it? by execute85 · · Score: 0

      Java is not an open spec. It is owned and controlled entirely by Sun. They accept feedback from other members of the JCP, but all the decisions are made by Sun. Java is not submitted or controlled by any open standards organization.

      So it's not open like C/C++, et al

    2. Re:What is "dubious" about it? by fcgreg · · Score: 2, Informative
      Java is not an open spec. It is owned and controlled entirely by Sun.

      Please, please. How many times does this have to be rehashed here on Slashdot and the Internet in general, especially when good, detailed information is so easily accessible? The Java "language" is an open specification. How do you think GCJ and other projects are able to do their work? Sun's JRE source code is quite a different story, for example, but that's not what I was referring to.



      They accept feedback from other members of the JCP, but all the decisions are made by Sun.

      This is incorrect, actually. The final "decisions" are made by the applicable Expert Group for the submitted JSR, which is made up of industry "experts" from many different companies, possibly including Sun, but often not. For a nice breakdown of the entire process, please see here:

      http://www.javaworld.com/javaworld/jw-10-1999/jw-1 0-jcp.html

      Hope that helps.

      --
      Greg T.
    3. Re:What is "dubious" about it? by execute85 · · Score: 0

      OK, what open standards group controls the Java langugage specification? ISO, ECMA, ANSI? There's not one, Sun decides what goes into the JSE release. All the JSRs for the JSE/JEE releases are controlled by Sun. The Java name is trademarked to Sun as well. Java is not as open as C/Perl/Ruby/Tcl/and others.

    4. Re:What is "dubious" about it? by stanmann · · Score: 1

      Open=Exposed or Accessable in common usuage, you are trying to use Open=By Committee or Consensus.

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
  104. Yes... by fcgreg · · Score: 1

    I think it's just you. Sorry.

    Maybe you should go back and read the sentences about "Java". ;-)

    Seriously, his implications are clearly directed at Java and Eclipse being a powerful combination to "explore the basic practices of OOP".
    --
    Greg T.
  105. Actionscript is a good start by Device666 · · Score: 0

    It matters if you want people to learn OOP or functional programming. Actionscript 2.0 (Macromedia Flash scripting language) is very good to learn OOP and a joy to work with. It has only the most important OOP features and strong typing. The movieclip is a strange thing to a developer, but at the same time a joy. People have in no time graphics, sound and lot of other stuff. The effect is that newbe's can quickly have their program working. This makes them more enthousiastic to learn more. One might say, why not Java? Well Java is a extremely large and complex language. I think it's just better to keep it a little more simpler. I think the complexity of Java is really underestimated. I think it even maybe more complex than C++. Newbe's may drown in it. Functional programming can best be learned with a pure functional language, such as Haskell. The language is very strict and learns you good coding habits.

  106. Why java, why ohh why? by domipheus · · Score: 1

    Java a good language for the beginner? I really do not understand this statement - because the one thing that really hits beginners hard, is syntax.

    At Glasgow University (Scotland), the first and second years of the programming course(s) are only in ADA95. Why? Because ADA95 has all the programming features a beginner needs, in clear english. A beginner should not be taught a language, at the end of a computing course they should be able to quickly learn and program any another language. Take the following example:

    with ADA.TEXT_IO;
    use  ADA.TEXT_IO;

    procedure PrintHelloWorld is
    begin
      put_line("Hello World!");
    end PrintHelloWorld;

    or

    public class HelloWorld {
      public static void main(String args[]) {
        System.out.println("Hello World!");
      }
    }

    What is easier? From the ada source you know that this code is defining some sort of procedure of actions - the first thing you are taught in programming - it is telling the computer to perform a series of steps. The with and use easily make you see you are taking input and output and using them. And I have serious issues as to saying ada is unstructured, as it is one of the most typesafe-enforcing bugger on this earth, and has all the usual data structures - even pointers and packages.

    All i can assume from your post that you are some sort of OO fanboy. OO is not everything, it certainly is not the answer to world poverty, and if every graduate came out of university not knowing non-oo concepts the industry would be in a very grave position indeed.

    1. Re:Why java, why ohh why? by jd · · Score: 1
      LOL! Me? An OO fanboy? Given all the times I've ranted about how OO is impossibly slow for real world work, because of paradigm conflicts? Sheesh!


      My two main languages are C and 80x86 assembly. (If I'm going to program, then damnit, I'm going to program for the kill.) I learned programming on Commodore PET BASIC and moved over to the more structured BBC BASIC of the Acorn BBC computer range. Procedures were good! You could also do neat hacks, like GOTOing a variable, rather than a fixed address. Ah! The days of the *FX commands!


      About that time, I learned Forth, Pascal and LISP. My current list of computer languages is somewhere in the mid 30s and still growing. I used ADA at the University of Glamorgan, and frankly it sucks.


      The first problem is the very thing you call a benefit - it is in plain English. This means that your brain will assume interpretations of the syntax which may or may not be valid. That's the worst thing you can have in a program, as it is liable to lead to non-fatal errors, which are a royal pain to fix. This is one reason COBOL is not a good learning language.


      The second problem is that Ada is both strongly-typed AND allows generics. That mix doesn't work well. Either have something that is strongly-typed and enforce that decision, OR use weak-typing and strong constructional rules. Mix-and-match leads to programs that are hard to read and harder to debug.


      The third problem with Ada is the ability to override in ways that are transparent to the coder. A * operation may or may not do what you expect - and you have no way of knowing by looking at the source. It depends on what could override the operator.


      Overriding in an OO language is more acceptable, as the operations are tightly bound to the type. By knowing the type you're using, you should know the operators. Even there, it's not perfect. You can have your program import one of two classes where overridden operators behave differently. By inspecting the visible source, any bugs that are caused by the different behavior will be impossible to detect.


      The number #1 rule in ALL programming is that you should ALWAYS be able to detect and correct bugs by inspection alone. Why? Because you can't test all possible cases, so the only possible way you CAN validate the correctness of the code with any real certainty is by inspection. Being able to QA by inspection also enforces good Software Engineering practices, which means the code will be cleaner and more maintainable. If it is designed and written WELL, it should also be smaller AND faster.


      If I can take the code you've written and reduce the size by one or more orders of magnitude - base 10 - AND improve speed by about the same AND improve readability, all at the same time, then your code could only be considered crap by any standard. In most real-world cases, only two of those three are important, and I can almost guarantee that I can improve the two important parameters in any software written by over-structured OR under-structured programmers.


      Over-structure really is important. It is a sign of over-engineering. A correctly-engineered program should have exactly enough structure to enforce the invariants and impose the boundaries, but nothing more. Absolutely anything beyond that is bad programming practice.


      For this reason, Ada encourages REALLY bad programming practices, as it is very sympathetic to over-structuring. It practically encourages it. It's one reason why Ada has such a bad rep, along with Modula-2 and Modula-3. I know more engineers who - without formal training - can write a good program in Fortran or Forth than I know Software Engineers (who nominally HAVE extensive training) who can write good Ada.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    2. Re:Why java, why ohh why? by CableModemSniper · · Score: 1

      The second problem is that Ada is both strongly-typed AND allows generics.

      Me confused. Does this mean you don't like Haskell either for the same reason? I thought the whole point of generics was to make static typing less of a pain in your ass without giving up the advantages of static typing.

      --
      Why not fork?
  107. Methodology vs Tools by uohcicds · · Score: 1

    I work in an academic department where our principal teaching language has (for the previous 5 years) been Java. This has all been very well, but some of us have felt that the pace doesn't stretch the most able nough and takes too long to actually do anything useful. This is not actaully as criticism of Java itself, because I think it has a lot to recommend it and is relatively well designed.

    As a result we are thinking about how this should change (not this year, but next). The important thing is to teach the concepts of programming first, so understanding variables, loops and conditions is, I think, paramount.

    The issue of OO is more thorny. Many useful scripting tasks are, for example, written proceduarally, but larger applications usually beenfit from OO technques, tools and analysis. For that reason, I'd probably leave objects for a little while and get them writing smaller things that do useful stuff. Scripting is good for this because they can see the results of processing text fairly easily. I've discovered that over time, many students who have learned with Java have been almost unable to think in any other terms than OO if they don't get exposure to other technqiues quite quickly. Currently, we have a language paradigm module running in the final year of our programmes but I'm not sure if this is perhaps too late to be really useful.

    Having said all of that, I would probably think about introducing programming via a language like Python. It's fairly clean in syntax, can run procedurally then have objects built on top as neccesary, encourages good style and is portable. Perl is a great language but definitely not for novices. The very strength of the language is the thing that might throw beginners: there are numerous ways to do one thing, and that might lead to confusion.

    I remember reading some of Eric S Raymond's work that says that to hack well, you should know several different languages. If I recall he mentions Java, C, Perl, Lisp (for later) and touches I think on Python. As I talked around earlier, useful though Perl and C are, I wouldn't recommend them as first languages to learn with. I'd also recommend a shell language like bash or ksh for later too.

    A collegaue of mine would probably also suggest you consider a language like Oberon or another of the Modula / Pascal family, because that is what they were principally designed for. They've fallen out of fashion now, but don't let fashion put you off.

    --
    It's not you: I'm just this horrifically socially awkward with everybody.
  108. Smalltalk (Squeak) by Tooky · · Score: 1

    SmallTalk could be a good option.

    Squeak is a SmallTalk implementation: http://www.squeak.org/

    http://www.squeakland.org/ has a whole load of resources for teachers and students.

  109. Get them hooked with Python by Nice2Cats · · Score: 1
    Use Python as a first language -- it works right away, and that success will get them hooked. The syntax is such that "it fits your brain" -- it is easier to remember than C++ and Java. Python's amazing depth lets you slowly introduce more complicated concepts like list comprehension and slots, the use of libraries, OOP, and the correct ("pythonic") use of exceptions. Because it is interpreted, the write-test-learn-rewrite-run cycle is very short -- never ever start with a compiled language.

    Then I'd go hardcore for a while and teach them C so that they learn about all the ugly low level stuff, compilers, and why pointers are dangerous. You might want to take a moment to talk about Assembler here (the gcc compiler has a nice option to show assembler code). Even if they never hack the Linux kernel, C-like syntax is used all over the place (see Objective C or C++ or C#). It is sort of like Latin -- difficult, not used that much, but very valuable as background knowledge.

    Then you might want to try something exotic or at least completely differnt. Many people recommend Lisp, claiming it give you Zen-like insight; but Haskell or such probably should be nice, too.

  110. Web development no good for learing good habits by iconara · · Score: 1

    I would not recommend PHP nor Ruby on Rails, for the same reason I wouldn't recommend learning to program in J2EE. The problem is that programming in that environment will teach the students odd habits and ways of solving problems that are not used in desktop application enivornments.

    Students will not learn about MVC, event handling, and will get into the habit of treating everything as a request-response loop. It can be quite hard to later try to write an event-driven desktop application.

    The web application environment is seriously limited and there's isn't very much to do about it as things are now. Spring for J2EE has made things better, but it's still not good. Perhaps Flash and emerging trends like AJAX will push things to the next level, but until then programming for the desktop will teach you so much more.

    Even though J2EE and Ruby on Rails are both OO environments, there isn't very much OO to the development, in my opinion. The frameworks are OO and you use objects, but the actions you write are procedural, everything takes place in an execute-method and you are instructed not to use instance variables... the model is quite OO, but writing POJOs won't teach you very much, and writing data access code is not helpful for a beginner. The views are not OO in any way.

    Of course I'm assuming that we're talking about learning to program in an object-oriented language /environment. However, I don't think that learning to program in functional or declarative is very helpful for beginners.

    Java is a good language to know, but as someone once said about the problems of using it as teaching language:

    "There are four problems with teaching Java as a first language: 'public, static, void, main'."

    The point being that you have to explain quite a lot about object oriented programming before you can even start to explain the easy parts, or say to the students "ignore this for now, I will explain later", which never works, it only confuses them.

    I agree that Python or Ruby are better choices for beginners, who can then learn public, static, void, private, protected, abstract, final and other advanced OO concepts in Java quite quickly, as soon as they have learned for, while, if, classes, methods and objects.

  111. Several options by v1z · · Score: 1

    First, not php, not even php5. It's not a nice, general programming language, even if you can use it for cron scripts (ugh).

    I'd recommend going with a language with a good interpreter, such as squak, python or ruby. The choice should be based on what kind of project you want to focus on; for web development, go with ruby on rails. For games go with squeak or python. For system programming go with python.

    If you want to be hardcore, and teach about the (now almost-redundant, even-if-sun-kept-it-for-java) write-compile-test loop, I'd choose pasacal, with free pascal 2.0. Then you can even teach som assembly. For me pascal syntax is more intuitive than c, it's about as fast, and it doesn't teach you any *really* bad habits.

    The only problem with Squak, is that the platform is so advanced, it's likely to instill a false trust in the human race, and programmers and system developers in general, that will be crushed the first time they try to write a cross-platform program in anything else.

    Oh, and for some nice rad development, you could always go with objective-c and gnustep.

  112. Scheme by namekuseijin · · Score: 1

    "a decline in the number of students that want to take our entry level-programming course in Visual Basic."

    Thank God! at least it seems there's still hope for mankind...

    "the idea of having the introduction course be in PHP"

    wouldn't be much better than VB, except it's free.

    "or Ruby on Rails;"

    isn't a language, but a framework. But Ruby is indeed an excelent language for both teaching and work.

    "but are not convinced that they lead well into higher level languages."

    sorry? say again?! You won't find many "higher level languages" out there that outbest Ruby or Python... let alone C descendents like Java...

    still, my personal recomendation would be Scheme, a Lisp dialect that many north-american Universities teach. It features:

    * ease of syntax ( almost none at all )
    * a compact standard library ( R5RS ) perfect for teaching how to think algorithmically rather than being trained at a whole framework to pump out web pages.
    * high level programming at its best with a very flexible and expressive language

    Of course, if you are just willing to prepare them for "real life", just go the easy way with java and craploads of libraries to cope with such a poor language. And don't forget a huge bloated IDE to cope with the loads of redundancy such a poor language and its loads of libraries generate.

    --
    I don't feel like it...
  113. Difficult language to set the scores even? by spiff42 · · Score: 1
    I used to recommend assembly, then scheme, just so all the people who entered thinking they were programmer hotshots because they knew BASIC, VB or C or something would find themselves in deep water and having to learn something new.

    But I suspect that's a bit overly hostile. Depends on the environment of course. Still might be a good idea for people going to a hard-to-get-into technical school to knock them down a peg or two and convince them that there's stuff they don't know.

    This was exactly what happened when I started at the Technical University of Denmark in 97. During the first semester we were taught a great deal of programming, all in Standard-ML, which being a functional language really set the scores even for people with and without previous programming experience. This was certainly good, but failed miserably when the rest of the courses expected that you already knew some other languages, but none of these were being taught. So everything was back to a state where those who knew some language were a lot better off.

    At this point I think they dropped the SML in favor of teaching Java in the initial courses and sticking with that through the entire education (unless you decide to learn another language yourself). I really don't think this is the best way, since I believe understanding the concepts of programming is easier when you try applying it to different languages.

    /Spiff

  114. Functional? by BSDevil · · Score: 0

    I'm not sure that teaching a functional language is a good call for a studen't first exposure to programming. While they're nice from a theoretical point of view, it dosen't seem that teaching a language that's fundamentally different from most of the big languages out there does them much good in the future. DrScheme (sticking to its functional part) is a good language to learn functional programming in, but not to learn the basicis of programming in general.

    Give them a nice procedural or OO-centered language, so that they can get the overall feel of programming, and can try things at home. Once they're interested, then take them into things like functional programming.

    As for language choices, start them with something like C++ (get the idea of compiling in there, but avoid the more complex bits of it), then a simple assembly language, then a functional one.

    --
    Cue The Sun...
    1. Re:Functional? by Anonymous Coward · · Score: 1, Informative

      I'd disagree. If you start with C++ you spend your time learning syntax not programming, or computer science. Scheme has a very minimal syntax, and so you can start learning about computation, not where to place the "}", ";", ",", etc. If you want to "get the idea of compiling in there" thats fine. A program written in DrScheme can be interpreted, compiled to byte code, or compiled to an executable. Scheme also supports variouse programming methodologies. If you wan't to learn OO you can there are OO libraries available (The DrScheme GUI is written using classes, methods, all that fun OO stuff). If you want to do functional that's fine to. If you want to do procedures Scheme supports that also. I agree that Scheme is "fundamentally different from most of the big languages out there" that isn't a bad thing. The teach scheme project (http://www.teach-scheme.org/) has been using Scheme to teach programming in high school for years, they've found that students that spend 1/2 a year learning Scheme followed by 1/2 a year learning C++, end up being better C++ programmers than those that do a full year of C++! The theory is that they learn how to program first then how to program in C++ (the syntax) is easier. As a side note they also use Scheme to teach algebra, as Scheme is very close to executable math.

    2. Re:Functional? by IpalindromeI · · Score: 2, Insightful

      I would contend that it's much easier to move from functional to procedural than the other way. Witness the teeming masses of procedural programmers that end up saying, "Well I tried looking into some of that functional stuff because it sounded interesting, but it's just too weird. I can't get my head around it." I know some very bright programmers who have a lot of difficulty with the functional style because they're so used to procedural.

      In contrast, I think anyone could pick up procedural programming if they had already learned a different type. It's basically just typing out instructions for the computer to perform. And I'm not a functional programmer trying to disparage the procedural method. I've been programming in C++ and Perl for years and only recently started feeling comfortable with Haskell.

      I think the biggest disadvantage to teaching functional first is that functional languages usually have more features to offer than procedural languages, so it can be a bit frustrating sometimes moving in that direction.

      --

      --
      Promoting critical thinking since 1994.
  115. depends what you want to teach them... by orabidoo · · Score: 2, Informative
    If you want to teach them Computer Science and the deeper concepts of programming, then give them Lisp and/or some form of ML.

    If you want them to have a clue how computers actually work, show them assembler and/or C.

    If you want them to learn the "my data is mine i can easily do what i want with it" attitude, teach them Python, Perl, Ruby or PHP.

    If you want them to get "standard" jobs in the industry, teach them Java or C#, with some C++.

    In no case would I first show them any form of Basic. Kind of brain-damaging as a first language.

    My personal take would be to give them two different classes corresponding to the first two items in my list: ML/Lisp and assembly/C. Make a solid grab at the two extremes and they can always figure out the 'middle' stuff on their own, which is comparatively easier.

  116. And the great thing about PERL is.... by HogynCymraeg · · Score: 1

    ...you get your obfuscation for free!

  117. Obligatory Bash.org quote by Geshem · · Score: 1

    someone speak python here?
    <lucky> HHHHHSSSSSHSSS
    <lucky> SSSSS
    <Sonium> the programming language

    --
    || Geshem ||
  118. Inform by jonadab · · Score: 1

    For introductory programming, Inform is an excellent choice, for several reasons:
    1. The Inform Designer's Manual is an absolute masterpiece, easily the best
            computer language manual I have ever encountered.
    2. The designed problem domain of the language is one that immediately
            captures pretty much every student's imagination. Your students will
            flock to you with questions about how to accomplish this or that.
    3. The OO model of the language is excellent, very practical, and overall
            a very good introduction to object-oriented programming. And it's such
            a nice fit for the problem domain that the students will immediately
            understand the usefulness of the paradigm.
    4. The language is naturally pretty easy to read, even for people who
            don't know it very well. Things are well-named (especially using
            the standard library), so that it is fairly obvious what they do.
            Many people have taught themselves this language just by looking
            at example code, without reading the manual until they had already
            written quite a bit of code themselves.
    5. The standard library is an important part of the system, so the
            student will be introduced immediately to the concept of standard
            libraries, much more readily than using e.g. Visual Basic.
    6. It's a good compromise between high-level and low-level and indeed
            really has both -- a quite high-level OO paradigm and yet also the
            ability to do some fairly low-level things if need be. Fairly large
            programs can be written without actually using the low-level stuff
            (except indirectly, through the standard library's high-level
            interface to it), but it is easy to introduce specific programming
            problems that will require one of the low-level features to be used
            if that is desired.
    7. The Inform Designer's Manual is so excellent, this point really
            cannot be overstated.

    No, it's not a general-purpose programming language, and your students will have to go on to learn other languages. But most of the languages used as first languages for teaching (BASIC, Pascal, ...) share this property, and in any case it's best for students to learn multiple languages anyway, the more the better, to gain exposure to different paradigms.

    --
    Cut that out, or I will ship you to Norilsk in a box.
    1. Re:Inform by jonadab · · Score: 1

      Oh, and also using Inform will introduce the student to the concept of extreme portability. Not all students will care ("Why would I *want* anyone to run my programs on a Series D Pocket Wocket IV?"), but at least they will be introduced to the concept.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  119. Why Not PHP? by stan_freedom · · Score: 1

    This is an introductory course for high school students. I'm picturing a bunch of kids who don't want to take wood shop. They probably can't even name a programming language. The kids who are truly interested in programming are probably already running the computer lab.

    PHP introduces the basics of programming without alot of the overhead that other languages require. It can easily interface with DBs, can be executed from the command line, has hooks into all sorts of interesting libs, and it is freely available outside of the classroom. Furthermore, there are a plethora of projects that use PHP, providing source code examples.

    Kids in an introductory course want results, not theory or complexity. If they are interested, they will learn the theory and take on the more complex languages. Keep It Simple, Stupid!!!

  120. Squeak/Smalltalk by VideoJ · · Score: 1

    Smalltalk using the Squeak. Smalltalk is an easy langauge to lean, lot's of cool examples and a blast to program in.

  121. Good language for beginners by jobo5432 · · Score: 1

    Although I hate to admit it, JavaScript is a great language with which to begin. I hate to say it because a basic knowledge of HTML is required, and because debugging JavaScript (even after all these years) is a pain in the A**.

    What IS rewarding about JavaScript is that you need relatively littel knowledge to see something tangible. Also the tangibles are enough to encourage a student to learn. Try doing image tricks - (i.e. Changing images onmouseover, etc..

    I learned to code on C++ and I thank my professors for it. It was like learning to drive a stick-shift first, and then driving the automatic-shift is an afterthought.

    Whichever language you choose, just remember that they're only kids, and pushing them too hard too early will push them away forever. Coding is one of those things that people love or hate.

    -Jobo

  122. Definitely Ruby *and* Scheme by metamatic · · Score: 1

    The advantage of Ruby is that it's extremely consistent, without a lot of the special cases of (say) Java or Python.

    Specifically, there are two scoping rules, all variables are references, everything is an object, it's true OO, it has lambdas, all the loops and other structural elements end with "end", there's no problem with tabs vs spaces.

    I'm fairly new to Ruby (few thousand lines written), but I find it has an effortlessness about it that I've never experienced in a programming language before.

    I'd also throw in some Scheme, just to get people used to the ideas of functional programming, program as data, and recursion. However, Ruby is better at doing useful things that might interest people (e.g. CGI, graphical toys, handy command-line utilities, etc.) sad to say.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:Definitely Ruby *and* Scheme by marcello_dl · · Score: 1

      I wholeheartedly agree. Python was bashed in another thread because of whitespace/tab issues but I think the worst problem for total beginners is that its syntax for classes and method calls is not as clear as Ruby's. Java? i'd say that it's easier to work with an interpreted language, especially for the first concepts. Needing to talk about compilation, or creating static methods just for a simple if-then structure seems confusing. If beginners are very young, Logo is enough, i guess.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
  123. Contenders by samkass · · Score: 1

    My contenders for good "starting" language would be:
    1. CommonLisp with CLOS:
    Advantage: Simple, Gets to the core of what programming is, OO concepts, much less room for errors
    Disadvantage: Somewhat obscure, "fun" games harder to create

    2. SmallTalk
    Advantage: Powerful and well-structured language, has influenced a generation of languages (Objective C, Java, C#, etc.), kind of the Latin of modern languages
    Disadvantage: Somewhat obscure, student will be spoiled for all other lesser languages :)

    3. C++
    Advantage: Very common in industry, contains rudimentary OO structure, can program "fun" games and such
    Disadvantage: Will have to re-learn some OO for Java and other better OO languages, syntax can be nightmareish.

    4. Objective C++
    Advantage: Solid OO foundation, can program fun stuff especially on Macintoshes, on Macintosh can use visual layout and design
    Disadvantage: Syntax is fairly obscure compared to other modern languages, supported best on Macintosh which you might not have

    --
    E pluribus unum
  124. Turing? by cecille · · Score: 1

    When I first started, the first language we started with was turing. To be honest, I don't have much experience with some of the languages being described here, so maybe the other suggestions have the same features, but turing has some really good features for new programmers.

    Firstly, there aren't a lot of include libraries, you can start writing the code without having to worry about things like missing things that should be linked. Starting out, I think students should be more worried about learning how to structure programs than where to find the functions they are looking for. Giving students a bunch of code they don't understand to put at the top of their program just makes it seem harder than it really is. Secondly, it's a very english based language. Instead of brackets you get actual words that say things like "end if". When you're just starting, I think this is a bonus because it's more intuitive.

    Also, although the graphics are REALLY rudimentary, you only have to put in ONE line to access the ability to draw graphics on the screen. None of the craziness of some of the other programs where you have to set up windows and drawing areas etc etc to just put a line on the screen. They're not beautiful for sure, but it really lets advanced students do a little bit more, and pictures are always more exciting than console program that just spit out text.

    Additionally, turing does have OO support, so if you're looking to teach OO concepts, you have access to them.

    I don't know much about python, haven't done much with it, although it seems like it might be a fairly good place to start as well. I'd stay away from VB and PHP (and I guess Perl too for that matter). VB can make you a wicked looking program, but it's very unstructured. It might be easy to learn, but you probably want students to learn a languge that is a bit more structured, or they might have trouble later. VB doesn't require things like variable declarations and doens't really require you to stick to strict types and might be confusing when you try to move to a stricter language. I'd stay away from stuff like PHP because it's real use and power is with web stuff. To use PHP for web based stuff, you need some knowledge of HTML. Using PHP to write HTML can be a real pain in the a$$. It's a nightmare of brackets and quote marks and it requires you to have a knowledge of 2 sets of languages/tags and to actually keep the difference clear in your mind. Differentiating between these can be very difficult for beginning students.

    Ok, done my rant...look into turing though. Although it's not as powerful as some of the other languages, I think for teaching what you're looking for is a language that makes it easy to get started, with simple syntax, but common code structures.

    --
    ...no two people are not on fire.
  125. Re:whole heartedly agree by namekuseijin · · Score: 1

    "The Inform Designer's Manual is so excellent"

    Indeed. perhaps because the author is a poet as well? and is really enthusiastic about IF...

    another very nice language to introduce beginners some aspects of programming is the macro language used in the popular freeware raytracer POV-Ray to describe scenes. and, likewise to Inform, beginners are actually delighted to learn the language, since the results are very satisfactory...

    --
    I don't feel like it...
  126. Integrate with other parts of the curriculum by 2901 · · Score: 2, Interesting

    For example you might want the programming course and the calculus course to be mutually supporting.

    The rules for differentiation could be coded up in
    the programming language. For Common Lisp it might
    look like

    (defparameter plus '+)
    (defparameter times '*)
    (defun differentiate (form variable)
        (typecase form
              (number 0)
              (symbol (if (eql form variable) 1 0))
              (list (case (first form)
                  (+ (list plus
                       (differentiate (second form) variable)
                       (differentiate (third form) variable)))
                  (* (list plus
                       (list times
                         (differentiate (second form) variable)
                         (third form))
                       (list times
                         (second form)
                         (differentiate (third form) variable))))))))

    (differentiate '(* x x) 'x) => (+ (* 1 X) (* X 1))

    But why are those the rules, rather than some other rules? Well it is supposed to agree with
    the numerical version

    (defun numerically (function argument difference)
        (let ((left (funcall function (- argument difference)))
          (right (funcall function (+ argument difference))))
          (/ (- right left)
         (* 2 difference))))
    (defun square (x)(* x x))
    (numerically (function square) 7 0.001) => 13.998031

    And indeed

    (defvar x 7)
    (eval (differentiate '(* x x) 'x)) => 14

    Notice the wider vision: students are taught a programming language to give them a language in which to talk about procedures, including procedures that they are expected to master in other parts of the curriculum.

  127. I love Python by bfsmith9 · · Score: 1

    It absolutely rocks - I would definitely look into it. It inspired me to continue on learning programming. When I started Python, I had already taken a course in C. I learned Python completely online, without books, which was inspirational. Here is the tutorialstarted with. Python is not difficult to learn, though it is a serious language that can do some heavy lifting. You can read about Python's "real world" uses on the python.org site - for example both Google and Industrial Light and Magic use it. I started it in sort of an offhand way, not really thinking much would come of it, and felt I really had some serious work down within a year, without trying very hard. After that I moved on to Perl and now I'm learning Java. I can't recommend it more highly.

  128. Tcl/Tk is a great starter language by Anonymous Coward · · Score: 0

    Tcl is easy to learn, quick to bring up interesting applications, e.g.

    http://wiki.tcl.tk/references/8337!

    and scales from small to large applications, databases, webservers, etc.

  129. Something they will enjoy by Anonymous Coward · · Score: 0

    When I was in high school the programming class we had was in pascal on a mac. This forced us to learn graphics. Actually, the first half was pascal on IBM PCs, just to learn the basics. But then moved to mac. He did this because at the time macs were much easier for graphics programming, and schools can get them at good prices :)

    Our assignment was to make a game. I made a breakout type game. That was the cool part, made it interesting.

    Today something like php might be interesting. I bet many high schoolers can get their hands on web server space (even maybe space on a school server) and create a website. This might be more interesting and able to hold their attention more as it gives a purpose to programming rather than just learning how to program.

  130. Prepare them for college by Anonymous Coward · · Score: 0

    I would teach them something they will be able to use in college. Most schools are going to start with C, C++, java or possibly lisp. So, while you ideally you will be teaching the language as only an implementation of concepts common to all programming languages - you will be giving them some syntax that can be used at college, which is hopefully the next stop for most of your students.

    If you teach the basic concepts well, students should be able to select and learn the best language for the task at hand.

    The jobs trend seems to be towards portable/web-based applications and java is dominant in both of these areas. Then again, with the rate of outsourcing, you may be better off dropping programming languages all together and offering a class in project management ;)

  131. Io by iGN97 · · Score: 1

    Consider the Io language:

    "Io is small prototype-based programming language. The ideas in Io are mostly inspired by Smalltalk (all values are objects), Self, NewtonScript and Act1 (prototype-based differential inheritance, actors and futures for concurrency), LISP (code is a runtime inspectable/modifiable tree) and Lua (small, embeddable)."

    Example of Io-code:

    http://iolanguage.com/about/samplecode/

    My personal experience is that it's extremely easy to write, transparent and very introspective.

  132. Easy! by Anonymous Coward · · Score: 0

    ASM or COBOL on an old IBM mainframe bought off Ebay for a couple hundred bucks, coding business reporting apps.

    That'll make them just love software development...

  133. Java by ManoMarks · · Score: 1

    I'd start with Java, using Head First Java from O'Reilly. It has the cross-platform advantage, as well as being fairly simple to use, and if you're using a development environment like Netbeans, you have the advantages of drag and drop guis. One of the biggest hurdles, I think, for people to get over is not seeing anything working. With Java, it's fairly simple to get a program that does something concrete and visible. It also has the advantage of being "real world" in that lots of people are using it.

    --

    That's gotta fit into your schema somewhere

  134. Python Isn't Elegant by Vagary · · Score: 1
    I would recommend Python, because I'm more familiar with it than Ruby. It has a clear, elegant syntax, and many concepts in it exist in other languages as well.

    I'm also more familiar with Python than Ruby, but I've been meaning to get into Ruby because I perceive it as being more elegant than Ruby. It seems to me that amongst scripting languages there's a clear spectrum from evolved to designed.

    • PHP is the most evolved: OO is an extension, and the library tends to get refactored occasionally to work in all the features that were hacked in.
    • Python is in the middle: it's not pure OO and the library doesn't feel as designed from the top-down as it could be.
    • I'm hoping that Ruby, as it is more recent and purely OO is the most designed.

    So Python is certainly better than PHP, but I think students might have an easier time learning something that's more elegant and uniform. Obviously Assembly and Scheme are great, but I think they're an awfully hard sell for anyone who isn't planning on getting a CompSci degree.

    1. Re:Python Isn't Elegant by Omnifarious · · Score: 2, Interesting

      I base my opinion of Python on this...

      When I look at a Python program, it seems pretty obvious what it does. There are very few special-case syntax elements. The program is clear and to the point. When I have examined Ruby programs, it was not nearly so immediately clear how they worked. There seem to be a number of special case syntaxes related to lists, strings and blocks of code used as arguments that render Ruby code much less readable.

      Perhaps it is my ignorance of the language. Or maybe Python is closer to other languages I'm used to. But, I was able to pick up and understand a Python program when I was first learning Python much more quickly than I was able to pick up and understand a Ruby program.

      That is why I hesitate to recommend Ruby as a beginner's language.

    2. Re:Python Isn't Elegant by LordoftheWoods · · Score: 1

      Python is more purely OO then Java. Everything is an object; there are no primitive types. Java has primitives like int, float, char, etc which are not objects. Python doesn't. Just because you can program in a non-OO style doesn't mean you're still not dealing with objects.

  135. Variety of Projects by harryman100 · · Score: 1

    It depends, if your students will be doing a wide variety of different projects, then Java is probably a good choice, however, if they will be concentrating on one main project, then choose the best language for that specific project.

    --
    .sigs are for losers
  136. My langauage Suggestions... by haplo21112 · · Score: 1

    Depending on how long the student has to learn these things in, I would recommend the following things in the following order.

    1/2 Year of Pascal...yes you heard me Pascal...its out dated, however it is great language to teach students about modularization, the importance of Subroutines and Functions and how to wrap their heads around Procedural program execution.

    PHP/Javascript/XHTML/SQL programming...builds on the lessons learned in Pascal teaches interface design and event driven programming as well as basic classes and methods without requiring totally wrapping their heads around OO concepts. Also makes for a great intoduction into code libraries. SQL is just an added bonus as to do anything usful with the rest of these "languages" your going to need to talk to databases. SQL brings a good understanding of data structure and handling as well.

    C Programming, takes the already learned concepts and moves them to a higher level. Students now have to start thinking about how to use the lanagauge to do things that were provided for them previously. However previous exposure to proper coding technique as well as to what IS possible and C like syntax will well prepare them for the leap to "real" programming.

    C++ and/or C# and/or Java
    C type Syntax and OO Closes the loop...

    --
    Power Corrupts,Absolute Power Corrupts Absolutely, leaving one person(group)in charge is absolutely corrupt.
  137. Another Vote for Python by Anonymous Coward · · Score: 0

    I'd echo the previous recommendations for Python. As has been said before, you can use it for OO, but also use it as a scripting language as well. The syntax of Python makes it very clear and relatively easy to read. I think its a v good all-purpose programming language.
    In my opinion I'd avoid C as I don't think its a good use of time, teaching students how to allocate their own memory. They'll waste time getting bogged down in that when they could be learning more fundamental skills. Also I think Java may well be just a bit too difficult to pick up for beginners, but of course it depends on how long the course is and what level you expect to take them to.

    Hell is looking through someone else's perl code!

  138. Haskell by Walid+Taha · · Score: 1

    You've clearly gotten a lot of feedback so I hope you'll get to this reply at some point!

    Functional programming languages have been mentioned. There biggest advantage is that they offer an elegant approach to programming, that can have a lot of aesthetic and intellectual appeal to students. But the most exciting example of such languages, Haskell (http://www.haskell.org/), does not seem to have been mentioned. The website has a lot of useful information about the language, and I know that some people at Yale have been using it for high school instruction, with promising results.

    Walid.

    1. Re:Haskell by JCAB · · Score: 1
      I concur. Haskell is a very formal language that helps emphasize good programming habits that I've found useful later, when programming in C++.

      However, it's quite unforgiving. If you make small compilation mistakes, the error messages you get with the current compilers/interpreters can be hard to decypher. And small mistakes are very common because if the nature of the type system used. Similarly, there are some runtime bugs that can be quite insidios to track down due to the functional nature of the language.

      Recently, the team that develops the most popular Haskell compiler completed a survey that has lots of interesting info about strengths and shortcomings.

      --
      Salutaciones, JCAB
  139. Might I recommend Ruby? by Colonel+Panic · · Score: 1

    It's perfect for Highschool students. What other language has Poignant Guide?

    What other language has songs which recommend it?
    Check out these torrents.

    No, my friend, you won't find these kinds of fun things for Python. The Python people have forgotten their humorous roots and now take themselves very seriously.

  140. An advantage of java... by chriswaclawik · · Score: 1

    The College Board AP test is in java. Saying that the class is an AP class might make more people think it's worth their time. Most colleges also give you credit for AP scores. An AP test at $90 is actually a bargain when compared to the normal cost of 3-4 college credits.

    --
    A guy walks into a bar... well, I forgot the joke, but the punchline is that he's an alcoholic.
  141. Developing Games in Java by Anonymous Coward · · Score: 1, Interesting

    Java as noted is a good choice. If your pupils are anything like mine you might also want to pick up a copy of Developing Games in Java by Brackeen et al which is fun, easy to follow, and full of entertaining examples.

  142. What type of student are you looking for? by davidwr · · Score: 1

    If you are looking for a future CS undergrads, either use the current AP-test language or a language that naturally leads into it.

    If you are looking for future web-designers, then run a web-design class and include at least one web-design language.

    Have you thought about surveying your students and asking what THEY want out of such a course?

    I assume you have pretty much free reign over what is taught. If you don't, then your district or state curriculumn committee may limit your choices.

    Oh, finally:
    More important than any computer language is the ability to speak and write effectively in a business context. Make sure your students know this. Consider making presentations and written reports part of the course, and grade them on their grammar and presentation.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  143. Realistically speaking: scripting languages by riconoscimento · · Score: 1
    Outside of IB courses, and wannabe game developers on their own time, high school students shouldn't be subjected to languages like Java or Python (and god forbid C or C++). I teach Java at a university, and even at that level... I miss Pascal, which happens to be what I learned in high school.

    A good start might be hand-written HTML with some Dynamic HTML or other JavaScript starting about mid-year. HTML gives them an introduction to the basic ideas of programming, like commands in text, syntax, nesting, comments, and the write-(no compile)-run cycle before they get to the real thing. They should use the W3C Validator from the start, to teach the concepts of well-formed code in a very forgiving environment. Then move on to JavaScript to teach them all the usual constructs.

    Another good choice (mentioned elsewhere) would be some other kind of scripting environment. If your school has the cash, Flash would do the trick. Or a scripting language attached to a game engine. Something with immediate results. Kids just aren't as thrilled with Hello, World! as they used to be.

    In either case, they end up with something they can show off. Nice way to get them interested in programming without scaring them off, and still teach them the basic techniques. And hopefully they'll end up in my classes, because handing out all those A+s would make me look good.

  144. VB is dead by confused+one · · Score: 1

    long live VB

  145. Problem with beginner courses by kinglink · · Score: 1

    Basically C++ would be the best bet in my mind. Granted it's potentially the worst language to use, but it's best to start on a moderate difficulty language then a worthless language.

    While VB is a good language to start with at times, the Basic part of the language makes it ultra simple. I know it's a well built language which can go the distance and graphically if done right it can be beautiful but it makes people shy away from it, I have a semester of it and it's great for quick and dirty interfaces but I find when I need a solid system I would need much more training and it doesn't have the applicability that that C++ does.

    PHP on the other hand is more server oriented then front end. Personally I deplore doing webpages but that's me, but I don't think PHP or emerging technologies should be "first languages"

    I personally started my life as a programmer when I was around 8 and my mom and I typed in programs for basic that would take 3-4 hours to type in and be fun but wouldn't do much, and I messed with the variables, and bitched when the failed. However this was when I was 8 and had no skills. I did some work with qbasic, but my first true language was C++ And I've used it since as a primary language.

    I've used Java (good if you have a good teacher, better if you know WHY it's different/better then C++), Prolog (almost useless unless doing logic based systems, your not) Lisp (see prolog) Assembly (yeah that's a beginner language for masochists)

    Basically my advice is if you want something anyone can learn and use well Visual Basic. If you want something to teach a true programmer but anyone can try to learn, use C++. If you want to show a second language to compare to these two, Java is great for that. If you want something with less functionality, well look around there's a reason why these languages have risen to the top, and that's because ease of use or functionality if not both.

    Fortran, Cobol and other older languages are outdated but could work for beginners.

    I think the most important thing is that you have a teacher who while might know a few thing are willing to let the students learn a lot, my Highschool C++ classes was teached by a moderate user (not even a programmer) but the kids in the class had a great time with the language, me and another were the "masters" and we constantly learned off each other as well as helped other students, I constantly refined my code to show off a couple cool tricks we could do. It was great and that's why I think it was better then all my more structured classes in college.

  146. What worked for me... by OSXCPA · · Score: 1

    I suggest the following: Java. Teaches C-like syntax, but with objects, is platform-independant, so you can show them how to use Macs, X86, etc. and intorduce the idea of cross-platform development. Plus using Swing, you can share the pain of UI design up front. After Java, they can move up to C, if they are interested, or go whole-hog into Assembler. My $.02.

  147. Give C a try. by homeobocks · · Score: 1

    Give them a challenge. Something that will interest them and let them know if Comp Sci is something they want to continue studying it in university. Try C out.

    --
    MOUNT TAPE U1439 ON B3, NO RING
    1. Re:Give C a try. by Anonymous Coward · · Score: 0

      I strongly agree that C is the best programming language for beginners.

      C is like the classical music of programming. VB is more like disco or something (not so 'in' pop-music)...

      It's not very complicated to start out with, and then you can go on and learn object-oriented programming with C++. C/C++ lets you understand the inner workings of a program that other languages hide.

      You learn to program a real programming language, which has been used to develop most modern operating systems, 3D-games, device drivers and so on. And all kinds of things that other languages like C#, Java, Python, VB, PHP can't do.

      The C-language is the most widely used language in the world and is available on all platforms and all kinds of hardware.

      It makes it easy to understand program flow, which is difficult for a beginner to understand with object-oriented languages, visual-type languages like VB, script languages like PHP and so on.

      With C, you go straight to the core of what programming is all about.

      You learn all the fundamental concepts and building blocks of a programming language, which makes it much easier to learn other languages later on. This is not true with many other popular languages.

  148. SQL by omission9 · · Score: 1

    I say get them started on sql. This will help them
    by introducing them to programmatic logic in small easily digested bits. I'd start them off with a semester course of just sql in an interactive shell
    like sqlplus or the mysql tool. Maybe move them up to sql scripts run from the shell in the first semester. In the second semester I'd start them off
    by taking their sql from the first half of the year and tieing it into a high level programming language like python or java. End that second semester with some basic data visualization like showing some data from query in some sort of plot. Based on their abilities you would supply more or less of the code and have them fill in key details.

  149. Depends on the students, really by Rhesus+Piece · · Score: 1

    I would say it depends on the students background and where you see them going.
    A friend of mine wanted to learn to program, but with her background in Math, Haskell or Ocaml made more sense than the usually imperitive languages people suggest. Really, that would be a strength of Ocaml: you can learn functional programming, imperitive programming, and object-oriented.
    It also allows you to undertake all sorts of data structures without being tripped up by the specifics (which is a good thing or a bad thing, depending on what you want them to learn).

    If it is a truely introductory class with the intention of getting the students interested in programming, low overhead is essential. Ocaml works to a degree there, but I'd be inclinded to lean toward Python like everyone else.

    I suppose the real question is whether you (and they) want to make them into people who understand the nature of programming or into good programmers.
    For the second option, exposure to more than one language at more than one level of abstraction would be my suggestion, along with a trying out languages with different typing systems. For the first, low barrier of entry.

    Oh, and either way, REPL (read-eval-print-loop, as in a language with an interactive environment for testing) is a must.

  150. MOD PARENT UP Please. by WoTG · · Score: 1

    I totally agree. I pity the poor saps who have to have their first programming language be Java. IIRC, in Basic, it was... um... 10 Print "Hello World" Actually, I don't think the line number was required by the time I got to CS in highschool. Basic programming is about basic concepts and algorithms, not production class code!

  151. Ada by Anonymous Coward · · Score: 0

    Ada

  152. Python, but for simplicity not OO by Anonymous+Brave+Guy · · Score: 1

    I agree with the suggestion of Python, but because you can write simple scripts in it at first without much clutter more than anything else.

    IMHO, the fact that a language is object oriented should be a negative factor when assessing programming languages for beginners, and it should be more negative the more necessary the OO becomes. Beginners to programming should be learning concepts like data, functions and simple control statements at first. Then they should learn about more advanced concepts like indirection, abstract data types, etc. When that's all under their belt, then they can use OO, advanced module systems, yada yada.

    Introducing window dressing like OO features any earlier is a recipe for producing crappy programmers. Far too many academic institutions that should know better have kindly demonstrated this for us in the past few years, by adopting possibly the most inappropriate teaching language in history as their default choice.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  153. Syntactic whitespace by Anonymous+Brave+Guy · · Score: 4, Insightful
    YMMV, but for me, having whitespace be syntactically significant is just BAD!

    That was my initial reaction when I first met Python: sacrilege!

    In many other block-structured languages it's customary to indent but the {} or begin...end markers are the syntactically significant things. Unfortunately, when humans read the code, it's actually the indentation they use to parse the logic most of the time, as many a new C student has learned via the standard deviously indented if...if...else demonstration.

    On reflection, that means having the indentation not be significant, yet using other markers that are, is a bit like putting a banner comment at the top of every function with the function name in it: it's fine if you copy it in properly, but it doesn't really help, and it's a maintenance hazard that can actually harm readability if it's changed incorrectly.

    Punctuation in a programming langauge is good, exactly up to the point that it stops increasing readability and/or reducing errors. After that, it's just clutter. So IMHO the question is whether (from some objective, analytical point of view) ignoring whitespace and introducing {} or begin...end markers improves readability or reduces bug count for programmers using the language. I suspect the answer really is a matter of taste: for some programmers it will, and for some it won't.

    This is why not everyone agrees on whether syntactic whitespace is a good or a bad thing. There just isn't a single, universal right answer to the question.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Syntactic whitespace by mabhatter654 · · Score: 1
      yeah, I like RPG with column-specific formating!!

      Sounds terrible, but it makes maintaining very old code easier... and almost totally eliminates the "hazards" of programer style.

    2. Re:Syntactic whitespace by Hognoxious · · Score: 1
      On reflection, that means having the indentation not be significant, yet using other markers that are, is a bit like putting a banner comment at the top of every function with the function name in it: it's fine if you copy it in properly, but it doesn't really help, and it's a maintenance hazard that can actually harm readability if it's changed incorrectly.
      The problem with whitespace is that it's invisible - or rather it's only visible indirectly, by its effect on other things. What's more, what you see isn't always what you get - is that a tab or four spaces? Plus indentation is used for things other than marking block scope - some people indent parts of sql selects, parameters in function/method calls, sub-conditions etc etc - and in those cases they often aren't very consistent.

      I'm surprised there isn't a "python with braces", wouldn't it just need a preprocessor? Not my real field of expertise, but I don't think it would be that hard to keep track of the nesting levels and replace the { } accordingly.

      Of course the fairest solution would be to use some kind of metadirective or pragma - that would make both sides equally unhappy.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  154. Multiple Tiers for Teaching Programming... by trims · · Score: 2, Informative

    I've noticed everyone here is recommending their favorite language, without mentioning why it might be useful for beginning programming. I'd like to address that issue:

    In Beginning Programming, you're assuming that the student know absolutely nothing about programming. They should know Algebra (to understand variables), but that's about the extent of Math.

    Thus, probably the Right Thing to do is build on the basic Math understanding that your students have, and start to introduce programming concepts from there.

    For that reason, I'd start with a Functional Programming language as they tend to be rather obviously Math-derived, and help ease the introduction of programming constructs. I would recommend Scheme, since it is associated with one of the best "Teaching Programming" texts ever, Structure and Interpretation of Computer Programs.

    After they've grasped Functional Programming, I'd have them move on to Procedural Programming, starting in Pascal or Modula-2. These two are excellent languages which illustrate the fundamentals of procedural programming, without some of the nastier pitfalls. There are also excellent textbooks available for Pascal (fewer for Modula-2). Later, I'd move them to C to introduce pointers and some of the other hairier features.

    Finally, they're ready for Object Oriented Programming, for which I'd use Java - it's widely used, very common for college-level coursework, and there are a large number of supporting utilties and good textbooks useful for teaching aids.

    Overall, I'd look at teaching Functional in 1 semester, Procedural in 1 or 2 semesters (depending on the detail and breadth you want), and OO in 1 or 2 semesters.

    In all honestly, I love scripting languages like Perl, Python, and Ruby. However, as a teaching tool, they're all too multi-purpose, and it's easy for the student to do something they're not supposed to do (even though it works). For teaching languages, you want ones which pretty much only allow the student to program in the methodology you're teaching. That is, you generally want those languages which are LESS flexible, since your main goal is correctness, not functionality.

    -Erik

    --
    There are always four sides to every story: your side, their side, the truth, and what really happened.
    1. Re:Multiple Tiers for Teaching Programming... by rczik · · Score: 1

      While I hate to admit it, I agree with Trims. It's about teaching kids to think. Starting with functional programming, going to procedure and ending with OO takes them on a journey where they can LEARN.

      Then they can write everything in P/P/R when they get a job and have to do real work. ;)

  155. Guido von Robot might be worth a look. by whatteaux · · Score: 2, Informative

    Specifically designed for teaching programming. Although it's not a 'real' programming language as such, it might be well worth exploring.

    http://gvr.sourceforge.net/

    Or PL/I, of course. :-)

  156. Scheme or Python by NNland · · Score: 2, Informative

    If you want them to be able to adapt to any other language available, teach them Scheme.

    If you want them to be able to program in their first day, teach them Python.

    My question is, "What do you want them to do with the knowledge they gain in your course?" If this is to be an introductory course to progamming and/or computer science, it makes sense for it to be both enjoyable and educational. Start them out with Python and get them into PyGame, they'll be tickled to be writing games in their first course. If/when they want to get into writing web applications, send them off to Cheetah or some other templating language for Python. If/when they want to write GUI applications, send them off to wxPython.

    Of course this all fails when they get to college and they are forced to learn Java (C/C++ was so much better to learn), but by the time that rolls around, we hope they have matured enough to understand that learning multiple programming languages is actually good for them.

  157. Assembly! by tjstork · · Score: 1

    Programmers should know how computers work and today's breed often knows less about what goes on inside of object systems than they should. Send them to class to write one in assembly.

    --
    This is my sig.
  158. Java isn't a beginner'slanguage by Eivind+Eklund · · Score: 1
    I believe Java has serious challenges as a beginner's language.
    • There's a lot of conceptual baggage. Examples: "You need a class to hold main", "you need a special operator new" (as opposed to a class method), "Classes aren't objects" (why not?), some variables aren't objects (they're ints and friends), etc.
    • Java requires type declarations, including exceptions declarations. This means that the type system has to be introduced very early, and understanding of exceptions has to be introduced early.
    • Java needs compiling, and thus gets a slower development cycle. There's (as far as I know) no Java shell where you can play with Java interactively. And even if there is, Java is generally so verbose I think that would be practically useless.
    • Java is single model. There's only object-oriented code. Yet, beginners' code should usually be linear (do this, do that), then introduce conditions, and then (probably) introduce procedures/functions for organising code, then build methods on top of the basic concept of procedures. In Java, that's all wrapped up in extra conceptual baggage, as Java forces you to declare classes everywhere.
    • You want to work with containers (collections)? You have to mess about with types and typecasts.
    • Java is VERBOSE, making it hard to read. As an experiment, I converted a Java 2 Collection example to Ruby. The example contained 518 bytes of variables names, comments, and constant string data. To this, Ruby added 273 bytes of "overhead", landing at 791 bytes. Java had 972 bytes overhead, landing at 1490. In other words, excluding the parts that had to be there, the Java code was 3.5 times larger than the ruby code - in other words, 3.5 times as much clutter.
    • Java isn't too hot at doing the things that is simplest to do real stuff with quickly: Text processing and systems administration.
    "Runnable on any platform" is irrelevant for a beginner. It's also only true for restricted values of 'true'.

    "Enterprise level" is irrelevant for a beginner, and nobody should (in my opinion) be doing enterprise programming before they know at least four or five languages.

    Note that I believe Java to be a very good choice for large scale development. I just think it's inappropriate for beginners.

    Eivind.

    --
    Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  159. Re:Why java (mod parent up) by domipheus · · Score: 1

    Excellent reply, and you have brought up a few issues I didnt think of;

    The second problem is that Ada is both strongly-typed AND allows generics. That mix doesn't work well. Either have something that is strongly-typed and enforce that decision, OR use weak-typing and strong constructional rules. Mix-and-match leads to programs that are hard to read and harder to debug.

    The third problem with Ada is the ability to override in ways that are transparent to the coder. A * operation may or may not do what you expect - and you have no way of knowing by looking at the source. It depends on what could override the operator.


    These two things have definately brought back the horror of ada to me. I was one of the students who stood firmly against it until all the lecturerers claimed what I recited in my reply. It sounded good to me; but i have not finished my course - and so not as experienced (and no doubt easily swayed ;)). I've learned a good bit from your reply, and you obviously know your stuff!

    p.s. Sorry forthe fanboy remark! ;)

  160. Brainfuck is what they need by Sad+Loser · · Score: 2, Insightful


    I think that introducing the beginner to Brainfuck is highly likely to mutilate them (or at least induce them to self-mutilate).

    On a more serious note, I think that to most (non geek) people, computer = Interweb so a programming language that has the ability to output html is preferable. This would mean that they can show off their work to friends, which has a powerful re-inforcing effect in itself.

    Although I like PHP, it sounds like Python has the edge in that it is more flexible in this regard

    --
    Humorous signatures are over-rated.
  161. Java or Python. Jython, maybe? by asgeirn · · Score: 1

    I like Python for its clean and simple, while still somewhat string, syntax. The OO is a bit clumsy, however.

    Java has good OO concepts, and a widely spread and known syntax.

    Perhaps Jython, the Python interpreter running inside a JVM, would be a good combination for leveraging the best of the two environments?

  162. Re:Noooooo! / YES JAVASCRIPT!!! by ianjameshenderson · · Score: 1

    all major languages share the same if-then-else-switch-function syntax. it is basic programming logic that should be taught. the problem with so-called 'high level' c#, c, and java is that they rely on primitive memory + i/o minutiae that detract from basic programming logic. vb is 4 verbose retards (learn 2 use {} instead of begin + end people!).

    the best language to teach is javascript. every browser uses it and the basic programming logic can easily be transferred to other (more primitive) languages like c#, c, + java.

    cheers, IJH, M.D., Ph.D.

    "If a woman shall testify, her testimony shall be given half the weight of a man's."
    --Q'uran

  163. Turbo Pascal by Tandoori+Haggis · · Score: 1

    I didn't find basic particularly rewarding.
    Fortran didn't do it for me either.

    I found that once I got in to Turbo Pascal I could get it to do useful things. I built a circuit board to connect to the parallel port on a 486 PC and had a go at writing code which would maniupulate the I/O . You could watch LEDs change state according to the I/O port states.

    That was a nice way to learn some simple structured programming. Even simple stuff to make things happen on the VDU was rewarding.

    Caveat - I don't program, though I am interested in learning more about Turbo Pascal, C, OPL and Python.

    As for ".net" and "VB", they seem completely useless to me but then I'm not an MS Window's fan.

    --
    My hyperlinks aren't worth the paper they're printed on.
  164. Don't use an IDE at all by jbrader · · Score: 1

    I'd suggest not using any graphical development environment at first. The first thing I learned was VB and I found I was learning the application more that I was learnign how to program. So for very simple early programs ( that aren't likely to be more than a couple of hundred lines anyway) I'd say stick with a text editor and the command line.

    --
    You are so boring that when I see you my feet go to sleep.
  165. learning to program by falconwolf · · Score: 1

    The point is that RealBasic has a nice mature evolved interface where a kid can drag a button to the window, write a bit of code, and BAM they have a working application.

    Shouldn't the purpose of taking a programming class be to learn to program not drag and drop? Only once a person can program should they then use an IDE, be it language specific or general purpose.

    Falcon
  166. Another vote for Python by szaz · · Score: 1

    Add my vote for Python. It's free, full featured enough to teach all but the most complex aspects of programming, it has a syntax that everyone - even non programmers - can understand, it is cross platform, has good documentation, did I mention it's free? Its ideal

  167. Re:Why java (mod parent up) by jd · · Score: 1

    Hey, no worries. I've even been accused of voluntarily going out into daylight! (Hey, it was necessary to get to the scifi convention. :)

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  168. Re:Java isn't a beginner'slanguage by OAB_X · · Score: 1

    To learn it simply:

    just memorize the 'public static void main' but, its the same every time, it will be explained later. The class is the program. Its not truely correct, but it works.

    Strings and normal math is already integrated, its dirt simple to use (it looks like math equations like in a math book, its not hard (except for math.pow and such, but thats not that relevant))

    Also, there is nothing wrong with it being verbose, its easy to read, though it takes a long time to do so.

    Since when does a beginner programmer do system administration? They want something that can be powerful, and have the ability to take them far beyond simple 'beginner' languages that are often used (Pascal, Turing, VB6) because those are ass crap.

    Compiling a small java program takes about 1 second, compiling is irelevant, and there are good free IDE's (such as JCreator or Eclipse) that are very good, and make it graphically oriented. They even have templates for new simple java programs.

    Java is very english-like. Beginners write small programs, that dont need many resources anyways, so all arguments against size of overhead and such is really not that important.

    Plus, Java is the only language to be used for the AP courses that US universities offer. That is a real tangible bonus to learning Java. Java is taught as a first year bginners programming course in university. Java is not hard to learn.

  169. C/C++ by falconwolf · · Score: 1

    I would NOT touch C++ at the novice level - way too much packed into it. Java is lighter and more modular, which is a better design practice. Teach by example, not just by examples.

    When I first learned C/C++ C was a preq of C++. Concurrently with C++ students could take Advanced C. For Adv C we used K&R's The C Programming Language. While I liked the book I wish there had been problem solving questions in it. Especially now a days I need to be able to practice and be able to look up a solution if and when I have a problem. Of course it doesn't matter so much when taking a class but I've had the same problem in other languages and not all professors or teachers can or will readily help students.

    Falcon
  170. in my high school we used Pascal by ghee22 · · Score: 1
    here's a free compiler

    it's REALLY simple.. from there we moved onto C++.

    not flaming, note author's question regarding to FIRST language...
    here's some I DON'T recommend: Java, Prolog, or Scheme

    --
    "Persistence is annoying success." - ghee22 11:28:1999 - 10:53:PM
  171. From a current student (in HS) by Anonymous Coward · · Score: 0

    Take this with a grain of salt...

    At my HS (which IMHO, has a superb program), the intro CS class uses Netlogo, Dr. Scheme, and Python. There's also an intro programming class which uses Python. (The CS is mandatory & 1 term, the programming is elective and 2 term (full year))

    After the intro, the AP class is in Java (College Board gives the exam..no other option) and subsequent classes are in C or Java.

    The Scheme unit in the intro was difficult, but it pays off in its coverage of recursion, which makes covering trees and state-based searching easier in the AP class.

    And no, doing some silly FPS scripting language is not going to help with actual programming (The other way around is quite possible, however) unlike someone said earlier. Quite possibly the most engaging thing in HS CompSci classes are the (relatively) free-rein programming projects, especially once said students have the resources to create (simplistic) games--entertaining projects make for deeper exploration of what an environment is capable of.

  172. Python! by rbrewer123 · · Score: 1

    Add another vote for python. Python makes the simple things simple, and the hard things possible. Here is your hello world program in python: print 'hello world' Doesn't get much simpler than that. But you want to do strings, lists, arrays, dictionaries, objects, and whatnot? Python's got 'em, and they're easy. And since the object model is pretty similar to C++ and Java it's easy to pick them up later if needed. These days I'm writing a lot of my app code in python, and then optimizing that if needed, and as a last resort dropping into C++ for more speed. I agree with other posters that assembly and C are great to learn at some point, but I disagree they should be taught in a first course. A first course should be about making some things happen, getting to see that they can make computers do their bidding, and learning some fundamental concepts like preconditions, postconditions, etc. Throw some graphics in there (pygame or one of the turtle graphics libraries maybe) and you've got some fun stuff.

  173. Windows/Intel Assembly Language by Anonymous Coward · · Score: 0

    First get an Apple II and in a single class period, give a demonstration of writing and testing a modest program in assembly language. This will be their history lesson. Explain to them how every lesson after this will demonstrate the progress which has been made in the 30 years of popular microcomputing. Emphasize how the majority of these changes are the result of two companies: Microsoft and Intel. [I know. But hear me out!]

    Then for the remainder of the semester, teach them what the process of developing a modest Windows Application in Assembly language really looks like.

    They will learn to profoundly despise segment registers, interrupts, GUI's, mice, registries, and anything related to the abyssmal hardware/software combination we refer to as "Wintel."

    They will be properly convinced from this look under the hood, that today's status quo of computing really is evil and must be overcome. They will understand that as a whole, it is not progress at all.

    This is the most important lesson they could learn about modern computers. After which, they'll go out into the world with a vengeance, determined to make a difference - and some of them actually might!

    On the last day of class, impress upon the students that the 25-year old Apple II which you demonstrated is still far beyond the skill level of the average computer users of today.

  174. PHP and RoR are both terrible choices by Anonymous+Brave+Guy · · Score: 1

    I couldn't disagree more strongly with the parent post. This sort of approach is exactly why so many schools now produce CS grads who can't program for ****.

    Firstly, you assume all students want to do back-end web work. Personally, I can't imagine anything more dull, other maybe than writing trivial front-ends for databases all day.

    Secondly, you speak as if teaching OO from the start is a good thing. Again, nothing is further from the truth. OO is only one approach, and it's one that has a lot of theoretical and sometimes practical flaws. If you teach a beginner concepts like functions, control structures, expressions and variables, then they will soon pick up the ideas behind OO if they study it. If you teach a beginner that everything is an object, then bad OO is all they will ever know until they learn that you lied. Languages like Java and Ruby are the worst offenders in this respect.

    Thirdly, the idea of introducing a complex, specialised framework like Rails midway through a first term course is shocking. There is no way that anyone at that stage has even grokked the basics of programming properly in a simple language yet. Turning the course into a user guide for your favourite toys is doing them a gross disservice. As the saying goes: give a man a fish, and he'll eat for a day; teach a man to fish, and he'll eat for a lifetime.

    Overall, I honestly can't imagine a worse approach than the one you're advocating. You place unnecessary specifics ahead of generalities, funky toys ahead of solid basics, and les fads du jour ahead of transferrable skills. It's perfectly possible to have a long and distinguished programming career while never using any of Ruby, Rails, OO, and web programming, yet these are the first things you think beginners should learn? That's no way to teach programming.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  175. Niklaus Wirth by ccmay · · Score: 1
    The first problem I encountered switching from QB to C++ was that all variables are passed by reference by default in QB, while in C++ all variables are passed by value by defaut and by reference & is rarely used.

    I'm sure this has appeared before on Slashdot, but after reading your post I couldn't resist:

    Niklaus Wirth, the inventor of Pascal, used to tell this joke on himself: Europeans usually pronounce his name properly, "Nick-louse Veert", while Americans invariably mangle it to ""Nickles Worth". Which is to say, Europeans reference him by name, and Americans by value.

    -ccm

    --
    Too much Law; not enough Order.
  176. My answer is: it doesn't matter that much by retrovince · · Score: 2, Informative

    A concrete grasp of classic logical operations is far and away more important for any programmer, especially beginners. I find that most people I interview for programming work fall into one of two categories: those that can understand binary math and those that don't. IMHO, Java-centric trained folks including those with advanced computer science and engineering degrees by and large have difficulty implementing any bit-level analysis and manipulation. While high-level language proponents argue that this level of programming is unecessary for most applications, the inherent computing overhead introduced by increased abstraction often requires programmers to think about making their apps work on real equipment in the real world. Languages are flavor-of-the-month. Students will study and master any language if it gets them employed. A solid grounding in logic is language-agnostic and actually builds better programmers.

  177. Ocaml by j1m+5n0w · · Score: 1

    I'd recommend ocaml before scheme. Despite a few syntax oddities, the code tends to be a lot more readable than scheme.

  178. Please teach math instead by Anonymous Coward · · Score: 0

    If you're actually capable of teaching programming well to high school kids, please teach math instead. You'll almost certainly be far more competent than most math teachers, and you'll do the kids far more good. If they need programming and have any aptitude for it they'll pick it up for themselves the way most of us did. But if they don't get taught math by someone who understands it they'll never look at it again.

  179. ML or Pascal! by Anonymous Coward · · Score: 0

    Let us face it: Script languages are not worth teaching to unexperienced students. As they only detect few programming errors during compile time, students are frustrated by being exposed to debugging before having understood anything.

    IMHO Pascal (or even better Modula-2) and the ML flavors (SML, OCaml) are great in teaching people how to program in a clean way. Especially ML compilers detect as nearly as much errors as a plain compiler may ever be able to find. Also ML and Pascal are well designed languages offering plenty of orthogonality and thus are easy to learn.

  180. Teach them to think, not code by hicksw · · Score: 1

    Smalltalk. Once you can structure your solution to a problem, translating it to some otherwise brain-crippling procedural language is less harmful to self and solution.

  181. Re:Java isn't a beginner'slanguage by Eivind+Eklund · · Score: 1
    Verbose is NOT easy to read. It means that the important parts get obscured by the dribble. The mind holds 7 (+-2) chunks of information; for a beginner, there's no way to know that that (String) needs to be discarded, etc.

    Since when does a beginner programmer do systems administration?

    Since Unix machines got common among hobbyists.

    They want something that can be powerful, and have the ability to take them far beyond simple 'beginner' languages that are often used (Pascal, Turing, VB6) because those are ass crap.

    Beginners are not qualified to evaluate how to learn best. I last programmed Pascal in 1991, and Turbo Pascal as of then had some teaching advantages compared to Java (no need for exception declarations, avoid the == vs = problem that's common for beginners, can do objects but isn't forced to). VB6 has the advantage that it's quite good for doing quick integration tasks and getting stuff done - which is what you seem to consider important above. The language itself is crap, so I wouldn't choose it to teach with, though. I have no opinion of Turing - I've never worked with it.

    I've taken money for programming in Java, VB6, Pascal, C, C++, Perl, Ruby, and various assembler languages, which makes me feel at least somewhat qualified about those ;)

    Compiling a small java program takes about 1 second, compiling is irelevant, and there are good free IDE's (such as JCreator or Eclipse) that are very good, and make it graphically oriented. They even have templates for new simple java programs.

    I said interactive use. You know, like a shell where you write code and have it executed at once? As in Smalltalk or Ruby or Lisp or Scheme or sh?

    Java is very english-like.

    Excuse me? First of all, this sounds like a halucination (Java has a C-like grammar, with operation reordering compared to english and symbols instead of keywords for a lot of structure), second, it's not at all relevant. We tried out that with Cobol, and it didn't make learning any easier.

    Beginners write small programs, that dont need many resources anyways, so all arguments against size of overhead and such is really not that important.

    Except when I'm doing embedded systems programming or games, I (almost) don't care about overhead anyway. I care about the stuff that Java has added to support programming-in-the-large - such as static type declarations, declarations of exception signatures, the difference between integral and object data types (done for performance), etc.

    Plus, Java is the only language to be used for the AP courses that US universities offer.

    Yeah, that's a tangiable downside. It means that they end up learning one instead of several languages. All programmers should know at least 4-5 languages, to get more ways of thinking about problems.

    Eivind.

    --
    Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  182. Squeak by ackdesha · · Score: 1

    A little late to post, but consider the Squeak SmallTalk as a great teaching environment. I'd also second any notion to consider Python and/or Ruby. Ot better yet, teach them all. Good Luck.

  183. Creating games as programming by hadaso · · Score: 1
    Enigma is an open source game based on a programming language. Creating a level in Enigma is actually writing a program. I'm not sure it's the right tool for learning to program, but it can help Slashdotters pass their spare time (both playing and designing levels).

    Game Maker is actually a programming environment. It is free as in beer (or milk if it is for kids) unless you want the extras. It is used by Prof.dr. M.H. Overmars of Universiteit Utrecht as the basis of course on game design. The students think they are learning how to make games but what they are actually learning is event driven programming. It might be more fun to learn to program in this environment, especially for kids, and not just for boys. My kids are right now quite addicted to GameMaker. Even 5 years old Jonatan can design a bit with the help of 11 years old Daniel. Daniel is just making games most of the time this summer, and learning programming on the way (last year he learned Logo, and also VB at school, but Game Maker is much more fun...).

  184. REXX by os2fan · · Score: 1
    REXX is a pretty useful language that's fairly easy to learn, portable, and useful for doing things like working with strings, algorithms, etc.

    It is aslo a useful cure for GOTO, and has an add-on object module. The language is also available for free from different sources.

    --
    OS/2 - because choice is a terrible thing to waste.
  185. COBOL? by Anonymous Coward · · Score: 0

    If the request to change the Daylight Savings Time succeeds then the opportunity for the students to gain meaningful summer employment could be met. In addition, it is an easily understood language and reads more like text than a program. High level language concepts hold up well and the language was used by the US military for years and continues to run thousands of business applications worldwide. Supports goto (but rarely mentioned or used), subroutines and period for end of line. Encourages documentation by natural language coding and formatting of variables must be defined in advance of code.

  186. Assembly by thogard · · Score: 1

    Assembly is the only choice if you want any of these kids to grow up to be real programmers. There is a significant gap between programmers that learned assembly 1st and those that learned high level languages 1st. For decades there were rumors that BASIC or Pascal caused irreversible brain damage and now that seems to apply the latest generations of ivory tower languages.

    I don't even think you need don't even need computers at all for much of a decent programming class. My high school had a FORTRAN class and some a few classes on BASIC. With FORTRAN you had to punch the cards and you got one run a day while the BASIC people would tweak things till it worked. With the FORTRAN class you had to think about the problem 1st which is what you want to teach.

    All of the best coders I know spent lots of time in assembly very early after they learned to code. Its the only way to fully understand what a machine has to do and that lets you focus on the real costs of that single high level concept down the road.

  187. Well, My Girlfriend likes Python! by Anonymous Coward · · Score: 0

    My Girlfriend recently asked me to show her how to do this "Programming Stuff" I do for living. After some research, I decided to teach her some Python. I am quite suprised how well she has grokked it. She has already started writing a small schedular app(on her own..) Also, you can find some nice training videos here Another on language that I would recommend is Transact SQL. I know DB's aren't that sexy, but it's quite a powerful language in terms that you can do a whole lot in a few lines of code. Besides, anyone who wants to code for a living needs to understand how databases work. Plus SQL strikes a nice balance between procedural and functional programming models..

  188. Eiffel by dafishe · · Score: 1

    Anyone ever used Eiffel as a OO language? My Uni was using Eiffel to teach OO concepts and it is very nicely designed for teaching. Testing concepts are strongly enforced by the language itself. Didn't like it at first but became hooked on it.

  189. Beginning Programmers by ActionAL · · Score: 1

    It is a good thing there are less and less people coming into the programming world. There are really too many people who should not be in it in the first place. If they are not smart enough to learn any programming language and use it then they do not need to be in our field.

  190. BASIC is like th US Government by ACORN_USER · · Score: 1

    It's rather screwed up and good to bash, but if you are able to learn about good government from it, you're half way on your journey to understanding most political systems.

    I bash BASIC a lot, but as many posters have said a hell of a lot of us started out using BASIC and those who didn't run for US Congress went on to master a hell of a lot of other languages which our contemporaries never got to grips with.

    I think that BASIC is not a bad language to start developing with ( the 'B' does stand for 'Beginners' ), however I'd have to exclude that whole subset of languages which are pre-fixed with 'visual.' I'm quite certain that I'd be another 9-5 moron had I grown up clicking all over the place.

    I'd usually suggest the following languages to beginners:

    i) Java - If you can start out with Java, you start off with a decent head-start in understanding o.o. and data types.

    ii) Perl - If you start with perl, I think that your guys will be off the ground quicker than with most other languages. The degree of delving into O.O., regular expressions or anything else which you add is up to you.

    I'd also advocate PASCAL, Python.. or Jython. Or BBC BASIC V :).

    That said, I used to be bias against Java as a learners language, until my techno-phobe sister took a class in it and seemed to understand what she was doing. She now develops in C and Fortran.

    Just my 0.02 Euros.

  191. Turing by Holtsoft by kmadfec · · Score: 1

    Turing (www.holtsoft.com) was specifically designed to teach programming concepts. It's a very "easy" language and you can do graphics stuff right away which I think can really help bridge the gap for kids. This language is mostly used in Ontario to teach programming. Check it out.

  192. You've got to be kidding... by gr8_phk · · Score: 1
    "starting in Pascal or Modula-2."

    The key to teaching teenagers programming is to give them assignments they'll be interested in. Picking a language that they might actually use in the real world is a close second, and that rules out the 2 languages you've chosen. With the possible exception of Borland Delphi, which seems to be slowly dying.

    Python with PyGame is the way to go. All programming concepts can be taught through games. And when they're done with homework, they may actually continue to expand the programs beyond what was assigned. The value of this can not be under estimated.

    Of course I am biased. I learned to program because someone told me that was how to make games. That's all it took. I wasn't interested in code or abstractions or anything - until I needed them for some game features. Every programming abstraction has a practical use in some game. Python I just picked up last year, but I really like it so far. PyGame? Looked at it, but haven't used it yet. It's SDL for Python - and I've used SDL with C. PyGame - Great idea for making games.

    WTF is this Modula 2 stuff? I've never even known anyone who used it for anything. Really. Honest. And I write software for a living.

    1. Re:You've got to be kidding... by MikeBabcock · · Score: 1

      I'm with you -- I'm tired of interviewing programmers who know how to 'code' in pet languages like Pascal but can't actually produce something functional on a real server for a real client.

      Throw in a good Unix shell course while you're at it ... learning how to use a good shell and manipulate shell scripts is worthy of at least one semester.

      --
      - Michael T. Babcock (Yes, I blog)
  193. Criteria for electing the best beginner language by dom1234 · · Score: 1

    The language structure is not a criterium. Neither is the purity of it's object-oriented concepts, or whatever.

    I would bet on the language that can make a kid construct a program with visual effects with the least keystrokes and mouse clicks. Please note that I do not want to make any allusion to Visual-Studio family of developer tools, I don't think it's necessarily the best way to start learning programming.

    For example, I learned computer programming on Basic on the Apple II computer. I just had to type something like :
        GR (to switch to 40x20 graphics mode - damn big pixels !)
        COLOR 4 (purple)
        PLOT 0,0 TO 10,15 (draw a line from 0,0 to 10,15)

    Note that I just had to push the computer switch on and start typing the three commands right away.

    I read some comments here from people suggesting Java. Are you joking ? How do you expect to have time to explain your kid that he has to create a class, then he must declare a public static void main(String args[]) function, and next he has to compile his program ; before he runs away and starts playing Nintendo ?

    Besides, there is a strong correlation between a person's pretention that Java is the solution for everything and the inverse of the number of languages that person knows well. And that's the same for any other language.

    I think the language must be an interpreted one, and that the only way to get someone hooked to programming is to have the possibility to draw things very easily, without having to install additionnal modules that we are only able to understand once we learned all the non-visual features of the language.

    It takes a big deal of maturity for appreciating a black and white console, and programs only using this as their output.

  194. Ruby on Rails is not a programming language... by ajwitte · · Score: 1

    ... Ruby is. (Rails a web application framework written in/for Ruby.)

    I love Ruby, but Ruby (and probably Python) would not make a good first language. Ruby has a lot of features which are great for the productivity (and sanity) of an experienced programmer, but might prevent a beginner from learning everything they need to know. That is, programmers trained using a high level language like Ruby might have a hard time moving back to a lower level language (C or even Java - both still necessary skills).

    --
    chown -R us ~you/base
  195. JavaScript, anybody? by karchie · · Score: 1

    I have taught intro programming classes in VB, C, C++, Java, C# and Pascal. VB is clumsy and it is awkward to say some things. Besides, the .Net version looks too much like C#. C# and Java are interchangable in this sense. Java wins by portability. But you have to jump a bit into the deep end. I have to explain OO programming almost before discussing variables. Pascal has too many types. C and C++ are great languages but it's a bit like teaching intro to wood carving using chainsaws. I have only looked a little at Python but have a hard time getting by the use of whitespace as syntax. So I suggest JavaScript (or ECMAScript). Everybody has the development toolset already on their computer. The console in FireFox is handy for error discovery. Working in a web page is more fun than most IDEs. The basic syntax is the same as C, C++, Java and C# so the skills carry over. Pretty weak on OO programming, though. Good discussion.

    --
    You knew the job was dangerous when you took it. -- Super Chicken
  196. Brainfuck? by Anonymous Coward · · Score: 0

    Oh, come on, the obvious choice is clearly the BrainFuck language. I mean, what High School student in their right mind wouoldn't take a course with the F-word in the description? And it's such an easy language, too - it only has 8 commands!

  197. Hindy by Anonymous Coward · · Score: 0

    +5 Funny because it's true.

  198. My two cents... by Anonymous Coward · · Score: 0

    I did have some experiencie with GW-BASIC and then QBASIC when I was a child, and when I started Computer Engineering we were taught Programming Methodology with Modula-2, a complete educational-oriented language very similar to Pascal.

    Then, 2nd year we had C, we had Functional Progamming, Logic Programming, Assembler and so on, but I think Modula was a good start. It was easy to learn, you could do fun things, you could switch to Delphi with no pain and start doing things for Windows, it had abstract data types, encapsulation, pointers, and so on. Of course we didn't learn all this on first year, but we could stick with Modula as our programming abilities were improving, and reached a point at which we made concurrent programming with a special version, CC-Modula.

    I think I may say I am a good programmer right now because of Modula. Functional programming with "Hope" helped too, and then I met Java and C# and felt in love with automatic GC. :)

  199. C/C++ and Pascal by Anonymous Coward · · Score: 0

    Pascal is very suited for learning to program, but it is not used in real life.

    I think the best language for beginners is C.
    It is probably the most widely used language in the world, but is still easy to start with since it's very pure and simple. Just think about the classic "hello world". At the same time it is extremely fast compared to .NET and Java and much, much more powerful. E.g. You can write drivers, operating systems and everything you want with C.

    You can find c-compilers for all kinds of processors and operating systems. I stress this: All kinds...

    Also, you learn the difference between the heap and the stack, pointers and so on.

    When it's time to learn about object-oriented programming, just build on top of C and learn C++. The Java and .NET syntax is very similar and easy to learn if you know C++. It's easier for a C++ programmer to learn Java and C#/.Net than visa-versa.

    These are facts, not just opinions...

  200. Boo! by int19h · · Score: 1

    I would say the language Boo. It's fun like Python and relatively quick and crossplattform like C# with Mono.

    And, if you ever get a job involving C#, you can write in Boo, and convert to C#. Beautiful! :-)

    Boo is the future!

  201. personal opinion by llamaxing · · Score: 1

    I can only give my opinion from what I've used; being a high school student won't help much here. I've done some basic work with C++ and moved on to AP CompSci, using strictly Java. C++ was very easy to use and program. Might I add that I didn't even work in creating classes but rather implementing several functions in one class. When I used Java, I found myself having to code more strictly, and I wound up using indents to my advantage. At the beginning, though, I found classes and using objects difficult to understand, but I also never studied and rarely listened to the teacher (I don't know how I pulled off a 4 on the AP test) Towards the end, I began to enjoy Java more than C++. But don't forget, it IS just a personal opinion, and I never deeply explored both languages. As for PHP... yeah. I wouldn't recommend it unless you were teaching a web design course. And if you are, then hopefully it's part of a multiple-year program. HTML and CSS would be the first year (obviously)

  202. English by mustafap · · Score: 1

    Best language there is for programming.

    --
    Open Source Drum Kit, LPLC deve board - mjhdesigns.com
  203. Pick a few, not one by ChrisA90278 · · Score: 1

    Back when I learned it was COBOL, FORTRAN and IBM System 360 Assembly. Technology has changed since the 1970's but ther basic concepts have not. I would suggest that you teach the basic concepts and explain to the students that you will use a couple programiing languages to ilistrait the concepts. Students should walk away from the class knowing that learning the syntax of some programming laanguage is NOT llearning to program. This is actually a hrad concept for beginners. But once they learn the designing a program and writting the code are two seporate things they will be better off. So I'd suggest you need a small handfull of languages and show how they differ andhow each is usfull for differnt things

  204. Logo by j-tull · · Score: 1

    I got my start by drawing shapes in Logo. It was easy to learn basic programming logic without forcing the use of advanced language features. I suppose you could do the same thing in C, but the visual feedback of Logo was more fun. Eventually, I wrote a simple black jack program (drew cards, bets, etc.) all in Logo.

    DO NOT USE JAVA! I instructed an intro non-major programming course in Java for college students. It was horrible! IMHO, any language that requires OO is too complicated for beginners.

  205. C# the way to go... by Anonymous Coward · · Score: 0

    Lots of languages can be used to teach programming... however I advice C# for the following reasons:

    - State of Art Object Oriented Programming Language (especially the vers 2.0 coming out soon)
    - It's a standard! This is important.
    - Through Mono it is multiplatform
    - A kid who grasp C# can start make money very quickly, because company are looking for C#ers.
    - It has few keywords so can be learnt as "core" language, but has huge number of libraries... so you can do basically everything.

    Make them a favour, go for C#!

  206. Can't believe no one has offered... by Anonymous Coward · · Score: 0

    TURTLE!

    Beep. Turn left. Beep. That's all you really need to know...

  207. php by g0bshiTe · · Score: 1

    I think something similar to php would be a far better choice than anything platform dependant.

    --
    I am Bennett Haselton! I am Bennett Haselton!
  208. As a college profesor I recommend.. by Anonymous Coward · · Score: 0

    As a college profesor that has taught Java to beginners.. I suggest Python. Students have a real hard time with

    public static void main(String[] args) {
    }

    they also can't understand why they start out with so much code.. if you try to hide this.. you end up with mickey mouse programs that aren't real world (and they complain about it). Also, the compiler is a pain to deal with. Static typing is also a distraction for the beginner.

    Python however requires much less of you initially, but then scales up. And it is easy to move to Java or whatever after you've mastered the basics of programming.

  209. Java Sucks Even More by Vagary · · Score: 1

    Why are you talking about Java? No one in this thread suggested Java was any good: it's not.

    The problem with Python is that even if the primitives are objects, the language is designed as if they were made objects as an afterthought; eg: why do you write abs(-7) instead of (-7).abs?! (If Python were elegant, you wouldn't have global identifiers like abs().)

  210. Ruby Sucks Too by Vagary · · Score: 1

    Yeah, you're right, because Ruby's Perl lineage brings the noise. The problem I always have when programming Python is that I can never guess how to do something in advance: sometimes the library provides a function, sometimes a method; sometimes the identifier is abbreviated, sometimes it's not. In Ruby I'm guessing the up-front learning curve is higher but there is more regularity in methodology.

    What I really want is a language with the pureness of Ruby and the clarity of Python. It appears that the more evolved a language is, the more popular it will become, so we'll always be stuck with crud. :(

  211. Rexx is best. by Wargames · · Score: 1

    In my opinion, the best procedural programming language, by far, for beginners (or anyone else for that matter) is Rexx. http://www.rexxla.org/

    No one (except possibly a terrorist that we NEED information from) should be subjected to Perl.

    --
    -- Each tock of the Planck clock is a new world and here we are still life. --
  212. Start with structure... by DrHex · · Score: 1

    Start students with a language that imposes a structure and methodology so that they solidify good coding habits.

    Yes, as some people have stated, for practical purposes, a language that teaches good habits doesn't necessarily fit the task well in the real world. Give learning programmers (aka students) a solid foundation built upon solid 1st principles of software development and programming and we'll all see much less of the BSOD and maybe people

    I've taught programming and a large portion of students didn't even have fundamental problem solving skills. For example, I gave an exam and included a new function on the test, pretty simple one AND they had open access to the help files. Guess what, NOT ONE OF THEM LOOKED AT THE HELP SYSTEM. They all just complained they'd never seen the function before and this was after putting a statement about freely using the help system at the top of every page of the exam and talking about it the day before the exam.

    Guess they all were suffering from hangovers and didn't remember what I'd said and didn't read the exam paper either

    With regards to teaching students programming, make it fun, make it practical (yes even with PASCAL for example you can do both) and above all let them experiment and cultivate those who wanna go outside of the curriculum.

    --
    Scientia et Potentia
    1. Re:Start with structure... by DrHex · · Score: 1

      ....2nd paragraph should end... and maybe people will have fun too.

      --
      Scientia et Potentia