Answers.Body: <p>Of the languages you mention knowing, I'd recommend Python.</p>
  
  <p>Advantages:</p>
  
  <ul>
  <li><strong>You know it.</strong>  This naturally applies to the other languages in your list, but there are other languages that would also be candidates if you knew them.  It's certainly possible to learn a language and teach at the same time, but best to avoid it if you can.</li>
  <li><strong>It's succinct.</strong> You want them writing code, not boilerplate.  It'll be simpler for them to learn to understand code logic if every line is actually doing something meaningful instead of just existing to fulfill syntactic requirements.</li>
  <li><strong>It has a REPL environment.</strong> The ability to do easy interactive debugging and testing of individual lines quickly will make it easier to try things out early on.</li>
  <li><strong>The annoying "whitespace is syntactically significant" thing</strong>, while pointless and occasionally counterproductive for experienced programmers (who would already be formatting things correctly) is actually a good thing for beginners who need to be trained in proper indentation.</li>
  <li><strong>Simple GUI (and other) Libraries.</strong> Anything that lets them see the results of their coding on the screen as quickly as possible will help get their interest.  And GUIs are hardly the only libraries available; chances are anything they want to play with has an associated library out there.  You want to get them writing real (albeit simple) code instead of toy programs, so they can get excited about it.</li>
  <li><strong>Support for functional programming.</strong> Not the first thing they'll be doing, but an advantage of Python over dedicated teaching languages that were never intended for practical use is that the advanced features <em>are</em> there once the students are ready for them.  They can learn the basic syntax, then start playing with, e.g. list comprehensions, then move on to a fully functional style (when that's the best approach) when they're ready for it.</li>
  <li><strong>Free, portable and open source.</strong> No need to tie them to a specific platform if you don't have to.  This also makes it easy for them to work on projects at home one whatever hardware they have available.</li>
  </ul>
  
  <p>Disadvantages:</p>
  
  <ul>
  <li><strong>No real low-level facilities.</strong> Python won't teach them about memory management, pointers, etc.  They'll need to switch to something that does eventually (I recommend C for that), but that can be the second language.</li>
  <li><strong>No variable declarations.</strong> This is going to be an annoying source of bugs for beginners as well as experts; if you misspell a variable you're writing to, it'll just assume you're declaring a new variable and silently do just that.  Python could <em>really</em> benefit from something like Perl's <code>use strict</code>.</li>
  <li><strong>Poor scope resolution and visibility mechanisms.</strong> In, e.g. C, you can have variables that are global, local to the file, local to the function, or local to the block.  Probably in part due to its lack of explicit block delimiters, Python doesn't really have that kind of granularity; everything's either global or local.  And since it doesn't declare its variables, there are positions in the code where a <em>write</em> to a variable will have local scope but a <em>read</em> from the same variable would have global scope.  Python 3 has improved this somewhat  due to the introduction of <code>nonlocal</code> scope.</li>
  <li><strong>Python 2 vs Python 3</strong>.  Python 3 is the better language, but since it broke backwards compatibility, sometimes you have to choose between Python 3 and a library you want to use.  Less of an issue with beginners than it is in real practice.</li>
  </ul>
  
  <p>I would also strongly <em>anti</em>-recommend PHP and Java; the former was put together in a very hackish manner and will teach them bad habits, and Java is a full-on <code>new BadHabitFactory().createBadHabit().getInstance().getHabitSet()</code> generator.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T23:28:08.730Z
Answers.Text: IMO, the lack of low level stuff is not necessarily an issue.  It's important at some point of course.  It's good for theoretical stuff (knowing how a computer works), but for a new programmer it's not a practical thing.
Answers.UserDisplayName: Oskar Skog
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T22:49:08.517Z
Answers.LastActivityDate: 2017-08-08T22:49:08.517Z
Answers.UserDisplayName: Ray
Answers.Body: <p>Depending on your relationship with the students and their general level of background, I'd say you might consider one of the two following options. </p>
  
  <p>(a) The language you know best. Then you won't be struggling with the language and how to use it, and can focus on the teaching of it. </p>
  
  <p>(b) A language that you don't know at all. Then you can use a discovery style of working with the students to discover together how to program in that language. </p>
  
  <p>with option (b), instead of you showing them how to do things, you can have the students show you. </p>
  
  <p>With either method, however, keep in mind that the most important thing is not what <em>you</em> do or say, but what <em>the students</em> do. Your lectures (if you even do that) are far less important than the exercises that they do. </p>
  
  <p>If you aren't already an experienced teacher, I suggest a lab based system in which students are encouraged to work together and to ask a lot of questions. Active students will learn. Passive ones won't. </p>
  
  <p>It isn't really about whether one language is better or worse. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T22:30:23.380Z
Answers.LastActivityDate: 2017-08-08T22:30:23.380Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>My recommendation is Python, and I want to make some points from the <strong>student´s perspective</strong>.</p>
  
  <ul>
  <li><strong>Python is simple and understandable</strong>. Since they do not have to learn everything at once, for example, assigning values to a name (variable) will be very easy.</li>
  <li><strong>You need very few requirements to start</strong> (in a GNU/Linux distribution, you actually do not need anything to get started). And, as a plus, they can start coding in the Notepad or gedit, where they will actually learn the language and not be dependent on an IDE.</li>
  <li>You always get more motivated if you can <strong>build useful things</strong> with the language that you are learning. For example, for the last part of the course, consider using <code>tkinter</code> for creating simple forms and menus, with just a few lines of code.</li>
  <li>With Python, you can emphasize how important is to have a <strong>clean and readable code.</strong></li>
  <li>There is a lot of <strong>documentation and help online</strong>, and with a lot,
  I mean a lot.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T23:08:29.077Z
Answers.Text: Welcome to Computer Science Educators!
Answers.UserDisplayName: Ellen Spertus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T23:13:09.253Z
Answers.Text: I think this is a decent answer, but it doesn't explain why Python is any better than other common scripting languages, such as Ruby, PHP, or Perl.
Answers.UserDisplayName: user428517
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-09T16:45:46.397Z
Answers.Text: Thanks @EllenSpertus, looking forward to be an active member in this site. :D
Answers.UserDisplayName: Kenny Barrera
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T23:01:52.353Z
Answers.LastActivityDate: 2017-08-09T15:27:17.983Z
Answers.LastEditDate: 2017-08-09T15:27:17.983Z
Answers.UserDisplayName: Kenny Barrera
Body: <p>I'm really looking for opinions from experts</p>
  
  <p>I have been asked to teach a group of students “<strong>How To Program</strong>”, these students are really new to programming.</p>
  
  <p>What I want is to make them <em>like</em> programming and <em>enjoy</em> doing it (as I do), so which programming language should be used to teach them, in order to achieve that goal?</p>
  
  <p>The students are about 17 to 22 years old, and there are 25 students in the group.</p>
  
  <p>My background lies in 9 years of programming experience. I had used many programming languages like C++, Java, VB.NET, C#, JavaScript, PHP, Swift, Python.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-08T22:15:21.213Z
Comments.Text: @Buffy I edit the question , but I did not understand this * What resources do you have?*
Comments.UserDisplayName: Ali
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-08T22:15:34.100Z
Comments.Text: Welcome to [cseducators.se]! Quite an interesting question.
Comments.UserDisplayName: ItamarG3
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-08T23:22:19.510Z
Comments.Text: What are you _actually_ trying to teach? A programming language is a means to teach a concept. What concept are you trying to teach? If you don't include a concept, I think this question is both primarily opinion based and too broad.
Comments.UserDisplayName: thesecretmaster
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-08T23:22:21.433Z
Comments.Text: For what it is worth, the language isn't the most important thing. For example, I would simply hate to have to go back to programming in my first language, though I love to program in general. Focus on the teaching, not the language.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-08T23:34:26.273Z
Comments.Text: I've voted to close this question because as it stands it's simply a language popularity contest. Please keep in mind that close is not the end of the road for the question. If you'd like help fixing it so it can be reopened, please stop by [our question help chat room](https://chat.stackexchange.com/rooms/60468/the-guidance-office).
Comments.UserDisplayName: thesecretmaster
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-09T01:59:48.177Z
Comments.Text: Hey Ali, welcome to [cseducators.se]!  What this question needs is to describe what you are trying to teach. Language choices typically flow from other goals.
Comments.UserDisplayName: Ben I.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-09T02:19:59.307Z
Comments.Text: Here's a possible duplicate: [Programming languages specifically designed for beginners](https://cseducators.stackexchange.com/q/161)
Comments.UserDisplayName: castletheperson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-09T08:05:19.443Z
Comments.Text: @Ali Don't get disheartened by the closure of the question. If you want, I can help you edit the question so it can be reopened. If you're interested, I'm waiting in [The Guidance Office](https://chat.stackexchange.com/rooms/60468/the-guidance-office) (Chatroom)
Comments.UserDisplayName: ItamarG3
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-09T08:27:10.337Z
Comments.Text: @ItamarG3 thanks for your offer , but what I get is really useful
Comments.UserDisplayName: Ali
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-09T10:03:46.007Z
Comments.Text: Consider “Snap” like “Scratch”, but designed for 1st year undergraduates, is a good place to start, and you can then use it to teach other languages. Python is often used as a 2nd language (after “Scratch” or “Snap”). Eiffel is a very good language to teach Object orientated. A touch of class is a book/course. It claims that it is quicker to learn Eiffel then C++ and C#, than to start with C++ or C#. Another good option is “Scheme”, see structure and interpretation of programming languages ( a book, video series, course for 1st year undergraduates ).
Comments.UserDisplayName: ctrl-alt-delor
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-09T15:41:06.383Z
Comments.Text: @Ali Even if you have received a helpful answer, I would consider it a personal favor if you came by [Guidance](https://chat.stackexchange.com/rooms/60468/the-guidance-office) to help us fix the question anyway. We've been discussing it, but there's no way to re-open the question without some more input from you. The problem is that if the question is on-hold for long enough, it will eventually get automatically deleted by the system. :( I want to find a way to preserve it so that it will have value for future visitors as well!
Comments.UserDisplayName: Ben I.
Tags: <language-choice>
Title: Which of the following programming languages will help me better to teach the basic concepts of CS and why?
ThreadText: # Which of the following programming languages will help me better to teach the basic concepts of CS and why?
  
  (Asked by: username_0 on 2017-08-08)
  
  I'm really looking for opinions from experts
  
  I have been asked to teach a group of students “**How To Program**”, these students are really new to programming.
  
  What I want is to make them *like* programming and *enjoy* doing it (as I do), so which programming language should be used to teach them, in order to achieve that goal?
  
  The students are about 17 to 22 years old, and there are 25 students in the group.
  
  My background lies in 9 years of programming experience. I had used many programming languages like C++, Java, VB.NET, C#, JavaScript, PHP, Swift, Python.
  
  **Tags:** language-choice
  
  > **Comments:**
  > **username_0**: @username_3 I edit the question , but I did not understand this * What resources do you have?*  
  > **username_1**: Welcome to [cseducators.se]! Quite an interesting question.  
  > **username_2**: What are you _actually_ trying to teach? A programming language is a means to teach a concept. What concept are you trying to teach? If you don't include a concept, I think this question is both primarily opinion based and too broad.  
  > **username_3**: For what it is worth, the language isn't the most important thing. For example, I would simply hate to have to go back to programming in my first language, though I love to program in general. Focus on the teaching, not the language.  
  > **username_2**: I've voted to close this question because as it stands it's simply a language popularity contest. Please keep in mind that close is not the end of the road for the question. If you'd like help fixing it so it can be reopened, please stop by [our question help chat room](https://chat.stackexchange.com/rooms/60468/the-guidance-office).  
  > **username_4**: Hey Ali, welcome to [cseducators.se]!  What this question needs is to describe what you are trying to teach. Language choices typically flow from other goals.  
  > **username_5**: Here's a possible duplicate: [Programming languages specifically designed for beginners](https://cseducators.stackexchange.com/q/161)  
  > **username_1**: @username_0 Don't get disheartened by the closure of the question. If you want, I can help you edit the question so it can be reopened. If you're interested, I'm waiting in [The Guidance Office](https://chat.stackexchange.com/rooms/60468/the-guidance-office) (Chatroom)  
  > **username_0**: @username_1 thanks for your offer , but what I get is really useful  
  > **username_6**: Consider “Snap” like “Scratch”, but designed for 1st year undergraduates, is a good place to start, and you can then use it to teach other languages. Python is often used as a 2nd language (after “Scratch” or “Snap”). Eiffel is a very good language to teach Object orientated. A touch of class is a book/course. It claims that it is quicker to learn Eiffel then C++ and C#, than to start with C++ or C#. Another good option is “Scheme”, see structure and interpretation of programming languages ( a book, video series, course for 1st year undergraduates ).  
  > **username_4**: @username_0 Even if you have received a helpful answer, I would consider it a personal favor if you came by [Guidance](https://chat.stackexchange.com/rooms/60468/the-guidance-office) to help us fix the question anyway. We've been discussing it, but there's no way to re-open the question without some more input from you. The problem is that if the question is on-hold for long enough, it will eventually get automatically deleted by the system. :( I want to find a way to preserve it so that it will have value for future visitors as well!  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_7 on 2017-08-08. Score: 6
  
  Of the languages you mention knowing, I'd recommend Python.
  
  Advantages:
  
  * **You know it.** This naturally applies to the other languages in your list, but there are other languages that would also be candidates if you knew them. It's certainly possible to learn a language and teach at the same time, but best to avoid it if you can.
  * **It's succinct.** You want them writing code, not boilerplate. It'll be simpler for them to learn to understand code logic if every line is actually doing something meaningful instead of just existing to fulfill syntactic requirements.
  * **It has a REPL environment.** The ability to do easy interactive debugging and testing of individual lines quickly will make it easier to try things out early on.
  * **The annoying "whitespace is syntactically significant" thing**, while pointless and occasionally counterproductive for experienced programmers (who would already be formatting things correctly) is actually a good thing for beginners who need to be trained in proper indentation.
  * **Simple GUI (and other) Libraries.** Anything that lets them see the results of their coding on the screen as quickly as possible will help get their interest. And GUIs are hardly the only libraries available; chances are anything they want to play with has an associated library out there. You want to get them writing real (albeit simple) code instead of toy programs, so they can get excited about it.
  * **Support for functional programming.** Not the first thing they'll be doing, but an advantage of Python over dedicated teaching languages that were never intended for practical use is that the advanced features *are* there once the students are ready for them. They can learn the basic syntax, then start playing with, e.g. list comprehensions, then move on to a fully functional style (when that's the best approach) when they're ready for it.
  * **Free, portable and open source.** No need to tie them to a specific platform if you don't have to. This also makes it easy for them to work on projects at home one whatever hardware they have available.
  
  Disadvantages:
  
  * **No real low-level facilities.** Python won't teach them about memory management, pointers, etc. They'll need to switch to something that does eventually (I recommend C for that), but that can be the second language.
  * **No variable declarations.** This is going to be an annoying source of bugs for beginners as well as experts; if you misspell a variable you're writing to, it'll just assume you're declaring a new variable and silently do just that. Python could *really* benefit from something like Perl's `use strict`.
  * **Poor scope resolution and visibility mechanisms.** In, e.g. C, you can have variables that are global, local to the file, local to the function, or local to the block. Probably in part due to its lack of explicit block delimiters, Python doesn't really have that kind of granularity; everything's either global or local. And since it doesn't declare its variables, there are positions in the code where a *write* to a variable will have local scope but a *read* from the same variable would have global scope. Python 3 has improved this somewhat due to the introduction of `nonlocal` scope.
  * **Python 2 vs Python 3**. Python 3 is the better language, but since it broke backwards compatibility, sometimes you have to choose between Python 3 and a library you want to use. Less of an issue with beginners than it is in real practice.
  
  I would also strongly *anti*-recommend PHP and Java; the former was put together in a very hackish manner and will teach them bad habits, and Java is a full-on `new BadHabitFactory().createBadHabit().getInstance().getHabitSet()` generator.
  
  > **Comments:**
  > **username_8**: IMO, the lack of low level stuff is not necessarily an issue.  It's important at some point of course.  It's good for theoretical stuff (knowing how a computer works), but for a new programmer it's not a practical thing.  
  
  ---
  
  ### Answer by username_3 on 2017-08-08. Score: 5
  
  Depending on your relationship with the students and their general level of background, I'd say you might consider one of the two following options.
  
  (a) The language you know best. Then you won't be struggling with the language and how to use it, and can focus on the teaching of it.
  
  (b) A language that you don't know at all. Then you can use a discovery style of working with the students to discover together how to program in that language.
  
  with option (b), instead of you showing them how to do things, you can have the students show you.
  
  With either method, however, keep in mind that the most important thing is not what *you* do or say, but what *the students* do. Your lectures (if you even do that) are far less important than the exercises that they do.
  
  If you aren't already an experienced teacher, I suggest a lab based system in which students are encouraged to work together and to ask a lot of questions. Active students will learn. Passive ones won't.
  
  It isn't really about whether one language is better or worse.
  
  
  ---
  
  ### Answer by username_9 on 2017-08-08. Score: 4
  
  My recommendation is Python, and I want to make some points from the **student´s perspective**.
  
  * **Python is simple and understandable**. Since they do not have to learn everything at once, for example, assigning values to a name (variable) will be very easy.
  * **You need very few requirements to start** (in a GNU/Linux distribution, you actually do not need anything to get started). And, as a plus, they can start coding in the Notepad or gedit, where they will actually learn the language and not be dependent on an IDE.
  * You always get more motivated if you can **build useful things** with the language that you are learning. For example, for the last part of the course, consider using `tkinter` for creating simple forms and menus, with just a few lines of code.
  * With Python, you can emphasize how important is to have a **clean and readable code.**
  * There is a lot of **documentation and help online**, and with a lot,
    I mean a lot.
  
  > **Comments:**
  > **username_10**: Welcome to Computer Science Educators!  
  > **username_11**: I think this is a decent answer, but it doesn't explain why Python is any better than other common scripting languages, such as Ruby, PHP, or Perl.  
  > **username_9**: Thanks @username_10, looking forward to be an active member in this site. :D  
  
  ---
  
  