Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

The Best First Language For a Young Programmer 634

snydeq writes "Fatal Exception's Neil McAllister questions whether Scheme, a dialect of Lisp taught as part of many first-year CS curricula and considered by some to be the 'latin of programming,' is really the best first language for a young programmer. As he sees it, the essentially write-only Scheme requires you to bore down into the source code just to figure out what a Scheme program is trying to do — excellent for teaching programming but 'lousy for a 15-year-old trying to figure out how to make a computer do stuff on his own.' And though the 'hacker ethic' may in fact be harming today's developers, McAllister still suggests we encourage the young to 'develop the innate curiosity and love of programming that lies at the heart of any really brilliant programmer' by simply encouraging them to fool around with whatever produces the most gratifying results. After all, as Jeff Atwood puts it, 'what we do is craftmanship, not engineering,' and inventing effective software solutions takes insight, inspiration, deduction, and often a sprinkling of luck. 'If that means coding in Visual Basic, so be it. Scheme can come later.'"
This discussion has been archived. No new comments can be posted.

The Best First Language For a Young Programmer

Comments Filter:
  • Pascal (Score:4, Insightful)

    by El Lobo ( 994537 ) on Saturday July 25, 2009 @10:25AM (#28818375)
    I always considered Pascal (or Delphi) a great language for beginners. Powerful enough, structured, type safe and very elegant. From there, jumping to other languages is quite easy.
  • by Gorobei ( 127755 ) on Saturday July 25, 2009 @10:31AM (#28818429)

    for the professors, that it. By removing all the syntax, etc, you can be introducing functions, lexical scope, binding, etc in the first week. Data structures and recursion in the second.

    Result: most students quit by week two, and you are left with a fairly teachable remainder.

  • by nathan.fulton ( 1160807 ) on Saturday July 25, 2009 @10:33AM (#28818443) Journal
    Just don't start with VB, PHP, Java or C# as it will screw the person up for lifetime.

    I strongly disagree with this. Refusing to learn a new way of doing things will screw the person up for a lifetime. But the blame for that is on the person who is now screwed up, for being lazy.
  • by fuzzyfuzzyfungus ( 1223518 ) on Saturday July 25, 2009 @10:33AM (#28818449) Journal
    It seems like TFS is dealing with the fact that there are at least two distinct, and at times temporarily opposed, aspects of being educationally good.

    The one is engagement/excitement/comprehensibility: If somebody is disinterested in, or hugely frustrated by, a subject on first contact, they will have minimal motivation to continue. Unless you simply plan to beat it into them, introductory material needs to grab the audience(this doesn't mean that everybody must be your audience, of course). In many cases, this means a (temporary) sacrifice of rigor or correctness; think of intro physics, where you start with simplified Newtonian scenarios, or math, where you generally start by talking about addition/subtraction/multiplication/division, not sets and number theory.

    The second value is that of being correct and rigorous, or at least not impeding later development in completeness and rigor. You obviously cannot learn everything all at once; but there are some simplifications that make it easy to fill in the gaps later and others that actively retard that effort. This can happen either because the simplifications are hugely different than the reality, and harden people in the wrong ways, or because, in an attempt to be "engaging" the intro stuff promises that the subject will be "fun", "relevant", and "exciting" to everyone, every step of the way. Fact is, that isn't true. Most subjects have, at some point or another, patches of sucky grunt work. Promising people that they are precious flowers who will never have to soil their hands with such is a good way to make them drop out when they hit those patches.
  • Start simple? (Score:3, Insightful)

    by SpinyNorman ( 33776 ) on Saturday July 25, 2009 @10:48AM (#28818581)

    The best first language is anything simple that lets you jump right in and understand the basics like variables, loops, arrays, etc, without getting bogged down in an over complex or restrictive language. It doesn't need to be the worlds best language - it's to get you started. You could do far worse than start with a BASIC interpreter (instant feedback, no compiler/linker to deal with) at a very young age.

    Those of use who started out at the beginning of the personal comnputer (not PC) phenomemon in the late 70's started out simple. After putting away your soldering iron, you got out pen and paper and started hand assembling machine code. And we liked it!

    At the same time c.1978 a highschool math teacher and a bunch of us took adult education classes at the local university (Durham, UK), where they taught us PL/1, and some of us found a way to hang out at the university after that and started playing with BASIC, then taught ourself C. The big excitement was going from the batch-mode PL/1 class with jobs submitted on punched card decks, with printed green bar fanfold output (maybe just a syntax error) delivered some time later, to being ONLINE sitting in front of a terminal. Whoopee!

  • Re:Assembly (Score:0, Insightful)

    by Anonymous Coward on Saturday July 25, 2009 @10:50AM (#28818595)

    Starting with assembly language? You're a fucking moron.

  • by SirLurksAlot ( 1169039 ) on Saturday July 25, 2009 @10:51AM (#28818605)

    Nowadays I would suggest $_language_of_choice as firs language as it is $_reasons[0], $_reasons[1] and $_reasons[2] language. Then extend it with $_arbitrarily_superior_language.
    Just don't start with $_other_language[0], $_other_language[1], $_other_language[2] or $_other_language[3] as it will screw the person up for lifetime.

    Please, I get so tired of arguments like this.

    As long as:

    1. the language (and the associated tools) are available
    2. it has all of the fundamentals of programming (looping, flow control, data structures, variables, etc)
    3. and it grabs their interest

    who cares what languages they learn? If they enjoy it and it allows them to learn how to program why should it matter what language they start out with?

  • People that knock the hacker ethic are a bunch of MBA drones that could never really build a damned thing themselves.

    You learn to program by diving in and doing it. The more you practice and study, the better you get at it. GM was very good at shackling some very brilliant engineers and turning them into process drones. Look at where it got them. Great things are built by individuals and the more steps you have in the way of people being individuals, the worse you will get. Products have to be owned by the engineers that make them and they are personal works of art.

    At the end of the day, the managers, bean counters, and all of these other people with their measurements, metrics and fancy charts are so much fluff, a tax on the capable in society... by really a bunch of leaches that could barely feed themselves as they lack the mental self sufficiency to do anything other than to try and ride the labor of others. We condemn socialism in society there's no real difference between the PM in a three piece suit and the lowest of the homeless people. Neither add any real value to society, its just that, the PM knows how to use PowerPoint and the homeless guy does not.

  • Re:Assembler! (Score:2, Insightful)

    by Dr.Syshalt ( 702491 ) on Saturday July 25, 2009 @11:01AM (#28818689)

    I wouldn't recommend Assembly. Most of the "under the hood" things are not the job of the programmer anymore. That's why we have compilers.

    And that's why we have so much of shitty inefficient code around. Even when you program in a high-level language, you still have to realize how the code you write works on the machine level. I've seen PHP programmers throwing around calls to array_diff/array_unique, chaining them without mercy, without thinking about performance - because they think that those function are some magic black boxes and never consider a performance hit. "Oh, it's a C function, C is fast anyway from what I've heard". Like a good driver should know the inners of a car, how engine/transmission etc. work, otherwise he couldn't drive efficiently - a good programmer should know all the chain, from Java/Python/Scheme/Whatever down to the machine code.

  • Re:PHP (Score:5, Insightful)

    by jjohnson ( 62583 ) on Saturday July 25, 2009 @11:01AM (#28818695) Homepage

    I was just going to write this comment myself. The biggest advantage of PHP is that you go from zero to tangible results very quickly. No programming language is going to be interesting to teenagers if they can't instantly do something useful with it, and to a teenager, cool web stuff is the useful thing that they're most likely to be trying to do.

  • by SpinyNorman ( 33776 ) on Saturday July 25, 2009 @11:02AM (#28818713)

    ANY first programming language introduces new concepts. When you're starting out even something like the concept of a variable takes a little getting used to. Maybe you can relate it to memory store/recall on a pocket calculator, but with a name. Later you can introduce arrays of variables, non-numeric variables, etc.

    You seem to have forgotten what it was like in the beginning to know *nothing*.

  • Re:Assembler (Score:5, Insightful)

    by johnsonav ( 1098915 ) on Saturday July 25, 2009 @11:02AM (#28818715) Journal

    It teaches you how a computer really works. That way you can become a 'real' programmer instead of an IDE user.

    Really? Seriously?

    I don't think assembler is the best way to instill the magic and excitement of getting the most complex machine in your house to do what you want it to. And, that's what a fifteen year old newb needs. If you start with assembler, you're assuring that it will be months before he has learned enough to be able to take a program that he's written to a friend or parent, and have that person say, "Cool!". And, it will be even longer before he can use even a fraction of the modern technology that computers now have; things like GUI's, and networking. More often than not, it will only cause frustration.

    Back in the day, assembler might have been the right option. But today, I think that's a recipe for killing that spark of creativity and excitement that draws people into programming, and gets them to slog through the nitty-gritty stuff.

  • Re:PHP (Score:3, Insightful)

    by kamatsu ( 969795 ) on Saturday July 25, 2009 @11:03AM (#28818725)

    The problem is the vast majority of PHP code in the world is bad. It can very easily teach bad habits.

  • Re:Assembler (Score:3, Insightful)

    by Domini ( 103836 ) on Saturday July 25, 2009 @11:08AM (#28818759) Journal

    Assembly teaches you 'how to bake a cake'. So does BASIC and Pascal and C.

    The problem for me was moving from such basic programming to high-level modeling using (in my view) a much better system of OO design.

    Start them with Objects... I had a hard time getting into OO programming because I started with a very low level language.

  • by Norsefire ( 1494323 ) * on Saturday July 25, 2009 @11:09AM (#28818773) Journal

    To be fair, implementing graphics by raw interface with the windowing system is so difficult that a newbie attempting it will give up in minutes

    I didn't mean they should be writing their own implementations of Pygame, I meant that new programmers shouldn't be doing anything so complex that it requires them to use anything other than the standard library. Learn the language, then play with the extras.

  • I don't associate Scheme with 'the hacker ethic'. I don't strongly associate any language with hacker sensibilities. I do associate Scheme with the intellectual rigor required for a programmer who really has a clue about programming.

    I think Scheme is an excellent language to teach college students who think that they know how to program because they managed to smoosh together a bunch of working PHP code and make a website. I think it is a poor language to teach high school students who are learning their first language.

    The association of technical knowledge with competence irritates me. A competent painter needs to know about brushes and mixing paint, the difference between oil and acrylic, and a whole host of other technical details. But that's not how you get a good painting.

    One of my reasons for feeling that Scheme is a good language for people who think they know how to program is that such people frequently know all about paint but do not have the depth of understanding to be a good painter. Scheme is a language that forces you to think about programming differently than you did before. And if you understand it you are on the path to being a good programmer rather than just a code monkey.

    But I would not recommend it as a first language. I would recommend Python for that. Clean, concise, expressive and powerful. It's my favorite language for a reason. :-)

  • Re:Assembler (Score:3, Insightful)

    by BadAnalogyGuy ( 945258 ) <BadAnalogyGuy@gmail.com> on Saturday July 25, 2009 @11:14AM (#28818823)

    Since we're talking about learning languages here, I think we need to remember to balance "excitement of programming" with actual learning.

    Assembler is a terrible first language because it doesn't really teach programming so much as learning how a particular CPU works. You could theoretically get away with something like MIX because it's just a simple emulation of assembly, but real assembly language programming is something that really shouldn't be attempted until normal programming is learned.

    On the other hand, using a language that allows a student to create a "cool" application very quickly can't possibly teach them very much about programming and computer science. When there is too much "magic" and "gee-whiz" language support, exacerbated by a heavy-handed IDE, the student learns only how to press the right buttons to make their project work. They don't learn what is going on in enough detail to take those concepts to other more useful languages.

    So a balance definitely needs to be struck. Python, as many have said, is a good language, though I would actually prefer one with static typing. BASIC is another good choice, though it's been much maligned by many. Personally, I think C is a great learning language, though it too has shortcomings.

    Like anything, though, you can't satisfy everyone. But you might as well try to satisfy someone.

  • Re:Assembler! (Score:5, Insightful)

    by FishWithAHammer ( 957772 ) on Saturday July 25, 2009 @11:15AM (#28818835)

    The problem with assembler, little Anonymous Coward, is that it doesn't let you do anything without a significant amount of work, and what you can do is unlikely to impress a fifteen-year-old kid just getting into programming.

    Being able to print a few lines to the screen won't impress that kid and make him want to keep programming. Give him a language that can easily create GUIs, so he can see his stuff in action. To do this, I'd recommend an object-oriented language, maybe Python (though I personally detest it) or C# (which is a very nice language with very nice tools).

  • Re:Assembler (Score:3, Insightful)

    by arthurpaliden ( 939626 ) on Saturday July 25, 2009 @11:30AM (#28818943)
    Punch cards are an input device not a programming language.
  • Re:Assembly (Score:4, Insightful)

    by JaredOfEuropa ( 526365 ) on Saturday July 25, 2009 @11:48AM (#28819085) Journal

    First, learn assembly, it teaches you how the machine works. (You should probably also learn electronics and digital logic)

    I think you want to pick a first language with which the kids can get some fun results fairly quickly, and keep their interest. Assembly is not ideal for this. With that said, by all means teach them how a computer works, right from the start.

    My dad taught us programming, back in the days when building a computer meant heating up the old soldering iron. He started with explaining what a computer does, the components (registers, memory, i/o) and the instructions you could use to tell the computer what to do. So he taught us about assembly without actually teaching the language, but even so it proved valuable to know more or less what goes on inside a computer at the lowest level. He then got us started off on Basic (which was pretty much the only option), taught loops, conditional statements, functions / subroutines etc.

    Any modern langauge can teach these basics, and I think they are still a good fundament. From there you can move on to object orientation and using mroe complex libraries and APIs to access the higher functions of the machine. I actually like the idea of starting with C (or just program C-style in C++), then adding object orientation on top of that by moving on to C++. Java might be good but I have no experience there.

    Another option is PHP. It is a lot less finicky; of course the OO aspects are rather poor but one should ask if they are teaching their kids programming fun, or preparing them for a career. PHP (or a similar language) is nice because it is a language well suited for building simple, active web sites. With any luck, your kids will quickly find a few ideas for websites that he can then implement himself... and nothing is better for keeping someone interested in learning to program is having their own project to complete. Once their first efforts go on-line, teach them about structure, web design, and security. Yes, by al means do code reviews, but keep it fun... show them how they can do things better.

    Whatever language you pick, I'd start kids off by keeping them away from IDEs and letting them code in Notepad (do not make them use vi; be mindful of child abuse laws)and a command line compiler (where applicable), just to teach them what goes on under the hood. Once they get to a level where they will want to use more complex libraries, GUIs etc, get them an IDE.

    As an afterthought, do introduce them to the whole open source thing. Nothing stimulates more than a thriving scene of fellow developers.

  • by petes_PoV ( 912422 ) on Saturday July 25, 2009 @11:55AM (#28819143)

    Python is better than Perl because for beginners would takes weeks just to learn all the different possibilities

    You don't need to learn them all - you just need to learn ONE to start with, then others can be added as the newbie's level of competence grows. The biggest barrier to programming is a steep learning curve - too much time spent before something tangible can be produced. Any language that lets someone just type stuff, then press "run" is a good start - maybe even Python.

  • by Simonetta ( 207550 ) on Saturday July 25, 2009 @12:09PM (#28819239)

    The point of IntroTo Programming courses is to instill a comprehension and sense of awe at the ability to control the actions, operations, and functions of physical machinery by using symbols, that are non-physical. It is by using your brain to amplify your body (robotics) or by using your brain to build and control a machine that can vastly amplify your brain (a pocket calculator).

        Intro To Programming needs to skip language and process at the beginning and first teach how electricity can be used to create and manipulate symbols. This is multi-stage process that teaches how to use electricity to represent binary numbers, then using binary numbers to represent decimal numbers, using decimal to represent CPU instructions, using instructions to make programs, and using programs to control machines that amplify the users physical and mental abilities. And finally, how to use the imagination to create new structures of symbols to create programs.

        Install the sense of god-like awe at the ability to manipulate physical reality by rearranging symbols, and the mundane details of language structure are of minor importance to both the student and the teacher.
     

  • by Rockoon ( 1252108 ) on Saturday July 25, 2009 @12:11PM (#28819263)
    Seriously.

    The best way to learn to program is through social interaction about the subject within a culture dedicated to a wide array of programming topics.

    Languages like scheme, lisp, haskel, perl, ruby, python... these are often domain-focused, where it would be hard for the budding programmer to get into some areas of programming that might keep them interrested. For example, graphics or sound.

    Languages like C# and VB.NET have a more generalized culture, where you could get into just about anything and actualy find other people doing the same stuff via online forums (in the old days it was through BBS's and FidoNet.)

    So I recommend a general language, without much meaningfull limitations, that has one or more high traffic public forums online dedicated to it.
  • by i.of.the.storm ( 907783 ) on Saturday July 25, 2009 @12:13PM (#28819281) Homepage
    I agree, anyone who says that learning language X will screw up a person for lifetime is an idiot. The only people who would be "screwed up" are people who aren't good at programming in the first place. And on another note, Java and C# are pretty damn good languages, and even VB.net is supposedly pretty good if you actually give it a chance. I haven't tried it myself, but it's orders of magnitude better than VB6, which is what most people think of when they diss VB.
  • Re:Assembly (Score:4, Insightful)

    by SirLurksAlot ( 1169039 ) on Saturday July 25, 2009 @12:14PM (#28819293)

    Java might be good but I have no experience there.

    Java's strong/weak point is its memory management. You'll never have to deal with/learn garbage collection or pointers.

    Whatever language you pick, I'd start kids off by keeping them away from IDEs and letting them code in Notepad (do not make them use vi; be mindful of child abuse laws)and a command line compiler (where applicable), just to teach them what goes on under the hood. Once they get to a level where they will want to use more complex libraries, GUIs etc, get them an IDE.

    I disagree with this. There is nothing more frustrating than trying to learn to program and getting compile/runtime errors from a command line.
    Without an IDE: "What the hell? What did I do wrong on line 53?"
    With an IDE: "What the hell? Oh! The syntax highlighting tells me I didn't define the variable, I'll remember that for next time."
    Using notepad is a horrible way to write code! I'd rather start them off with the IDE to get them familiar with the language first. Once they're familiar they can move on to command line compiling/building, at that point they'll have a good enough understanding of the language to focus on the command line tools (be it gcc and make or javac and ant or whatever).

  • by St.Creed ( 853824 ) on Saturday July 25, 2009 @12:17PM (#28819313)

    Ada.

    There :)

  • by Rashdot ( 845549 ) on Saturday July 25, 2009 @12:48PM (#28819549)

    Best second language is assembler. To learn to understand what that first language is actually doing.

    what we do is craftmanship, not engineering

    Sometimes I consider the best programs as works of art too.

  • by dirtyhippie ( 259852 ) on Saturday July 25, 2009 @12:53PM (#28819587) Homepage

    Scheme isn't remotely write-only - instead it changes how one thinks about programming for the better. If you really want to see write-only, let me introduce you to my good friend perl without strictures.

  • Re:Assembler! (Score:3, Insightful)

    by hattig ( 47930 ) on Saturday July 25, 2009 @12:53PM (#28819589) Journal

    Most of the people posting here really haven't grasped (1) and (2).

    Assembly as a first language is ridiculous, yet so many are arguing for it.

    Not only is it irrelevant today apart from microcontrollers, which they might get a job programming in 10-15 years time (assuming they're young now), but it will be incredibly frustrating.

    The student has to come to the decision to use C, Assembler, etc, themselves, when they decide they have to in order to realise their vision for whatever they're programming. I.e., they're not beginners any more.

    In the 80s that would mean writing your game in BASIC, and then finding that performance sucked. You'd extend BASIC with some extensions you found in a magazine or bought (e.g., Sprites Alive! on the Amstrad CPC) to see if that would help, and it would for the first few projects.

    What's the modern equivalent? They've already done their MySpace profile, and so on. Maybe they've done basic HTML and CSS by themselves. Now they want to go further ... or write games online? So is Flash the answer? Java for applets, despite the massive initial learning barrier (shared by most of the languages being recommended in this story)? Or do you scrape them away from the web and onto RealBasic, especially if they look at PHP, ugh.

    I would add in (2a) ability to get quick results, however primitive they are. 10 INPUT "What's your name? "; a$: Print a$ + " is a fag!" : REM: Instant fun.

    I agree with (4) but it shouldn't be overriding.

    Also many young people will never get turned on by programming, whatever you do. Maybe you should get them into repairing cars, or building things, or whatever. Or disown them.

  • Re:Assembler! (Score:4, Insightful)

    by Dun Malg ( 230075 ) on Saturday July 25, 2009 @01:03PM (#28819679) Homepage

    a good programmer should know all the chain, from Java/Python/Scheme/Whatever down to the machine code.

    Yes, but you don't start with assembly language. You start with something conceptually simple, like Python. I started with Basic on the Commodore 64. Before a year was up, I was doing shit in 6502 assembly because interpreted Basic was too slow. Not a chance in hell I could've picked up assembly straight off without some understanding of a higher level language. Throwing assembly at someone is like throwing a pile of parts and fasteners at someone and telling them to build a combine harvester.

  • Re:Assembly (Score:3, Insightful)

    by hattig ( 47930 ) on Saturday July 25, 2009 @01:11PM (#28819753) Journal

    Assembly as the first language? 99.99% of first learners who aren't doing a mandatory course in school would walk away.

    The first language has to be PICK UP AND GO. It is allowed to be a horrible abstraction of what the computer can do. It should be limited, to not confuse with abilities. It should allow creativity to be expressed. It should be easy to see results, no complex build system, nothing inbetween the programmer, the code, and running the code.

    Then when the first language is too slow, or doesn't allow something to be done, the learner will pick their own path forward, be that assembler, C, Java, C#, Python or whatever. Every language you've listed, excepting possibly Python, is a follow-on language for those that have got the programming bug.

  • Re:Pascal (Score:3, Insightful)

    by commodore64_love ( 1445365 ) on Saturday July 25, 2009 @01:15PM (#28819795) Journal

    Get a Commodore 128 emulator, and start programming a game in BASIC. That's how I started, until I realized that BASIC is too slow so then I switched to C.

  • Re:Pascal (Score:3, Insightful)

    by sammyF70 ( 1154563 ) on Saturday July 25, 2009 @01:50PM (#28820067) Homepage Journal

    I would say that learning manual memory management first is more beneficial than learning to be lazy ant let the GC do all the work, and, the day you need to use a language which doesn't clean up in your path, write memory leaking piece of feces. Of course, it means that when you need to write in java, you'll be sorely missing the freedom to decide WHEN the garbage is collected.

    It's a bit like the difference between living in your mom's basement and having her come and clean up you room randomly when you're not at home (or when she thinks you are not, but are in fact, having a good time with your girlfri... I mean, inflatable doll) and living alone, having to do the cleaning up yourself, but at least knowing exactly where everything is and deciding yourself that you can live for a day more with your dirty laundry in a corner of the room

  • Re:Pascal (Score:4, Insightful)

    by morcego ( 260031 ) on Saturday July 25, 2009 @01:59PM (#28820139)

    How about teaching people to write algorithms ? You know, the kind we used to learn on the 60s-80s, which could be used to program in ANY language (from Assembly to Pascal/Cobol/Fortran), and not today's verbalized Pascal that people call algorithm ?

    That was the first "language" I learned and, having learned 20+ languages after that (including some obscure ones lines Forth and Lua), even today I thank my teacher for giving me such a good understanding of programing without relying on any specific language's concepts.

  • Re:PHP (Score:1, Insightful)

    by Anonymous Coward on Saturday July 25, 2009 @02:02PM (#28820155)

    agreed, learning PHP is also a good way to ensure future job security. there are always lots of PHP gigs out there.

  • Re:Pascal (Score:3, Insightful)

    by ElizabethGreene ( 1185405 ) on Saturday July 25, 2009 @04:49PM (#28821395)

    I think most of the comments here are missing the point. A first prepgramming language should be about doing "stuff" with as little programming drivel as possible.

    Alice is a language designed for people new to the idea of programming. If your subject is under 14 it is definitely worth looking into. For someone older, stanford has a great intro to programming clas online. It is cs106 with Dr. Sahami. The first couple of lessons are with karel, and then. It eases into java.

  • Re:Pascal (Score:5, Insightful)

    by Hairy1 ( 180056 ) on Saturday July 25, 2009 @04:51PM (#28821415) Homepage

    Being a professional software developer who works in Java, and a former nightclass teacher of Java I can say without reservation that Java is NOT the best first language. Java forces you to use Object constructs from the get go. These things get in the way of communicating the principles that you want to teach. Say you want to discuss IF statements, instead of writing this:

    a = 5
    if a>7:
          print "a is bigger than 7"
    else:
        print "a is smaller or equal to 7"

    you need to write something like

    public class Example{

        public String main( String[] args ) {
            int a = 5;
            if( a> 7)
            {
                  System.out.println("a is bigger than 7");
            } else {
                System.out.println("a is smaller or equal to 7");
            }
    }

    How different is this? Well, first of all you have the concept of a class, which you can either gloss over or explain in full. Students don't know off the bat what is important and what isn't, so the class details obscure the point being made about conditional constructs. Second, the System.out.println lines introduce several ideas, such as Classes (again), the differences between classes and instances (objects) and what methods are. The first example is Python, the second Java. In summary, Python is a far better language to start with because you can teach concepts in isolation.

    Java is still my favourite professional language, and to be sure it isn't a knarly twisted mess like C++, but it still isn't the ideal language to introduce students to.

  • by Not The Real Me ( 538784 ) on Saturday July 25, 2009 @04:57PM (#28821467)

    "...Great programmers aren't satisfied until they understand each little nook of their core language, exactly what it means, does..."

    I'll have to call you out on this. Great programmers understand algorithms. Mediocre programmers are obsessed with their tools, which is what a programming language is.

  • by Anonymous Coward on Saturday July 25, 2009 @08:46PM (#28823139)

    1st programming language should NOT be a progamming language!!

    Teach FORMAL LOGIC first!!!

  • Re:Assembler! (Score:3, Insightful)

    by Jamie Lokier ( 104820 ) on Saturday July 25, 2009 @10:23PM (#28823663) Homepage

    Re performance, you're describing algorithms.

    I've programmed for 27 years, in a great many languages, starting with BASIC and several assembly languages at the beginning.

    Honestly, I didn't learn properly about algorithms and algorithmic complexity until I had the chance to learn higher level languages, which weren't available on home computers when I started.

    I *did* learn a lot about raw efficiency, from counting cycles and memory accesses and instructions; things like that. I learned how to write really fast graphics routines, and clever ways to squeeze the most out of a limited machine.

    But learning that O(n log n) is the fastest you can do a sort and that it's worth it? How to do malloc efficiently and when to use a specialised allocator? When to use a balanced tree structure? When to use hash tables, or compare digests? When to cache things?

    That sort of thing started for me with higher level languages, starting with Orwell (a precursor to Haskell), Lisp and C. And with university.

    You don't learn about algorithms just by writing assembly language. Conversely, you do learn about algorithms by reading good tutorials which use clear languages like pseudo-code or Python to explain them.

    So I do advocate some knowledge of assembly language for a feel for what's going on underneath. It's very useful, especially in teaching about memory.
    (I'd advocate hardware compilation, but it's not quite accessible enough yet ;-)

    But it's important to understand algorithms and to know about many classic ones, and how to put them together to make new ones. That's far easier with higher level languages.

    Good algorithms written in Perl beat bad algorithms written in assembly language, or even compiled directly into hardware.

    A practical and theoretical knowledge of algorithms and raw performance, now that is a great combination if you can teach it :-)

    But then beware of becoming someone who can't resist writing fast code when the speed of writing the code itself, and it's clarity to other people afterwards, is more important than it's performance... Knowing when to write for other criteria, such as clarity, and how to do that well, is a very important skill indeed.

  • Re:Assembly (Score:3, Insightful)

    by julesh ( 229690 ) on Sunday July 26, 2009 @05:25AM (#28825481)

    So...What is Windows written in?

    What is the Linux kernel written in?

    What are KDE and Gnome written in?

    Autocad...Photoshop...MS Office?

    AFIK, they are all C or C++

    Off-the-shelf packages like these are atypical, and represent I believe less than 1% of code that is written commercially. They are dwarfed by the number of payroll systems, account management systems, workflow tracker systems, management information systems, intranets, extranets, web services, etc. Most of these are written (depending on how old they are) in C#, Java, Delphi, VB, Smalltalk, or even COBOL. Very few are in C or C++.

    Also, a lot of this software would probably be written differently if it were started today. Microsoft's research OS, Singularity, is written in C#. I firmly believe that if they were to reimplement Office from scratch they would do so in C#. If I were starting a photoshop-like project today I would strongly consider a functional language.

"I don't believe in sweeping social change being manifested by one person, unless he has an atomic weapon." -- Howard Chaykin

Working...