Which language would be ideal as a first exposure to programming? Below is a rating system. -- FranckBinard ''Franck, could you be more specific? Are you asking about teaching children or adults? If children, what age?'' FreshmansFirstLanguage claims "It's too late to learn one's first programming language in college", so we're talking about children. ''And it's horking wrong. I actually really learnt to program, e.g. not copy BASIC text games off books in late high school - the usual Pascal seminary, and I forgot half everything about it after starting university. Started with C then, and I got hooked on to making ugly "elegant", and "powerful" [bah!] compound statements. And in my 2nd semester came Java, and got me cured. I can safely claim I now have a better grasp of the principles of good design and concise, easy-to-understand coding than my classmates that were chewing on Pascal and C for five years, and am the only one that doesn't get an attack of the vapours whenever OOP is mentioned. -- DavidVallner'' What difference does age make? If the best language varies with age, I would be interested in exactly how it does vary with age. -- DavidCary ''Children are not just ignorant adults. They have actual physical difficulty thinking abstractly for the first eleven years or so.'' Reference? * What does here you mean by ''children''? ''(Didn't the above sentence state: "for the first eleven years or so"? Or did you miss it?)'' Sometimes the society call children even teenagers... I believe teenagers can think abstractly. ''ToonTalk is conceivably '''the''' ideal language for children to learn first.'' * It's closed source, Windows only, costs money, and I couldn't make the demo work. Ideal?!? If not it, then CocoaWorld(s). Here is an interesting survey of languages designed for accessibility, including systems designed for pre-schoolers. * http://www.cs.cmu.edu/~caitlin/papers/NoviceProgSurvey.pdf OneLaptopPerChild decided on SqueakSmalltalk with SqueakEtoys and PythonLanguage for the children using the laptop to play with. OneLaptopPerChild (aimed at ages 6-12) shipped with three programming environments for kids: * Turtle Art, a GraphicalProgrammingLanguage for TurtleGraphics (http://wiki.laptop.org/go/Turtle_Art) * SqueakEtoys, written in SqueakSmalltalk (http://wiki.laptop.org/go/Etoys) * Pippy, a simple PythonLanguage IDE (http://wiki.laptop.org/go/Pippy) The project has a heavy bias towards ''constructionism'', a theory of learning promulgated by SeymourPapert, which was inspired by the "learning by doing" theory of ''constructivism'' developed by Papert's mentor, JeanPiaget. * http://wiki.laptop.org/go/Programming_for_kids * http://wiki.laptop.org/go/Constructivism * http://en.wikipedia.org/wiki/Constructionist_learning ---- Ideal features of first programming language: * Interactive: kids thrive on immediate feedback * Free (so schools can give away a copy to each and every student, and run on a wide variety of old computers) * Not too many picky syntax details that have to be exactly right, or other traps for the unwary * A LittleLanguage: the less syntax to learn the better * Graphics (for the visually-oriented students and the "wow" factor) * Embodies good principles, so there is less to unlearn later (excludes unstructured Basic) * Kid proof sandbox so you can't crash the environment or get stuck in an infinite loop. * Friendly error messages: getting an obscure error message on one's first program is one of the most common turn-offs Based on the above, I would recommend SchemeLanguage (especially DrScheme), LogoLanguage, RubyLanguage, PythonLanguage, BasicLanguage (if structured), and SqueakSmalltalk. Maybe ForthLanguage, but it has no safety net or standard graphics. ---- PythonLanguage was chosen for the grade-school programming book ''Hello World! Computer Programming for Kids and Other Beginners'' (2009 Warren and Carter Sande, ISBN 978-1933988498) ---- '''interactive''' Immediate feedback helps the learning process. ''I am not sure... It depends on what they are learning! Immediate feedback on a screen can make optional the imagination. I think child-programmer should be invited to imagine what will happen before it really happens. The feedback should be only for control purposes; learning by trial-error mechanism is good too, but should not be the only way'' Is there a list of "interactive" languages somewhere? "ScriptingLanguage" lists some of them. But lots of languages are interactive without being considered a "scripting language". Some languages let you call a procedure from the command line (SchemeLanguage, ForthLanguage, MatLab, LogoLanguage, PythonLanguage ... what else? ...). This makes it much easier to immediately test out a procedure I just wrote. ---- LANGUAGE JavaLanguage * GOOD: Easy to learn (''hah!''), good modelling habits, syntax common to a lot of other programming languages. Also, references are easy to find, and the JDK is free. Used in American AdvancedPlacement tests. Standard graphics. Environments such as BlueJay allow interactive testing. * BAD: Doesn't give any sense of the underlying structure of the machine. students don`t allocate/deallocate memory, don't need to grasp the difference between passing to functions by value, by reference or by address. they don't need to differentiate between data structures and pointers to data structures. Not normally interactive. AssemblyLanguage * GOOD: Attention to detail and to algorithm, gives good understanding of the hardware. drives home the point that data and code are the same thing, simply placed in different memory locations. NASM is free. * BAD: Goto statements are unavoidable. might give bad first impression (ie: OK to use all the time). high level could not really be taught at the same time. there is a lot of 'overhead' teaching that needs to be done before student can do interesting things. hard to grade assignments (TA's tend to hate it). Not interactive. No safety net. * ''Assembly was a lot cooler and easier to learn on the early micros like the AppleTwo. There's no monitor on a PC.'' PascalLanguage * GOOD: I don't know, but it used to be the programming language of choice when it came to teaching programming concepts. Type-strict. * BAD: it's not used that much anymore, and it doesn't have the magic that C has in term of syntax. Not interactive. CeeLanguage * GOOD: Very popular. You can get a lot of jobs with it. ''(not in this market)'' Mostly, the available jobs are for embedded software. GCC is free. * BAD: It's too easy to write code that just crashes mysteriously, and can be ''extremely'' difficult to debug. Not interactive (''I've heard rumors of an interactive C, "ICC" ...'') ForthLanguage * GOOD: Interactive. Small. Little syntax to learn. Structured. Easy to decompose problems. Free implementations available. * BAD: Unpopular. No safety net. Few good textbooks. Learning postfix doesn't carry to other languages. LispLanguage * GOOD: Interactive. Very simple syntax, allowing you to think more about algorithms, data structures, etc. * BAD: Syntax is different from most other popular languages. When you see most other languages, you won't want to leave Lisp! * ''Are these also applicable to SchemeLanguage?'' Yes. Scheme is even better since it is simpler. ''[No. Scheme is a reaction to Lisp, back when for example people thought it was terrible for Lisp to be big. It's designed to be a radically different view of the world. I'm sure many people find it better, but personally I prefer Python to Scheme, and Common Lisp to both.]'' {Why?} LogoLanguage * GOOD: Interactive. Described as a StealthLisp, and therefore has many of the advantages of Lisp. Logo was specifically designed as a teaching language for elementary-school children. Standard turtle-graphics. * BAD: Described as a StealthLisp, and therefore has many of the disadvantages of Lisp, and I do believe it's used in even fewer projects than Lisp. LuaLanguage * GOOD: Simple, but not oversimplified syntax. Has no unique quirk (EverythingIsa of Lua is not that bad). Interactive interpreter. * BAD: No graphics, the only data structure is a HashTable. RubyLanguage * GOOD: Simple syntax. Object-orientation is easy to use, and also easy to ignore. There is an interactive interpreter available, called "irb". * BAD: ? PrologLanguage * GOOD: interactive. ... ? ... {Good for SymbolicProcessing/SymbolicProgramming. For instance calculus - diff(a*x^i+b*x^j+c*x^k,x,Dx) which by the way has sat untranslated in PythonTranslator for some months. Because Prolog is better at those kinds of problems, at least more concise. Kids could use it for algebra and it would scale all the way to university for such domains} ''Prolog is a logic constraint language, and so is ToonTalk which is designed for kids.'' * BAD: Doesn't give any sense of the underlying structure of the machine (even less so than Java). Syntax and mental model is different from most other popular languages. {But more similar to the way people including kids actually think} PythonLanguage * GOOD: Very simple and consistent syntax. Object-orientation is easy to use, and also pretty easy to ignore. Having an interactive interpreter makes experimentation easy. Large and newbie-friendly user community. * BAD: None. :). ''Whitespace is syntactically significant.'' This is an advantage for teaching a consistent coding style. [You can teach consistent coding style even without [[And you can stay warm without using a sweater . . . .]]] * Python was (more or less) explicitly designed as a teaching language. GuidoVanRobot * GOOD: Free, interactive, graphical, specifically designed for learning, fun, incredibly simple syntax * BAD: purely instructional, not a general purpose language (but transitions nicely to PythonLanguage) BasicLanguage: * GOOD: interactive. Beginner's All-purpose Symbolic Instruction Code was explicitly designed as a teaching language. * BAD: Older implementations caused BrainDamage because they weren't structured. ValidHtml: * GOOD: Nearly interactive. Simple. Visual. Useful in the real world. Every computer has a browser to play with. * BAD: Doesn't give any sense of the underlying structure of the machine. Completely unable to do many of the things "real" programming languages can do. JavaScript: * GOOD: Nearly interactive. Useful in the real world. Can make pretty graphical applications. Every computer has a browser to play with. * Debatable: Syntax similar to other popular languages. Can do OO, although most people don't bother. Many people don't consider it a RealProgrammingLanguage. * BAD: unable to write to files, unlike "real" programming languages. (It can read files, using XmlHttpRequest or LoadXmlDoc). * ''(added 2005-01-16 - I'm surprised this hasn't been here from long ago)'' * ngs-js has full file IO (http://packages.debian.org/etch/ngs-js); Mozilla's SpiderMonkey interpreter has not full IO, but can read from and write to the terminal. SqueakSmalltalk: * GOOD: Interactive. Standard graphics. Simple syntax. Designed as a teaching language? Object oriented. Comes with SqueakEtoys, also designed as a language for learning. * BAD: ?? HaskellLanguage: * GOOD: Interactive. Punctuation-light syntax if you don't use the more esoteric infix operators. No state to keep track of. Easy mental model. Kids have no preconceptions. * BAD: Strong static typing can lead to esoteric errors. Often, debug messages aren't that informative. Libraries to do nifty things (graphics, networking) are often hard-to-use. ---- I imagine it makes a big difference what exactly you want to *learn*. * If you want detailed understanding of computers at a low level, you can't beat AssemblyLanguage. * If you want to display pretty effects on a web page, you pretty much have to have ValidHtml plus JavaScript and/or JavaLanguage. * If you want some BuzzwordCompliant words to stick on your resume ... MainstreamLanguage. What other sorts of things are reasonable to learn in a single semester, with no previous programming class? ''See FreshmansFirstLanguage. This page seems to be about younger folk.'' Is there a web page to discuss: What sorts of things are useful to know, even though it's completely unreasonable to learn the first semester? -- DavidCary ''perhaps TeachYourselfProgrammingInTenYears?'' ''HowToImproveProgrammingSkills ?'' ---- I think students should learn one really high-level language (smalltalk, LISP, etc.) and one lower-level one (perhaps C/C++) in parallel. However, to get a job they will probably need Java or C#, which are kind of in the middle. ---- I'm Java all the way for this one. Now throw stones at me, but it's more concise than C / C++ any day, easier to learn than C#, and the Java tutorial has insofar provided me with 98% of the reference material I need for my college assignments. Plus the job demand is rather good, due to the bandwagon, and the familiar syntax makes for an easier transition for people that've already tampered with C, and thus indoctrinating with OOP is easier. If they haven't seen C, all the better, I postulate people find it easier to learn OOP without having seen procedural hacking before, as they'll try to see the connection to the real world, and not the connection to what they already know. I also postulate gay people understand OOP better, from a statistical sample of two people, which is me, and a friend that's the very opposite of a CompSci person - he managed to strike up an analogy of objects to Platonic Forms... If we're talking children, I wouldn't go for functional programming - I can't think of "problems" children would want to solve that are modelled well using axioma composition, or complex data structure manipulation. As for learning the low-level languages, your mileage may vary, but I'm in my second year of studies, and so far my courses on C never got close to the basic concepts of programming - I only went figure at what a compiler/linker is/does, and how to compile projects -without- the ancient console Borland IDE I have learnt to hate with a burning passion (GCC and GVim get my work done way faster), or Visual Studio 6.0 the school afforded by virtue of a bulk Academic Licence - all the way forgetting freshmen sort of lack the money to pay the still appalling sums of money Microsoft asks even for an academic licence, and don't even get me started of inducing the bad habit of using non-standard proprietary technology right off school. Same goes for assembly, yet again I've found more interesting information by myself than from lectures - e.g. LOOP is slow, etc. Also assembly, and languages that don't come with a platform and managed environments, have very specific and comparatively rare applications in today's programming, and for quite a large amount of students they become nothing but academic information. For Java, BlueJay is an IDE specifically designed for learning (are there any such for any other languages that weren't designed originally for teaching purposes, or even at all?). It is fundamentally visual, you see all the classes in a project, and inheritance/composition relations displayed in a visual workspace. Also, there's no need to have a wrapper class for a main() method and I/O at all - you can instantiate any object, any time, and those instances also appear visually on a workbench, and you call their methods directly via a context menu, inspecting the results. It hardly gets more interactive than that, and you can teach/learn OOP concepts and programming fundamentals without having to digress into API / support platform calls for a single second. Just my two cents. -- DavidVallner ---- I adhere to the combination high-low-level. May I add another? Structured-ObjectOriented. Fernando ---- See FreshmansFirstLanguage, FirstLanguageLearned, MainstreamLanguage, LanguagesOfChoice ---- CategoryEducation CategoryComparisons